Commit 2d9b796b authored by Pavel Tvrdík's avatar Pavel Tvrdík
Browse files

Revert "Linking: move LDFLAGS at the end of commands"

This reverts commit 9334886d.

Thanks to Ondrej Zajicek.
parent 182f73df
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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