]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Revert "Linking: move LDFLAGS at the end of commands"
authorPavel Tvrdík <pawel.tvrdik@gmail.cz>
Tue, 4 Aug 2015 08:01:10 +0000 (10:01 +0200)
committerPavel Tvrdík <pawel.tvrdik@gmail.cz>
Tue, 4 Aug 2015 08:08:43 +0000 (10:08 +0200)
This reverts commit 9334886d1a09991af05b958482f9500f6c6dc17d.

Thanks to Ondrej Zajicek.

tools/Makefile.in
tools/Rules.in

index 118f13d0fded6aec73be4c0d310096c3dff3cc31..30dd79e5454ac1a7e100cd285f73cd3bd1c89121 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) -o $@ $^ $(LIBS) $(LDFLAGS)
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 $(exedir)/birdc: $(birdc-dep)
-       $(CC) -o $@ $^ $(LIBS) $(CLIENT_LIBS) $(LDFLAGS)
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CLIENT_LIBS)
 
 $(exedir)/birdcl: $(birdcl-dep)
-       $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
+       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 .dir-stamp: sysdep/paths.h
        mkdir -p $(static-dirs) $(client-dirs) $(doc-dirs)
index fe0e8dfa5bf996eb41b635c27d139510a984ff6b..e522d8507dd6ea90b3cac0e4c7253a64bd6082ec 100644 (file)
@@ -48,10 +48,10 @@ tests_executables := $(notdir $(basename $(tests_sources)))
 tests: $(tests_executables)
 
 %_test.o: $(srcdir)/$(dir-name)/%_test.c
-       $(CC) $(CFLAGS) $^ -c -o $@ $(LDFLAGS)
+       $(CC) $(CFLAGS) -c $< -o $@
 
 %_test: $(srcdir)/$(dir-name)/%_test.o $(root-rel)test/birdtest.o
-       $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
+       $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
 
 ifdef source