]> git.ipfire.org Git - thirdparty/glibc.git/blame - htl/Makefile
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / htl / Makefile
CommitLineData
33574c17 1#
2b778ceb 2# Copyright (C) 1994-2021 Free Software Foundation, Inc.
33574c17 3#
ad2b41bf
ST
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.
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
33574c17 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ad2b41bf
ST
12# Lesser General Public License for more details.
13
14# You should have received a copy of the GNU Lesser General Public
15# License along with the GNU C Library; if not, see
5a82c748 16# <https://www.gnu.org/licenses/>.
33574c17
ST
17
18subdir := htl
19
20srcdir = .
21
22MICROKERNEL := mach
23SYSDEPS := lockfile
24
25LCLHDRS :=
26
27libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \
28 pt-attr-getguardsize pt-attr-getinheritsched \
29 pt-attr-getschedparam pt-attr-getschedpolicy pt-attr-getscope \
30 pt-attr-getstack pt-attr-getstackaddr pt-attr-getstacksize \
31 pt-attr-init pt-attr-setdetachstate pt-attr-setguardsize \
32 pt-attr-setinheritsched pt-attr-setschedparam \
33 pt-attr-setschedpolicy pt-attr-setscope pt-attr-setstack \
34 pt-attr-setstackaddr pt-attr-setstacksize \
35 \
36 pt-barrier-destroy pt-barrier-init pt-barrier-wait \
37 pt-barrier pt-barrierattr-destroy pt-barrierattr-init \
38 pt-barrierattr-getpshared pt-barrierattr-setpshared \
39 \
40 pt-destroy-specific pt-init-specific \
41 pt-key-create pt-key-delete \
42 pt-getspecific pt-setspecific \
43 \
44 pt-once \
45 \
46 pt-alloc \
47 pt-create \
48 pt-getattr \
49 pt-equal \
50 pt-dealloc \
51 pt-detach \
52 pt-exit \
53 pt-initialize \
54 pt-join \
55 pt-self \
56 pt-sigmask \
57 pt-spin-inlines \
58 pt-cleanup \
59 pt-setcancelstate \
60 pt-setcanceltype \
61 pt-testcancel \
62 pt-cancel \
63 \
33574c17
ST
64 pt-mutexattr-destroy pt-mutexattr-init \
65 pt-mutexattr-getprioceiling pt-mutexattr-getprotocol \
66 pt-mutexattr-getpshared pt-mutexattr-gettype \
67 pt-mutexattr-setprioceiling pt-mutexattr-setprotocol \
68 pt-mutexattr-setpshared pt-mutexattr-settype \
69 pt-mutexattr-getrobust pt-mutexattr-setrobust \
70 \
cd94860c 71 pt-mutex-init pt-mutex-destroy pt-mutex-checklocked \
33574c17
ST
72 pt-mutex-lock pt-mutex-trylock pt-mutex-timedlock \
73 pt-mutex-unlock \
74 pt-mutex-transfer-np \
75 pt-mutex-getprioceiling pt-mutex-setprioceiling \
76 pt-mutex-consistent \
77 \
78 pt-rwlock-attr \
79 pt-rwlockattr-init pt-rwlockattr-destroy \
80 pt-rwlockattr-getpshared pt-rwlockattr-setpshared \
81 \
82 pt-rwlock-init pt-rwlock-destroy \
83 pt-rwlock-rdlock pt-rwlock-tryrdlock \
84 pt-rwlock-trywrlock pt-rwlock-wrlock \
85 pt-rwlock-timedrdlock pt-rwlock-timedwrlock \
86 pt-rwlock-unlock \
87 \
88 pt-cond \
89 pt-condattr-init pt-condattr-destroy \
90 pt-condattr-getclock pt-condattr-getpshared \
91 pt-condattr-setclock pt-condattr-setpshared \
92 \
93 pt-cond-destroy pt-cond-init \
94 pt-cond-brdcast \
95 pt-cond-signal \
96 pt-cond-wait \
97 pt-cond-timedwait \
98 pt-hurd-cond-wait \
99 pt-hurd-cond-timedwait \
100 \
101 pt-stack-alloc \
102 pt-thread-alloc \
103 pt-thread-start \
104 pt-thread-terminate \
105 pt-startup \
106 \
107 pt-getconcurrency pt-setconcurrency \
108 \
109 pt-block \
110 pt-timedblock \
e9644c20
ST
111 pt-block-intr \
112 pt-timedblock-intr \
33574c17
ST
113 pt-wakeup \
114 pt-docancel \
115 pt-sysdep \
116 pt-setup \
117 pt-machdep \
118 pt-spin \
119 \
120 pt-sigstate-init \
121 pt-sigstate-destroy \
122 pt-sigstate \
123 \
33574c17
ST
124 old_pt-atfork \
125 pt-kill \
126 pt-getcpuclockid \
127 \
128 pt-getschedparam pt-setschedparam pt-setschedprio \
129 pt-yield \
130 \
749cd2ca
ST
131 sem_close sem-destroy sem-getvalue sem-init sem_open \
132 sem-post sem-timedwait sem-trywait sem_unlink \
c8f94212 133 sem-wait sem-waitfast \
33574c17
ST
134 \
135 shm-directory \
136 \
59b7fe99 137 cancellation \
33574c17 138 cthreads-compat \
25c084e0 139 herrno \
33574c17
ST
140 $(SYSDEPS)
141
33574c17
ST
142headers := \
143 pthread.h \
144 semaphore.h \
145 \
146 bits/pthread.h \
147 bits/pthread-np.h \
148 bits/pthreadtypes.h \
149 bits/pthreadtypes-arch.h \
150 bits/thread-shared-types.h \
151 bits/types/struct___pthread_mutex.h \
152 bits/types/struct___pthread_cond.h \
153 bits/types/struct___pthread_condattr.h \
154 bits/types/__pthread_spinlock_t.h \
155 bits/spin-lock-inline.h \
156 bits/cancelation.h \
157 bits/types/struct___pthread_attr.h \
158 bits/types/struct___pthread_barrierattr.h \
159 bits/types/struct___pthread_barrier.h \
160 bits/types/__pthread_key.h \
161 bits/types/struct___pthread_once.h \
162 bits/types/struct___pthread_mutexattr.h \
163 bits/types/struct___pthread_rwlock.h \
164 bits/types/struct___pthread_rwlockattr.h \
165 bits/semaphore.h
166
167distribute :=
168
6db1094f 169routines := forward libc_pthread_init alloca_cutoff register-atfork pt-atfork
33574c17 170shared-only-routines = forward
50a78baa 171static-only-routines = pt-atfork
33574c17
ST
172
173extra-libs := libpthread
174extra-libs-others := $(extra-libs)
175install-lib := libpthread.so
bc9cf8fb 176install-lib-ldscripts := libpthread_syms.a
33574c17
ST
177
178include ../Makeconfig
179
180CFLAGS-lockfile.c = -D_IO_MTSAFE_IO
181
182all: # Make this the default target; it will be defined in Rules.
183
bc9cf8fb 184subdir_install: $(inst_libdir)/libpthread2.a $(inst_libdir)/libpthread_syms.a
33574c17
ST
185
186# XXX: If $(inst_libdir)/libpthread2.a is installed and
187# $(inst_libdir)/libpthread is not, we can have some issues.
188.PHONY: $(inst_libdir)/libpthread.a $(inst_libdir)/libpthread_pic.a
189
190# XXX: These rules are a hack. But it is better than messing with
191# ../Makeconf at the moment. Note that the linker scripts
192# $(srcdir)/libpthread.a and $(srcdir)/libpthread_pic.a get overwritten
193# when building in $(srcdir) and not a seperate build directory.
194$(inst_libdir)/libpthread2.a: $(inst_libdir)/libpthread.a
195 mv $< $@
196 $(INSTALL_DATA) $(srcdir)/libpthread.a $<
197
198$(inst_libdir)/libpthread2_pic.a: $(inst_libdir)/libpthread_pic.a
199 mv $< $@
200 $(INSTALL_DATA) $(srcdir)/libpthread_pic.a $<
201
bc9cf8fb
ST
202$(inst_libdir)/libpthread_syms.a: $(srcdir)/libpthread_syms.a $(+force)
203 $(do-install)
204
33574c17
ST
205libc-link.so = $(common-objpfx)libc.so
206
207extra-B-pthread.so = -B$(common-objpfx)htl/
e2b9d562 208LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
33574c17
ST
209
210include ../Rules
dd7a8ad7
ST
211
212# Make sure we link with the thread library.
213ifeq ($(build-shared),yes)
214$(addprefix $(objpfx), \
215 $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
216 $(tests-nolibpthread), \
217 $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \
218 $(objpfx)libpthread.so
219$(objpfx)tst-unload: $(libdl)
220# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
221# since otherwise libpthread.so comes before libc.so when linking.
222$(addprefix $(objpfx), $(tests-reverse)): \
223 $(objpfx)../libc.so $(objpfx)libpthread.so
224$(objpfx)../libc.so: $(common-objpfx)libc.so ;
bc9cf8fb 225$(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(srcdir)/libpthread_syms.a $(objpfx)libpthread.a
dd7a8ad7 226else
bc9cf8fb 227$(addprefix $(objpfx),$(tests) $(test-srcs)): $(srcdir)/libpthread_syms.a $(objpfx)libpthread.a
dd7a8ad7 228endif