summaryrefslogtreecommitdiff
path: root/test/ldso/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-09-01 20:42:39 +0000
committerEric Andersen <andersen@codepoet.org>2003-09-01 20:42:39 +0000
commit9efccabb26eed2b4b4ccb4a89561e1212b81d649 (patch)
tree8498d580186cad71e147c14a69a5728d9ddd8e2f /test/ldso/Makefile
parentcea5b5c0657e999b561a6438c77861e00689b306 (diff)
A better test for a dlopen problem with weak symbols, based
on a much improve test by mjn3.
Diffstat (limited to 'test/ldso/Makefile')
-rw-r--r--test/ldso/Makefile48
1 files changed, 15 insertions, 33 deletions
diff --git a/test/ldso/Makefile b/test/ldso/Makefile
index 1414a34e8..bfd8444c7 100644
--- a/test/ldso/Makefile
+++ b/test/ldso/Makefile
@@ -1,6 +1,6 @@
# Makefile for uClibc
#
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2003 Erik Andersen <andersen@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
@@ -19,44 +19,26 @@
TESTDIR=../
include $(TESTDIR)/Rules.mak
-all: dltest2 dltest libhowdy.so run
-all: dlttest dlttest2 dltest2 dltest libhowdy.so run
+all: run
-dlttest.o: dlttest.c
- $(CC) $(CFLAGS) -c dlttest.c -o dlttest.o
-dlttest2.o: dlttest.c
- $(CC) $(CFLAGS) -DFORCE -c dlttest.c -o dlttest2.o
+dltest: dltest.c
+ $(CC) $(CFLAGS) -DLIBNAME="\"./libtest.so\"" dltest.c -ldl -lpthread -o dltest
-dltest2: dltest2.c
- $(CC) $(CFLAGS) dltest2.c -o dltest2 -ldl
- ./dltest2
-
-dltest.o: dltest.c
- $(CC) $(CFLAGS) -c dltest.c -o dltest.o
-
-howdy.o: howdy.c
- $(CC) $(CFLAGS) -fPIC -c howdy.c -o howdy.o
-
-libhowdy.so: howdy.o
- $(CC) $(CFLAGS) -shared -o libhowdy.so -Wl,-soname,libhowdy.so howdy.o
+libtest.so: libtest.c
+ $(CC) $(CFLAGS) -fPIC -shared -Wl,-soname,libtest.so libtest.c -o libtest.so
-dltest: dltest.o
- $(CC) $(CFLAGS) -o dltest dltest.o -ldl
+# Second time, directly link libtest2.so with libpthread
+dltest2: dltest.c
+ $(CC) $(CFLAGS) -DLIBNAME="\"./libtest2.so\"" dltest.c -ldl -lpthread -o dltest2
-dlttest: dlttest.o
- $(CC) $(CFLAGS) -o dlttest dlttest.o -ldl -lpthread
+libtest2.so: libtest.c
+ $(CC) $(CFLAGS) -fPIC -shared -Wl,-soname,libtest2.so libtest.c -o libtest2.so -lpthread
-dlttest2: dlttest2.o
- $(CC) $(CFLAGS) -o dlttest2 dlttest2.o -ldl -lpthread
-
-run: dltest dlttest dlttest2 libhowdy.so
- @echo Running dltest
+run: dltest libtest.so dltest2 libtest2.so
+ ./dltest2
./dltest
- @echo Running dlttest
- ./dlttest
- @echo Running dlttest2
- ./dlttest2
clean:
- rm -f *.o *.so dltest2 dltest core libhowdy.so dlttest dlttest2
+ rm -f *.o dltest dltest2 libtest.so libtest2.so
+