]>
Commit | Line | Data |
---|---|---|
568035b7 | 1 | # Copyright (C) 1995-2013 Free Software Foundation, Inc. |
94e365c6 UD |
2 | # This file is part of the GNU C Library. |
3 | ||
4 | # The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
5 | # modify it under the terms of the GNU Lesser General Public |
6 | # License as published by the Free Software Foundation; either | |
7 | # version 2.1 of the License, or (at your option) any later version. | |
94e365c6 UD |
8 | |
9 | # The GNU C Library is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | # Lesser General Public License for more details. |
94e365c6 | 13 | |
41bdb6e2 | 14 | # You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
15 | # License along with the GNU C Library; if not, see |
16 | # <http://www.gnu.org/licenses/>. | |
94e365c6 UD |
17 | |
18 | subdir := dlfcn | |
019e7a64 | 19 | headers := bits/dlfcn.h dlfcn.h |
94e365c6 | 20 | extra-libs := libdl |
c0f62c56 | 21 | libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr dladdr1 dlinfo \ |
9dcafc55 UD |
22 | dlmopen dlfcn |
23 | routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines))) | |
5f21997b | 24 | elide-routines.os := $(routines) |
94e365c6 UD |
25 | |
26 | extra-libs-others := libdl | |
27 | ||
28 | include ../Makeconfig | |
29 | ||
30 | ifeq ($(versioning),yes) | |
31 | libdl-routines += dlopenold | |
9dcafc55 | 32 | libdl-shared-only-routines := dlopenold dlfcn |
94e365c6 UD |
33 | endif |
34 | ||
4380ef5e | 35 | ifeq (yes,$(build-shared)) |
c3fd12a2 | 36 | tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ |
6de1f625 | 37 | bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ |
11bf311e | 38 | bug-atexit3 tstatexit |
4380ef5e | 39 | endif |
1c298d08 UD |
40 | modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ |
41 | defaultmod2 errmsg1mod modatexit modcxaatexit \ | |
7237d704 | 42 | bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ |
6de1f625 | 43 | bug-atexit2-lib bug-atexit3-lib |
be1152ca | 44 | |
1a379ea0 UD |
45 | failtestmod.so-no-z-defs = yes |
46 | glreflib2.so-no-z-defs = yes | |
47 | errmsg1mod.so-no-z-defs = yes | |
48 | ||
2119dcfa | 49 | ifeq (yes,$(build-shared)) |
5f21997b UD |
50 | tests += tststatic tststatic2 |
51 | tests-static += tststatic tststatic2 | |
52 | modules-names += modstatic modstatic2 | |
5b643faf | 53 | tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf |
5f21997b | 54 | tststatic2-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf |
be1152ca UD |
55 | endif |
56 | ||
376e973a | 57 | extra-test-objs += $(modules-names:=.os) |
68eefde7 | 58 | generated := $(modules-names:=.so) |
4380ef5e | 59 | |
94e365c6 | 60 | include ../Rules |
4380ef5e UD |
61 | |
62 | test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names))) | |
4380ef5e | 63 | |
5181d776 RM |
64 | ifeq ($(build-shared),yes) |
65 | # Build all the modules even when not actually running test programs. | |
66 | tests: $(test-modules) | |
67 | endif | |
68 | ||
00213fe4 | 69 | $(objpfx)glrefmain: $(libdl) |
4380ef5e UD |
70 | $(objpfx)glrefmain.out: $(objpfx)glrefmain \ |
71 | $(objpfx)glreflib1.so $(objpfx)glreflib2.so | |
d743ba1e UD |
72 | |
73 | $(objpfx)failtest: $(libdl) | |
74 | $(objpfx)failtest.out: $(objpfx)failtestmod.so | |
00213fe4 AJ |
75 | |
76 | $(objpfx)tst-dladdr: $(libdl) | |
77 | $(objpfx)tst-dladdr.out: $(objpfx)glreflib1.so | |
3fe40015 | 78 | |
45e4762c | 79 | $(objpfx)tst-dlinfo: $(libdl) |
1c298d08 UD |
80 | $(objpfx)tst-dlinfo.out: $(objpfx)glreflib3.so |
81 | LDFLAGS-glreflib3.so = -Wl,-rpath,: | |
45e4762c | 82 | |
ad10cac8 | 83 | LDFLAGS-default = $(LDFLAGS-rdynamic) |
3fe40015 | 84 | $(objpfx)default: $(libdl) $(objpfx)defaultmod1.so $(objpfx)defaultmod2.so |
765ade4b | 85 | $(objpfx)defaultmod1.so: $(libdl) |
ad10cac8 | 86 | LDFLAGS-defaultmod2.so = $(LDFLAGS-Bsymbolic) |
765ade4b | 87 | $(objpfx)defaultmod2.so: $(libdl) |
f116c77f UD |
88 | |
89 | $(objpfx)errmsg1: $(libdl) | |
90 | $(objpfx)errmsg1.out: $(objpfx)errmsg1 $(objpfx)errmsg1mod.so | |
c08bc50a UD |
91 | |
92 | $(objpfx)tstatexit: $(libdl) | |
93 | $(objpfx)tstatexit.out: $(objpfx)tstatexit $(objpfx)modatexit.so | |
94 | ||
95 | $(objpfx)tstcxaatexit: $(libdl) | |
96 | $(objpfx)tstcxaatexit.out: $(objpfx)tstcxaatexit $(objpfx)modcxaatexit.so | |
97 | ||
be1152ca UD |
98 | $(objpfx)tststatic: $(objpfx)libdl.a |
99 | $(objpfx)tststatic.out: $(objpfx)tststatic $(objpfx)modstatic.so | |
100 | ||
5f21997b UD |
101 | $(objpfx)tststatic2: $(objpfx)libdl.a |
102 | $(objpfx)tststatic2.out: $(objpfx)tststatic2 $(objpfx)modstatic.so \ | |
103 | $(objpfx)modstatic2.so | |
104 | ||
765ade4b | 105 | $(objpfx)modstatic2.so: $(libdl) |
be1152ca | 106 | |
472d82fc UD |
107 | $(objpfx)bug-dlopen1: $(libdl) |
108 | ||
c3fd12a2 RM |
109 | $(objpfx)bug-dlsym1: $(libdl) $(objpfx)bug-dlsym1-lib2.so |
110 | $(objpfx)bug-dlsym1.out: $(objpfx)bug-dlsym1-lib1.so \ | |
111 | $(objpfx)bug-dlsym1-lib2.so | |
765ade4b | 112 | $(objpfx)bug-dlsym1-lib1.so: $(objpfx)bug-dlsym1-lib2.so |
c3fd12a2 | 113 | |
7237d704 UD |
114 | $(objpfx)bug-atexit1: $(libdl) |
115 | $(objpfx)bug-atexit1.out: $(objpfx)bug-atexit1-lib.so | |
7237d704 UD |
116 | |
117 | $(objpfx)bug-atexit2: $(libdl) | |
118 | $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so | |
c3fd12a2 | 119 | |
fab7ce3f | 120 | LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh |
6de1f625 UD |
121 | $(objpfx)bug-atexit3: $(libdl) |
122 | $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so |