git » libfiu » commit e87390e

preload: Pass the -L flag to the compiler only when needed

author Alberto Bertogli
2010-10-11 02:21:39 UTC
committer Alberto Bertogli
2010-10-11 02:21:39 UTC
parent 4aad97c5ac2aa8e9f12e01b55a2bf3dee3f22827

preload: Pass the -L flag to the compiler only when needed

Caught by clang.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

preload/posix/Makefile +2 -1
preload/run/Makefile +2 -1

diff --git a/preload/posix/Makefile b/preload/posix/Makefile
index 20d658f..d554f3e 100644
--- a/preload/posix/Makefile
+++ b/preload/posix/Makefile
@@ -1,7 +1,7 @@
 
 CFLAGS += -std=c99 -Wall -O3
 ALL_CFLAGS = -D_XOPEN_SOURCE=600 -fPIC -DFIU_ENABLE=1 \
-		-I. -I../../libfiu/ -L../../libfiu/ $(CFLAGS)
+		-I. -I../../libfiu/ $(CFLAGS)
 
 ifdef DEBUG
 ALL_CFLAGS += -g
@@ -84,6 +84,7 @@ build-env.h: build-env.h.in build-libcsoname
 
 fiu_posix_preload.so: build-flags build-env.h build-needlibdl $(OBJS)
 	$(NICE_CC) $(ALL_CFLAGS) -shared -fPIC $(OBJS) \
+		-L../../libfiu/ \
 		-lfiu `cat build-needlibdl` \
 		-o fiu_posix_preload.so
 
diff --git a/preload/run/Makefile b/preload/run/Makefile
index 72d3c4c..d408f96 100644
--- a/preload/run/Makefile
+++ b/preload/run/Makefile
@@ -1,7 +1,7 @@
 
 CFLAGS += -std=c99 -Wall -O3
 ALL_CFLAGS = -D_XOPEN_SOURCE=600 -fPIC -DFIU_ENABLE=1 \
-		-I. -I../../libfiu/ -L../../libfiu/ $(CFLAGS)
+		-I. -I../../libfiu/ $(CFLAGS)
 
 ifdef DEBUG
 ALL_CFLAGS += -g
@@ -59,6 +59,7 @@ build-needlibdl:
 
 fiu_run_preload.so: build-flags build-needlibdl $(OBJS)
 	$(NICE_CC) $(ALL_CFLAGS) -shared -fPIC $(OBJS) \
+		-L../../libfiu/ \
 		-lfiu `cat build-needlibdl` \
 		-o fiu_run_preload.so