]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Linking: move LDFLAGS at the end of commands
authorPavel Tvrdík <pawel.tvrdik@gmail.cz>
Wed, 29 Jul 2015 08:41:37 +0000 (10:41 +0200)
committerPavel Tvrdík <pawel.tvrdik@gmail.cz>
Wed, 29 Jul 2015 08:42:41 +0000 (10:42 +0200)
Better support gcov
 $ LDFLAGS="-lgcov" CFLAGS="-fprofile-arcs -ftest-coverage" ./configure

tools/Makefile.in
tools/Rules.in

index 30dd79e5454ac1a7e100cd285f73cd3bd1c89121..118f13d0fded6aec73be4c0d310096c3dff3cc31 100644 (file)
@@ -47,13 +47,13 @@ subdir: sysdep/paths.h .dir-stamp .dep-stamp
        set -e ; for a in $(static-dirs) $(client-dirs) ; do $(MAKE) -C $$a -f $(srcdir_abs)/$$a/Makefile $@ ; done
 
 $(exedir)/bird: $(bird-dep)
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+       $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
 
 $(exedir)/birdc: $(birdc-dep)
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
+       $(CC) -o $@ $^ $(LIBS) $(CLIENT_LIBS) $(LDFLAGS)
 
 $(exedir)/birdcl: $(birdcl-dep)
-       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+       $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
 
 .dir-stamp: sysdep/paths.h
        mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
index c583044324120c63eca1cf36d789009017fd2168..fe0e8dfa5bf996eb41b635c27d139510a984ff6b 100644 (file)
@@ -48,10 +48,10 @@ tests_executables := $(notdir $(basename $(tests_sources)))
 tests: $(tests_executables)
 
 %_test.o: $(srcdir)/$(dir-name)/%_test.c
-       $(CC) $(CFLAGS) $(LDFLAGS) $^ -c -o $@
+       $(CC) $(CFLAGS) $^ -c -o $@ $(LDFLAGS)
 
 %_test: $(srcdir)/$(dir-name)/%_test.o $(root-rel)test/birdtest.o
-       $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
+       $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
 
 ifdef source