fix: use CC instead of LD, and deprecate LD

this is a bit confusing, since setting `LD=cc` would have the same
issue; `ld: -f may not be used without -shared`. So I've got no idea
what is going wrong, I guess it's something funky.
This works, so we shall stick with this.
This commit is contained in:
2025-09-15 12:08:39 +02:00
parent 5f3bd40a47
commit 82ebe1f4d1

View File

@@ -5,7 +5,6 @@
NAME = mcaselector-lite NAME = mcaselector-lite
DEBUG ?= 0 DEBUG ?= 0
CC ?= cc CC ?= cc
LD ?= ld
# setting default compilation flags # setting default compilation flags
# some of which are able to be overwritten, others are always appended # some of which are able to be overwritten, others are always appended
@@ -69,13 +68,13 @@ lib/obj/%/: lib/%/
bin/$(NAME): $(OBJ) bin/$(NAME): $(OBJ)
$(info [LD] $@) $(info [LD] $@)
@mkdir -p $(@D) @mkdir -p $(@D)
@$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS) @$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
# link together a testing binary # link together a testing binary
bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ)) bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ))
$(info [LD] $@) $(info [LD] $@)
@mkdir -p $(@D) @mkdir -p $(@D)
@$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS) @$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)
obj/res/%.c: res/% obj/res/%.c: res/%
$(info [XXD] $@) $(info [XXD] $@)