]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - lib/libthr/Makefile
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / lib / libthr / Makefile
1 # $FreeBSD$
2 #
3 # All library objects contain FreeBSD revision strings by default; they may be
4 # excluded as a space-saving measure.  To produce a library that does
5 # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
6 # below.  Note, there are no IDs for syscall stubs whose sources are generated.
7 # To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
8 # (for system call stubs) to CFLAGS below.  -DSYSLIBC_SCCS affects just the
9 # system call stubs.
10
11 SHLIBDIR?= /lib
12
13 .include <bsd.own.mk>
14 MK_SSP= no
15
16 LIB=thr
17 SHLIB_MAJOR= 3
18 WARNS?= 3
19 CFLAGS+=-DPTHREAD_KERNEL
20 CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
21         -I${.CURDIR}/../../include
22 CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
23 CFLAGS+=-I${.CURDIR}/sys
24 CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
25 CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH}
26 CFLAGS+=-I${.CURDIR}/../libthread_db
27 CFLAGS+=-Winline
28
29 .ifndef NO_THREAD_UNWIND_STACK
30 CFLAGS+=-fexceptions
31 CFLAGS+=-D_PTHREAD_FORCED_UNWIND
32 .endif
33
34 LDFLAGS+=-Wl,-znodelete
35
36 VERSION_DEF=${.CURDIR}/../libc/Versions.def
37 SYMBOL_MAPS=${.CURDIR}/pthread.map
38
39 MAN=    libthr.3
40
41 # enable extra internal consistancy checks
42 CFLAGS+=-D_PTHREADS_INVARIANTS
43
44 PRECIOUSLIB=
45
46 .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
47
48 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
49 .include "${.CURDIR}/sys/Makefile.inc"
50 .include "${.CURDIR}/thread/Makefile.inc"
51
52 .if ${MK_INSTALLLIB} != "no"
53 SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
54 .endif
55 .if !defined(NO_PIC)
56 SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
57 .endif
58 .if ${MK_PROFILE} != "no"
59 SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
60 .endif
61
62 .if !defined(WITHOUT_SYSCALL_COMPAT)
63 CFLAGS+=-DSYSCALL_COMPAT
64 .endif
65
66 .if ${MK_TESTS} != "no"
67 SUBDIR+=        tests
68 .endif
69
70 .include <bsd.lib.mk>