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