0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 10:11:53 +00:00

Linking: move LDFLAGS at the end of commands

Better support gcov
 $ LDFLAGS="-lgcov" CFLAGS="-fprofile-arcs -ftest-coverage" ./configure
This commit is contained in:
Pavel Tvrdík 2015-07-29 10:41:37 +02:00
parent 12879947cf
commit 9334886d1a
2 changed files with 5 additions and 5 deletions

View 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)

View 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