Update translations.
[glibc.git] / dlfcn / Makefile
blob6e0a014d99bca7dbf21c6b4375a3cc22128d05a5
1 # Copyright (C) 1995-2022 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
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.
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
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
18 subdir := dlfcn
20 include ../Makeconfig
22 headers := bits/dlfcn.h bits/dl_find_object.h dlfcn.h
23 extra-libs := libdl
24 libdl-routines := libdl-compat
25 routines = \
26 dladdr \
27 dladdr1 \
28 dlclose \
29 dlerror \
30 dlinfo \
31 dlmopen \
32 dlopen \
33 dlsym \
34 dlvsym \
35 libc_dlerror_result \
37 extra-libs-others := libdl
39 libdl-shared-only-routines += libdl-compat
41 # Pretend that libdl.so is a linker script, so that the symbolic
42 # link is not installed.
43 install-lib-ldscripts = libdl.so
44 $(inst_libdir)/libdl.so:
46 ifeq ($(build-shared),yes)
47 routines += dlopenold
48 shared-only-routines := dlopenold
49 endif
51 ifeq (yes,$(build-shared))
52 tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
53 bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
54 bug-atexit3 tstatexit bug-dl-leaf tst-rec-dlopen
55 endif
56 modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
57 defaultmod2 errmsg1mod modatexit modcxaatexit \
58 bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \
59 bug-atexit2-lib bug-dl-leaf-lib \
60 bug-dl-leaf-lib-cb moddummy1 moddummy2
62 failtestmod.so-no-z-defs = yes
63 glreflib2.so-no-z-defs = yes
64 errmsg1mod.so-no-z-defs = yes
66 ifeq (yes,$(build-shared))
67 tests += tststatic tststatic2 tststatic3 tststatic4 tststatic5
68 tests-static += tststatic tststatic2 tststatic3 tststatic4 tststatic5
69 modules-names += modstatic modstatic2 modstatic3 modstatic5
70 tststatic-ENV = LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)elf
71 tststatic2-ENV = $(tststatic-ENV)
72 tststatic3-ENV = $(tststatic-ENV)
73 tststatic4-ENV = $(tststatic-ENV)
74 tststatic5-ENV = $(tststatic-ENV)
76 ifneq (,$(CXX))
77 modules-names += bug-atexit3-lib
78 else
79 tests-unsupported += bug-atexit3
80 endif
81 endif
83 extra-test-objs += $(modules-names:=.os)
84 generated += $(modules-names:=.so)
86 include ../Rules
88 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
90 ifeq ($(build-shared),yes)
91 # Build all the modules even when not actually running test programs.
92 tests: $(test-modules)
93 endif
95 $(objpfx)glrefmain.out: $(objpfx)glrefmain \
96 $(objpfx)glreflib1.so $(objpfx)glreflib2.so
98 $(objpfx)failtest.out: $(objpfx)failtestmod.so
100 $(objpfx)tst-dladdr.out: $(objpfx)glreflib1.so
102 $(objpfx)tst-dlinfo.out: $(objpfx)glreflib3.so
103 LDFLAGS-glreflib3.so = -Wl,-rpath,:
105 LDFLAGS-default = $(LDFLAGS-rdynamic)
106 $(objpfx)default: $(objpfx)defaultmod1.so $(objpfx)defaultmod2.so
107 LDFLAGS-defaultmod2.so = $(LDFLAGS-Bsymbolic)
109 $(objpfx)errmsg1.out: $(objpfx)errmsg1 $(objpfx)errmsg1mod.so
111 $(objpfx)tstatexit.out: $(objpfx)tstatexit $(objpfx)modatexit.so
113 $(objpfx)tstcxaatexit.out: $(objpfx)tstcxaatexit $(objpfx)modcxaatexit.so
115 $(objpfx)tststatic.out: $(objpfx)tststatic $(objpfx)modstatic.so
117 $(objpfx)tststatic2.out: $(objpfx)tststatic2 $(objpfx)modstatic.so \
118 $(objpfx)modstatic2.so
120 $(objpfx)tststatic3.out: $(objpfx)tststatic3 $(objpfx)modstatic3.so
122 $(objpfx)tststatic4.out: $(objpfx)tststatic4 $(objpfx)modstatic3.so
124 $(objpfx)tststatic5.out: $(objpfx)tststatic5 $(objpfx)modstatic5.so
126 $(objpfx)bug-dlsym1: $(objpfx)bug-dlsym1-lib2.so
127 $(objpfx)bug-dlsym1.out: $(objpfx)bug-dlsym1-lib1.so \
128 $(objpfx)bug-dlsym1-lib2.so
129 $(objpfx)bug-dlsym1-lib1.so: $(objpfx)bug-dlsym1-lib2.so
131 $(objpfx)bug-atexit1.out: $(objpfx)bug-atexit1-lib.so
133 $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
135 ifneq (,$(CXX))
136 LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh
137 $(objpfx)bug-atexit3-lib.so: $(libsupport)
138 $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
139 endif
141 $(objpfx)bug-dl-leaf: $(objpfx)bug-dl-leaf-lib.so
142 $(objpfx)bug-dl-leaf.out: $(objpfx)bug-dl-leaf-lib-cb.so
143 $(objpfx)bug-dl-leaf-lib-cb.so: $(objpfx)bug-dl-leaf-lib.so
145 $(objpfx)tst-rec-dlopen.out: $(objpfx)moddummy1.so $(objpfx)moddummy2.so