From: Pavel TvrdĂ­k Date: Tue, 4 Aug 2015 08:01:10 +0000 (+0200) Subject: Revert "Linking: move LDFLAGS at the end of commands" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d9b796bc59c25790f06c2bb5336113f983938ca;p=thirdparty%2Fbird.git Revert "Linking: move LDFLAGS at the end of commands" This reverts commit 9334886d1a09991af05b958482f9500f6c6dc17d. Thanks to Ondrej Zajicek. --- diff --git a/tools/Makefile.in b/tools/Makefile.in index 118f13d0f..30dd79e54 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -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) diff --git a/tools/Rules.in b/tools/Rules.in index fe0e8dfa5..e522d8507 100644 --- a/tools/Rules.in +++ b/tools/Rules.in @@ -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