]> git.ipfire.org Git - thirdparty/glibc.git/blame - linuxthreads/Makefile
Update.
[thirdparty/glibc.git] / linuxthreads / Makefile
CommitLineData
3bbddbe4 1# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
5afdca00
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
5# modify it under the terms of the GNU Library General Public License as
6# published by the Free Software Foundation; either version 2 of the
7# 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
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# Library General Public License for more details.
13
14# You should have received a copy of the GNU Library General Public
15# License along with the GNU C Library; see the file COPYING.LIB. If not,
16# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17# Boston, MA 02111-1307, USA.
18
19#
20# Sub-makefile for linuxthreads portion of the library.
21#
22subdir := linuxthreads
23
7cabd57c
UD
24linuxthreads-version := $(shell sed -n 's/^.*$(subdir)-\([0-9.]*\).*$$/\1/p' \
25 Banner)
5afdca00 26
f8afba91 27headers := pthread.h semaphore.h
5afdca00
UD
28distribute := internals.h queue.h restart.h spinlock.h
29
348ed515 30routines := weaks no-tsd
5afdca00
UD
31
32extra-libs := libpthread
33extra-libs-others := $(extra-libs)
34
35libpthread-routines := attr cancel condvar join manager mutex ptfork \
8619129f 36 ptlongjmp pthread signals specific errno lockfile \
c2fa5b5a 37 semaphore spinlock wrapsyscall rwlock pt-machine \
697568d1 38 oldsemaphore events getcpuclockid pspinlock barrier
5afdca00 39
0fb7851f
UD
40nodelete-yes = -Wl,--enable-new-dtags,-z,nodelete
41LDFLAGS-pthread.so = $(nodelete-$(have-z-nodelete))
42
0302fece 43vpath %.c Examples
e64911d1 44
ad7534c8
UD
45include ../Makeconfig
46
e64911d1 47librt-tests = ex10 ex11
64f6b8f3 48tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \
3bbddbe4 49 tststack $(tests-nodelete-$(have-z-nodelete)) ecmutex ex14 ex15
ad7534c8
UD
50
51ifeq (yes,$(build-shared))
52tests-nodelete-yes = unload
53endif
0302fece 54
5afdca00
UD
55include ../Rules
56
97dac76c
UD
57CFLAGS-mutex.c += -D__NO_WEAK_PTHREAD_ALIASES
58CFLAGS-specific.c += -D__NO_WEAK_PTHREAD_ALIASES
59CFLAGS-pthread.c += -D__NO_WEAK_PTHREAD_ALIASES
60CFLAGS-ptfork.c += -D__NO_WEAK_PTHREAD_ALIASES
61CFLAGS-cancel.c += -D__NO_WEAK_PTHREAD_ALIASES
ad7534c8 62CFLAGS-unload.c += -DPREFIX=\"$(objpfx)\"
97dac76c 63
5afdca00
UD
64# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
65# This ensures they will load libc.so for needed symbols if loaded by
66# a statically-linked program that hasn't already loaded it.
67$(objpfx)libpthread.so: $(common-objpfx)libc.so
0302fece
UD
68
69# Make sure we link with the thread library.
df455ccb 70ifeq ($(build-shared),yes)
e64911d1
GM
71$(addprefix $(objpfx),$(tests)): $(objpfx)libpthread.so
72$(addprefix $(objpfx),$(librt-tests)): $(common-objpfx)rt/librt.so
ad7534c8 73$(objpfx)unload: $(common-objpfx)dlfcn/libdl.so
df455ccb 74else
e64911d1
GM
75$(addprefix $(objpfx),$(tests)): $(objpfx)libpthread.a
76$(addprefix $(objpfx),$(librt-tests)): $(common-objpfx)rt/librt.a
77endif
78ifeq ($(build-bounded),yes)
79$(tests:%=$(objpfx)%-bp): $(objpfx)libpthread_b.a
80$(librt-tests:%=$(objpfx)%-bp): $(common-objpfx)rt/librt_b.a
df455ccb 81endif