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