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>
21 CFLAGS+=-DPTHREAD_KERNEL
22 CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \
24 CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
25 CFLAGS+=-I${.CURDIR}/sys
26 CFLAGS+=-I${SRCTOP}/libexec/rtld-elf
27 CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH}
28 CFLAGS+=-I${SRCTOP}/lib/libthread_db
31 CFLAGS.thr_stack.c+= -Wno-cast-align
32 .include <bsd.compiler.mk>
33 .if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300)
34 CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations
37 .ifndef NO_THREAD_UNWIND_STACK
39 CFLAGS+=-D_PTHREAD_FORCED_UNWIND
42 LDFLAGS+=-Wl,-znodelete
44 VERSION_DEF=${SRCTOP}/lib/libc/Versions.def
45 SYMBOL_MAPS=${.CURDIR}/pthread.map
49 # enable extra internal consistency checks
50 CFLAGS+=-D_PTHREADS_INVARIANTS
54 .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
56 .if exists(${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc)
57 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
59 .include "${.CURDIR}/sys/Makefile.inc"
60 .include "${.CURDIR}/thread/Makefile.inc"
62 .if ${MK_INSTALLLIB} != "no"
63 SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
66 SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
68 .if ${MK_PROFILE} != "no"
69 SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
72 .if ${MK_TESTS} != "no"