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 19NO_WTHREAD_SAFETY=1 20NO_WCAST_ALIGN.gcc=1 # for gcc 4.2 21CFLAGS+=-DPTHREAD_KERNEL 22CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}/thread \ 23 -I${SRCTOP}/include 24CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include 25CFLAGS+=-I${.CURDIR}/sys 26CFLAGS+=-I${SRCTOP}/libexec/rtld-elf 27CFLAGS+=-I${SRCTOP}/libexec/rtld-elf/${MACHINE_CPUARCH} 28CFLAGS+=-I${SRCTOP}/lib/libthread_db 29CFLAGS+=-Winline 30 31CFLAGS.thr_stack.c+= -Wno-cast-align 32.include <bsd.compiler.mk> 33.if !(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 40300) 34CFLAGS.thr_symbols.c+= -Wno-missing-variable-declarations 35.endif 36 37.ifndef NO_THREAD_UNWIND_STACK 38CFLAGS+=-fexceptions 39CFLAGS+=-D_PTHREAD_FORCED_UNWIND 40.endif 41 42LDFLAGS+=-Wl,-znodelete 43 44VERSION_DEF=${SRCTOP}/lib/libc/Versions.def 45SYMBOL_MAPS=${.CURDIR}/pthread.map 46 47MAN= libthr.3 48 49# enable extra internal consistency checks 50CFLAGS+=-D_PTHREADS_INVARIANTS 51 52PRECIOUSLIB= 53 54.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} 55 56.if exists(${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc) 57.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" 58.endif 59.include "${.CURDIR}/sys/Makefile.inc" 60.include "${.CURDIR}/thread/Makefile.inc" 61 62.if ${MK_INSTALLLIB} != "no" 63SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a 64.endif 65.if !defined(NO_PIC) 66SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so 67.endif 68.if ${MK_PROFILE} != "no" 69SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a 70.endif 71 72HAS_TESTS= 73SUBDIR.${MK_TESTS}+= tests 74 75.include <bsd.lib.mk> 76