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