]> git.ipfire.org Git - thirdparty/glibc.git/blame - dlfcn/Makefile
Fix fallout from Joseph's untested Makeconfig change.
[thirdparty/glibc.git] / dlfcn / Makefile
CommitLineData
d4697bc9 1# Copyright (C) 1995-2014 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
18subdir := dlfcn
a5f891ac
JM
19
20include ../Makeconfig
21
019e7a64 22headers := bits/dlfcn.h dlfcn.h
94e365c6 23extra-libs := libdl
c0f62c56 24libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr dladdr1 dlinfo \
9dcafc55
UD
25 dlmopen dlfcn
26routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines)))
5f21997b 27elide-routines.os := $(routines)
94e365c6
UD
28
29extra-libs-others := libdl
30
3f2e46a4 31ifeq ($(build-shared),yes)
94e365c6 32libdl-routines += dlopenold
9dcafc55 33libdl-shared-only-routines := dlopenold dlfcn
94e365c6
UD
34endif
35
4380ef5e 36ifeq (yes,$(build-shared))
c3fd12a2 37tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
6de1f625 38 bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
3b813b29 39 bug-atexit3 tstatexit bug-dl-leaf
4380ef5e 40endif
1c298d08
UD
41modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
42 defaultmod2 errmsg1mod modatexit modcxaatexit \
7237d704 43 bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \
3b813b29
MF
44 bug-atexit2-lib bug-atexit3-lib bug-dl-leaf-lib \
45 bug-dl-leaf-lib-cb
be1152ca 46
1a379ea0
UD
47failtestmod.so-no-z-defs = yes
48glreflib2.so-no-z-defs = yes
49errmsg1mod.so-no-z-defs = yes
50
2119dcfa 51ifeq (yes,$(build-shared))
3d0f5d0c
MR
52tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5
53tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5
54modules-names += modstatic modstatic2 modstatic3 modstatic5
5b643faf 55tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
f3bc5e5a 56tststatic2-ENV = $(tststatic-ENV)
f91f1c0f
MR
57tststatic3-ENV = $(tststatic-ENV)
58tststatic4-ENV = $(tststatic-ENV)
3d0f5d0c 59tststatic5-ENV = $(tststatic-ENV)
be1152ca
UD
60endif
61
376e973a 62extra-test-objs += $(modules-names:=.os)
f08e9a26 63generated += $(modules-names:=.so)
4380ef5e 64
94e365c6 65include ../Rules
4380ef5e
UD
66
67test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
4380ef5e 68
5181d776
RM
69ifeq ($(build-shared),yes)
70# Build all the modules even when not actually running test programs.
71tests: $(test-modules)
72endif
73
00213fe4 74$(objpfx)glrefmain: $(libdl)
4380ef5e
UD
75$(objpfx)glrefmain.out: $(objpfx)glrefmain \
76 $(objpfx)glreflib1.so $(objpfx)glreflib2.so
d743ba1e
UD
77
78$(objpfx)failtest: $(libdl)
79$(objpfx)failtest.out: $(objpfx)failtestmod.so
00213fe4
AJ
80
81$(objpfx)tst-dladdr: $(libdl)
82$(objpfx)tst-dladdr.out: $(objpfx)glreflib1.so
3fe40015 83
45e4762c 84$(objpfx)tst-dlinfo: $(libdl)
1c298d08
UD
85$(objpfx)tst-dlinfo.out: $(objpfx)glreflib3.so
86LDFLAGS-glreflib3.so = -Wl,-rpath,:
45e4762c 87
ad10cac8 88LDFLAGS-default = $(LDFLAGS-rdynamic)
3fe40015 89$(objpfx)default: $(libdl) $(objpfx)defaultmod1.so $(objpfx)defaultmod2.so
765ade4b 90$(objpfx)defaultmod1.so: $(libdl)
ad10cac8 91LDFLAGS-defaultmod2.so = $(LDFLAGS-Bsymbolic)
765ade4b 92$(objpfx)defaultmod2.so: $(libdl)
f116c77f
UD
93
94$(objpfx)errmsg1: $(libdl)
95$(objpfx)errmsg1.out: $(objpfx)errmsg1 $(objpfx)errmsg1mod.so
c08bc50a
UD
96
97$(objpfx)tstatexit: $(libdl)
98$(objpfx)tstatexit.out: $(objpfx)tstatexit $(objpfx)modatexit.so
99
100$(objpfx)tstcxaatexit: $(libdl)
101$(objpfx)tstcxaatexit.out: $(objpfx)tstcxaatexit $(objpfx)modcxaatexit.so
102
be1152ca
UD
103$(objpfx)tststatic: $(objpfx)libdl.a
104$(objpfx)tststatic.out: $(objpfx)tststatic $(objpfx)modstatic.so
105
5f21997b
UD
106$(objpfx)tststatic2: $(objpfx)libdl.a
107$(objpfx)tststatic2.out: $(objpfx)tststatic2 $(objpfx)modstatic.so \
108 $(objpfx)modstatic2.so
109
765ade4b 110$(objpfx)modstatic2.so: $(libdl)
be1152ca 111
f91f1c0f
MR
112$(objpfx)tststatic3: $(objpfx)libdl.a
113$(objpfx)tststatic3.out: $(objpfx)tststatic3 $(objpfx)modstatic3.so
114
115$(objpfx)tststatic4: $(objpfx)libdl.a
116$(objpfx)tststatic4.out: $(objpfx)tststatic4 $(objpfx)modstatic3.so
117
3d0f5d0c
MR
118$(objpfx)tststatic5: $(objpfx)libdl.a
119$(objpfx)tststatic5.out: $(objpfx)tststatic5 $(objpfx)modstatic5.so
120
472d82fc
UD
121$(objpfx)bug-dlopen1: $(libdl)
122
c3fd12a2
RM
123$(objpfx)bug-dlsym1: $(libdl) $(objpfx)bug-dlsym1-lib2.so
124$(objpfx)bug-dlsym1.out: $(objpfx)bug-dlsym1-lib1.so \
125 $(objpfx)bug-dlsym1-lib2.so
765ade4b 126$(objpfx)bug-dlsym1-lib1.so: $(objpfx)bug-dlsym1-lib2.so
c3fd12a2 127
7237d704
UD
128$(objpfx)bug-atexit1: $(libdl)
129$(objpfx)bug-atexit1.out: $(objpfx)bug-atexit1-lib.so
7237d704
UD
130
131$(objpfx)bug-atexit2: $(libdl)
132$(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
c3fd12a2 133
fab7ce3f 134LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh
6de1f625
UD
135$(objpfx)bug-atexit3: $(libdl)
136$(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
3b813b29
MF
137
138$(objpfx)bug-dl-leaf: $(objpfx)bug-dl-leaf-lib.so
139$(objpfx)bug-dl-leaf.out: $(objpfx)bug-dl-leaf-lib-cb.so
140$(objpfx)bug-dl-leaf-lib.so: $(libdl)
141$(objpfx)bug-dl-leaf-lib-cb.so: $(objpfx)bug-dl-leaf-lib.so