From 8b33ead2c3f80739bc4432673dc6d10e6a466e5c Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Thu, 12 Jan 2006 11:23:54 +0000
Subject: use LDFLAGS when linking .so files as pointed out by Peter S.
 Mazinger

---
 test/dlopen/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'test')

diff --git a/test/dlopen/Makefile b/test/dlopen/Makefile
index fe010e0c3..fe3a403d5 100644
--- a/test/dlopen/Makefile
+++ b/test/dlopen/Makefile
@@ -39,7 +39,7 @@ libtest2.o: libtest2.c
 	$(CC) $(CFLAGS) -fPIC -c libtest2.c -o libtest2.o
 
 libtest1.so: libtest1.o
-	$(CC) $(CFLAGS) -fPIC -shared -o libtest1.so -Wl,-soname,libtest1.so libtest1.o ./libtest2.so
+	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o libtest1.so -Wl,-soname,libtest1.so libtest1.o ./libtest2.so
 
 libtest2.so: libtest2.o
 	$(CC) $(CFLAGS) -fPIC -shared -o libtest2.so -Wl,-soname,libtest2.so libtest2.o
@@ -48,14 +48,14 @@ dltest: dltest.c
 	$(CC) $(CFLAGS) $(LDFLAGS) -DLIBNAME="\"./libtest.so\"" dltest.c -ldl -lpthread -o dltest
 
 libtest.so: libtest.c
-	$(CC) $(CFLAGS) -fPIC -shared -Wl,-soname,libtest.so libtest.c -o libtest.so
+	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-soname,libtest.so libtest.c -o libtest.so
 
 # Second time, directly link libtest3.so with libpthread
 dltest2: dltest.c
 	$(CC) $(CFLAGS) $(LDFLAGS) -DLIBNAME="\"./libtest3.so\"" dltest.c -ldl -lpthread -o dltest2
 
 libtest3.so: libtest.c
-	$(CC) $(CFLAGS) -fPIC -shared -Wl,-soname,libtest3.so libtest.c -o libtest3.so -lpthread
+	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-soname,libtest3.so libtest.c -o libtest3.so -lpthread
 
 run: libtest2.so libtest1.so test1 test2 test3 dltest libtest.so dltest2 libtest3.so
 	@echo "----------running test 1--------------"
-- 
cgit v1.2.3