137Srgrimes# $FreeBSD: releng/10.3/lib/libthr/Makefile 282854 2015-05-13 11:32:55Z ngie $
237Srgrimes#
337Srgrimes# All library objects contain FreeBSD revision strings by default; they may be
4705Swollman# excluded as a space-saving measure.  To produce a library that does
5705Swollman# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
6705Swollman# below.  Note, there are no IDs for syscall stubs whose sources are generated.
739139Sobrien# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
846414Sghelmer# (for system call stubs) to CFLAGS below.  -DSYSLIBC_SCCS affects just the
980266Sdougb# system call stubs.
1080945Sdougb
1180266SdougbSHLIBDIR?= /lib
1239139Sobrien
1339139Sobrien.include <bsd.own.mk>
1439139SobrienMK_SSP=	no
1539139Sobrien
167685SacheLIB=thr
177685SacheSHLIB_MAJOR= 3
1837SrgrimesWARNS?=	3
1950472SpeterCFLAGS+=-DPTHREAD_KERNEL
20705SwollmanCFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
21705Swollman	-I${.CURDIR}/../../include
227685SacheCFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
237685SacheCFLAGS+=-I${.CURDIR}/sys
2422009SphkCFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
257685SacheCFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH}
267685SacheCFLAGS+=-I${.CURDIR}/../libthread_db
2722009SphkCFLAGS+=-Winline
287685Sache
297685Sache.ifndef NO_THREAD_UNWIND_STACK
307685SacheCFLAGS+=-fexceptions
317685SacheCFLAGS+=-D_PTHREAD_FORCED_UNWIND
3222009Sphk.endif
337685Sache
347685SacheLDFLAGS+=-Wl,-znodelete
3522009Sphk
367685SacheVERSION_DEF=${.CURDIR}/../libc/Versions.def
377685SacheSYMBOL_MAPS=${.CURDIR}/pthread.map
387685Sache
397685SacheMAN=	libthr.3
407685Sache
417685Sache# enable extra internal consistancy checks
427685SacheCFLAGS+=-D_PTHREADS_INVARIANTS
437685Sache
447685SachePRECIOUSLIB=
457685Sache
467685Sache.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
477685Sache
487685Sache.include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
497685Sache.include "${.CURDIR}/sys/Makefile.inc"
507685Sache.include "${.CURDIR}/thread/Makefile.inc"
517685Sache
527685Sache.if ${MK_INSTALLLIB} != "no"
537685SacheSYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
54131994Scperciva.endif
55131994Scperciva.if !defined(NO_PIC)
567685SacheSYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
577685Sache.endif
587685Sache.if ${MK_PROFILE} != "no"
597685SacheSYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
607685Sache.endif
617685Sache
627685Sache.if !defined(WITHOUT_SYSCALL_COMPAT)
637685SacheCFLAGS+=-DSYSCALL_COMPAT
647685Sache.endif
657685Sache
667685Sache.if ${MK_TESTS} != "no"
677685SacheSUBDIR+=	tests
687685Sache.endif
697685Sache
707685Sache.include <bsd.lib.mk>
717685Sache