1bb535300SJeff Roberson# $FreeBSD$ 2bb535300SJeff Roberson# 3bb535300SJeff Roberson# All library objects contain FreeBSD revision strings by default; they may be 4bb535300SJeff Roberson# excluded as a space-saving measure. To produce a library that does 5bb535300SJeff Roberson# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 6bb535300SJeff Roberson# below. Note, there are no IDs for syscall stubs whose sources are generated. 7bb535300SJeff Roberson# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 8bb535300SJeff Roberson# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the 9bb535300SJeff Roberson# system call stubs. 105740a2b6SRuslan Ermilov 1100fb440cSDaniel Eischen.include <bsd.own.mk> 1200fb440cSDaniel Eischen 13946367b8SDavid E. O'Brien.if (${DEFAULT_THREAD_LIB} == "libthr" || ${MK_LIBKSE} == "no") && \ 14948809b1SRuslan Ermilov ${SHLIBDIR} == "/usr/lib" 15683f4c0aSDaniel EischenSHLIBDIR= /lib 16683f4c0aSDaniel Eischen.endif 17683f4c0aSDaniel Eischen 18bb535300SJeff RobersonLIB=thr 19419ecd5dSDaniel EischenSHLIB_MAJOR= 3 20a091d823SDavid XuCFLAGS+=-DPTHREAD_KERNEL 21bb535300SJeff RobersonCFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \ 22bb535300SJeff Roberson -I${.CURDIR}/../../include 23a091d823SDavid XuCFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include 24a091d823SDavid XuCFLAGS+=-I${.CURDIR}/sys 25e6f19330SDoug RabsonCFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf 26a091d823SDavid XuCFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH} 27d245d9e1SDavid XuCFLAGS+=-I${.CURDIR}/../libthread_db 28a091d823SDavid XuCFLAGS+=-Winline 29a091d823SDavid Xu 30a9b9744fSDag-Erling SmørgravVERSION_DEF=${.CURDIR}/../libc/Versions.def 31a9b9744fSDag-Erling SmørgravSYMBOL_MAPS=${.CURDIR}/pthread.map 32bb535300SJeff Roberson 335335c6bcSRobert WatsonMAN= libthr.3 345335c6bcSRobert Watson 35bb535300SJeff Roberson# enable extra internal consistancy checks 3644a31c2dSDavid XuCFLAGS+=-D_PTHREADS_INVARIANTS 37649814ddSDavid Xu#CFLAGS+=-g 38bb535300SJeff Roberson 39a35d8893SRuslan ErmilovPRECIOUSLIB= 40bb535300SJeff Roberson 417a57e9abSJeff Roberson.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" 42a091d823SDavid Xu.include "${.CURDIR}/sys/Makefile.inc" 43a091d823SDavid Xu.include "${.CURDIR}/thread/Makefile.inc" 44bb535300SJeff Roberson 45946367b8SDavid E. O'Brien.if ${DEFAULT_THREAD_LIB} == "libthr" || ${MK_LIBKSE} == "no" 4655ac4c35SDavid XuSYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a 4755ac4c35SDavid Xu.if !defined(NO_PIC) 4884e709f1SRuslan ErmilovSYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so 4955ac4c35SDavid Xu.endif 505740a2b6SRuslan Ermilov.if ${MK_PROFILE} != "no" 5155ac4c35SDavid XuSYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a 5255ac4c35SDavid Xu.endif 5355ac4c35SDavid Xu.endif 5455ac4c35SDavid Xu 55bb535300SJeff Roberson.include <bsd.lib.mk> 56