From dc9482e2e30b96e2902235a907d5c5d8c7c24197 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 24 Apr 2024 04:41:47 +0200 Subject: [PATCH] build: Honor LDFLAGS It's good practice to include CPPFLAGS, CFLAGS and LDFLAGS in the rules which invoke the linker. We already do this for the former two, so do the same with LDFLAGS as well. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 89cbc2e..6fbca9c 100644 --- a/Makefile +++ b/Makefile @@ -113,9 +113,10 @@ lsg1.o: lsg.c lsg.h lopsubgen-stage1: $(lsg1_objs) $(CC) -Wall -g $(lsg1_objs) -o $@ lopsubgen: $(lsg_objs) - $(CC) -Wall -g -o $@ $(lsg_objs) + $(CC) -Wall -g $(LDFLAGS) -o $@ $(lsg_objs) $(REALNAME): $(liblopsub_objs) - $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) -o $@ $^ + $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) \ + $(LDFLAGS) -o $@ $^ liblopsub.a: $(liblopsub_objs) $(AR) -rcs $@ $^ -- 2.39.2