xref: /freebsd/lib/libthr/Makefile (revision e03efb02bca6c56144bb4b4059b8956fdb6343e4)
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
20e03efb02SRuslan ErmilovWARNS?=	3
21a091d823SDavid XuCFLAGS+=-DPTHREAD_KERNEL
22bb535300SJeff RobersonCFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
23bb535300SJeff Roberson	-I${.CURDIR}/../../include
24a091d823SDavid XuCFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include
25a091d823SDavid XuCFLAGS+=-I${.CURDIR}/sys
26e6f19330SDoug RabsonCFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
27a091d823SDavid XuCFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH}
28d245d9e1SDavid XuCFLAGS+=-I${.CURDIR}/../libthread_db
29a091d823SDavid XuCFLAGS+=-Winline
30a091d823SDavid Xu
31a9b9744fSDag-Erling SmørgravVERSION_DEF=${.CURDIR}/../libc/Versions.def
32a9b9744fSDag-Erling SmørgravSYMBOL_MAPS=${.CURDIR}/pthread.map
33bb535300SJeff Roberson
345335c6bcSRobert WatsonMAN=	libthr.3
355335c6bcSRobert Watson
36bb535300SJeff Roberson# enable extra internal consistancy checks
3744a31c2dSDavid XuCFLAGS+=-D_PTHREADS_INVARIANTS
38649814ddSDavid Xu#CFLAGS+=-g
39bb535300SJeff Roberson
40a35d8893SRuslan ErmilovPRECIOUSLIB=
41bb535300SJeff Roberson
427a57e9abSJeff Roberson.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
43a091d823SDavid Xu.include "${.CURDIR}/sys/Makefile.inc"
44a091d823SDavid Xu.include "${.CURDIR}/thread/Makefile.inc"
45bb535300SJeff Roberson
46946367b8SDavid E. O'Brien.if ${DEFAULT_THREAD_LIB} == "libthr" || ${MK_LIBKSE} == "no"
4755ac4c35SDavid XuSYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
4855ac4c35SDavid Xu.if !defined(NO_PIC)
4984e709f1SRuslan ErmilovSYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
5055ac4c35SDavid Xu.endif
515740a2b6SRuslan Ermilov.if ${MK_PROFILE} != "no"
5255ac4c35SDavid XuSYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
5355ac4c35SDavid Xu.endif
5455ac4c35SDavid Xu.endif
5555ac4c35SDavid Xu
56bb535300SJeff Roberson.include <bsd.lib.mk>
57