]> git.tuebingen.mpg.de Git - lopsub.git/commitdiff
build: Honor LDFLAGS
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 24 Apr 2024 02:41:47 +0000 (04:41 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 10 May 2024 01:20:48 +0000 (03:20 +0200)
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

index 89cbc2eeb3abe456e21ee44e69377eb50d4377f5..6fbca9cd1b4768df0f4f56fba333af73f29ae434 100644 (file)
--- 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 $@ $^