From 82ebe1f4d1cd819c820b231d29746f60a54beb58 Mon Sep 17 00:00:00 2001 From: Quinn Date: Mon, 15 Sep 2025 12:08:39 +0200 Subject: [PATCH] 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. --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 21dc332..2ff2e33 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ NAME = mcaselector-lite DEBUG ?= 0 CC ?= cc -LD ?= ld # setting default compilation flags # some of which are able to be overwritten, others are always appended @@ -69,13 +68,13 @@ lib/obj/%/: lib/%/ bin/$(NAME): $(OBJ) $(info [LD] $@) @mkdir -p $(@D) - @$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS) + @$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) # link together a testing binary bin/TEST_$(NAME): $(TOBJ) $(filter-out obj/src/main.o,$(OBJ)) $(info [LD] $@) @mkdir -p $(@D) - @$(LD) -o $@ $^ $(LDFLAGS) $(LDLIBS) + @$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) obj/res/%.c: res/% $(info [XXD] $@)