respect LDFLAGS when linking programs
authorRobin H. Johnson <robbat2@gentoo.org>
Tue, 23 Jan 2018 22:47:19 +0000 (17:47 -0500)
committerJens Axboe <axboe@kernel.dk>
Tue, 23 Jan 2018 22:56:12 +0000 (15:56 -0700)
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
btreplay/Makefile
btt/Makefile
iowatcher/Makefile

index fdbded02ee0aeb9b1d656cf6d52460531c35a9d1..68de59183a730e07b8c9b44977aa8ea204615137 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,19 +26,19 @@ btreplay/btreplay:
        $(CC) -o $*.o -c $(ALL_CFLAGS) $<
 
 blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
 
 blktrace: blktrace.o act_mask.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
 
 verify_blkparse: verify_blkparse.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
 
 blkrawverify: blkrawverify.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
 
 blkiomon: blkiomon.o rbtree.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
 
 $(PROGS): | depend
 
index 2998182401e75978c9c434e20ea65205812e4f52..f574a2976ec1ffaaec858590313a790a8f709e9d 100644 (file)
@@ -32,10 +32,10 @@ clean: docsclean
        $(CC) $(CFLAGS) -c -o $*.o $<
 
 btrecord: btrecord.o
-       $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
 
 btreplay: btreplay.o
-       $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
 
 depend:
        @$(CC) -MM $(CFLAGS) *.c 1> .depend
index df7a3de6b3fbffa94ec7a0d2a6f2635eeda3a0cd..32075573954ceccc9396b83e2ef8b4a2cb63fe6a 100644 (file)
@@ -38,7 +38,7 @@ clean: docsclean
        $(CC) $(CFLAGS) -c -o $*.o $<
 
 btt: $(OBJS)
-       $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
 
 ifneq ($(wildcard .depend),)
 include .depend
index e013556f3ae1dc3d42baf4d461174f3a2b2ba75a..a224a0848cc81d709efec8c7394443c7140c92e6 100644 (file)
@@ -19,7 +19,7 @@ all: $(ALL)
        $(CC) -o $*.o -c $(ALL_CFLAGS) $<
 
 iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
-       $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
+       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
 
 depend:
        @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend