mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 03:25:45 +01:00
fix: using the linker for generating a .o file is a feature for only GNU ld.
Now utilising a process to generate a .c file using `xxd`, and compiling those to object files.
This commit is contained in:
11
Makefile
11
Makefile
@@ -72,10 +72,15 @@ bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ))
|
||||
@mkdir -p $(@D)
|
||||
@$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
obj/res/%.o: res/%
|
||||
$(info [LD] $@)
|
||||
obj/res/%.c: res/%
|
||||
$(info [XXD] $@)
|
||||
@mkdir -p $(@D)
|
||||
@$(LD) -r -b binary -o $@ $<
|
||||
@xxd -i -n $(patsubst res/%,%,$<) $< $@
|
||||
|
||||
obj/res/%.o: obj/res/%.c
|
||||
$(info [CC] $@)
|
||||
@mkdir -p $(@D)
|
||||
@$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
||||
|
||||
obj/%.o: %.c
|
||||
$(info [CC] $@)
|
||||
|
||||
Reference in New Issue
Block a user