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
14 .include <src.opts.mk>
20 CFLAGS+=-DPTHREAD_KERNEL
21 CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
22 -I${.CURDIR}/../../include
23 CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
24 CFLAGS+=-I${.CURDIR}/sys
25 CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
26 CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH}
27 CFLAGS+=-I${.CURDIR}/../libthread_db
30 .ifndef NO_THREAD_UNWIND_STACK
32 CFLAGS+=-D_PTHREAD_FORCED_UNWIND
35 LDFLAGS+=-Wl,-znodelete
37 VERSION_DEF=${.CURDIR}/../libc/Versions.def
38 SYMBOL_MAPS=${.CURDIR}/pthread.map
42 # enable extra internal consistency checks
43 CFLAGS+=-D_PTHREADS_INVARIANTS
47 .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
49 .if exists(${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc)
50 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
52 .include "${.CURDIR}/sys/Makefile.inc"
53 .include "${.CURDIR}/thread/Makefile.inc"
55 .if ${MK_INSTALLLIB} != "no"
56 SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
59 SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
61 .if ${MK_PROFILE} != "no"
62 SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
65 .if ${MK_TESTS} != "no"