xref: /freebsd/lib/libthr/Makefile (revision c6ec7d31830ab1c80edae95ad5e4b9dba10c47ac)
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
11SHLIBDIR?= /lib
12
13.include <bsd.own.mk>
14MK_SSP=	no
15
16LIB=thr
17SHLIB_MAJOR= 3
18WARNS?=	3
19CFLAGS+=-DPTHREAD_KERNEL
20CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
21	-I${.CURDIR}/../../include
22CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
23CFLAGS+=-I${.CURDIR}/sys
24CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
25CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH}
26CFLAGS+=-I${.CURDIR}/../libthread_db
27CFLAGS+=-Winline
28
29.ifndef NO_THREAD_UNWIND_STACK
30CFLAGS+=-fexceptions
31CFLAGS+=-D_PTHREAD_FORCED_UNWIND
32.endif
33
34LDFLAGS+=-Wl,-znodelete
35
36VERSION_DEF=${.CURDIR}/../libc/Versions.def
37SYMBOL_MAPS=${.CURDIR}/pthread.map
38
39MAN=	libthr.3
40
41# enable extra internal consistancy checks
42CFLAGS+=-D_PTHREADS_INVARIANTS
43#CFLAGS+=-g
44
45PRECIOUSLIB=
46
47.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
48
49.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
50.include "${.CURDIR}/sys/Makefile.inc"
51.include "${.CURDIR}/thread/Makefile.inc"
52
53.if ${MK_INSTALLLIB} != "no"
54SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
55.endif
56.if !defined(NO_PIC)
57SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
58.endif
59.if ${MK_PROFILE} != "no"
60SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
61.endif
62
63.if !defined(WITHOUT_SYSCALL_COMPAT)
64CFLAGS+=-DSYSCALL_COMPAT
65.endif
66
67.include <bsd.lib.mk>
68