1999-08-27 20:22:10 -04:00
|
|
|
# $FreeBSD$
|
1996-01-21 19:23:58 -05:00
|
|
|
#
|
2002-04-15 16:22:28 -04:00
|
|
|
# All library objects contain FreeBSD revision strings by default; they may be
|
1996-01-21 19:23:58 -05:00
|
|
|
# excluded as a space-saving measure. To produce a library that does
|
2002-04-15 16:22:28 -04:00
|
|
|
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
|
|
|
|
|
# below. Note, there are no IDs for syscall stubs whose sources are generated.
|
|
|
|
|
# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
|
|
|
|
|
# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the
|
|
|
|
|
# system call stubs.
|
2007-05-13 10:12:40 -04:00
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
2007-11-29 16:49:08 -05:00
|
|
|
.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no"
|
|
|
|
|
LIB=kse
|
|
|
|
|
.if ${SHLIBDIR} == "/usr/lib"
|
2007-05-17 00:54:35 -04:00
|
|
|
SHLIBDIR= /lib
|
|
|
|
|
.endif
|
2007-11-29 16:49:08 -05:00
|
|
|
.else
|
|
|
|
|
SHLIB=kse
|
|
|
|
|
.endif
|
2007-05-17 00:54:35 -04:00
|
|
|
|
2007-10-10 12:59:14 -04:00
|
|
|
SHLIB_MAJOR= 3
|
2003-04-18 01:04:16 -04:00
|
|
|
CFLAGS+=-DPTHREAD_KERNEL
|
2002-09-16 04:45:36 -04:00
|
|
|
CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
|
2002-04-15 16:22:28 -04:00
|
|
|
-I${.CURDIR}/../../include
|
2003-04-18 01:04:16 -04:00
|
|
|
CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include
|
|
|
|
|
CFLAGS+=-I${.CURDIR}/sys
|
2003-05-29 20:21:52 -04:00
|
|
|
CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
|
2004-08-15 23:27:29 -04:00
|
|
|
CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH}
|
2003-05-29 20:21:52 -04:00
|
|
|
CFLAGS+=-fno-builtin
|
1998-06-09 19:25:13 -04:00
|
|
|
|
2007-10-09 09:42:34 -04:00
|
|
|
# Uncomment this if you want libkse to contain debug information for
|
1998-06-09 19:25:13 -04:00
|
|
|
# thread locking.
|
2003-04-21 00:02:56 -04:00
|
|
|
CFLAGS+=-D_LOCK_DEBUG
|
2007-11-30 12:20:29 -05:00
|
|
|
WARNS?=3
|
2003-04-21 00:02:56 -04:00
|
|
|
|
2003-07-17 19:02:30 -04:00
|
|
|
# Uncomment this if you want to build a 1:1 threading mode library
|
|
|
|
|
# however it is no longer strictly conformed to POSIX
|
|
|
|
|
# CFLAGS+=-DSYSTEM_SCOPE_ONLY
|
|
|
|
|
|
2006-03-16 10:17:47 -05:00
|
|
|
# Enable extra internal consistancy checks.
|
2003-04-18 01:04:16 -04:00
|
|
|
CFLAGS+=-D_PTHREADS_INVARIANTS -Wall
|
2006-03-16 10:17:47 -05:00
|
|
|
|
2008-02-06 15:30:48 -05:00
|
|
|
VERSION_DEF=${.CURDIR}/../libc/Versions.def
|
2008-02-06 15:33:59 -05:00
|
|
|
SYMBOL_MAPS=${.CURDIR}/kse.map
|
2006-03-16 10:17:47 -05:00
|
|
|
|
2004-10-24 11:33:08 -04:00
|
|
|
PRECIOUSLIB=
|
1996-01-21 19:23:58 -05:00
|
|
|
|
2003-06-23 00:28:31 -04:00
|
|
|
.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
|
2003-05-29 20:21:52 -04:00
|
|
|
.include "${.CURDIR}/support/Makefile.inc"
|
2003-06-23 00:28:31 -04:00
|
|
|
.include "${.CURDIR}/sys/Makefile.inc"
|
|
|
|
|
.include "${.CURDIR}/thread/Makefile.inc"
|
1996-01-21 19:23:58 -05:00
|
|
|
|
2007-10-09 09:42:34 -04:00
|
|
|
.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no"
|
2009-02-13 11:51:36 -05:00
|
|
|
.if ${MK_INSTALLLIB} != "no"
|
2007-05-13 10:12:40 -04:00
|
|
|
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
|
2009-02-13 11:51:36 -05:00
|
|
|
.endif
|
2007-05-13 10:12:40 -04:00
|
|
|
.if !defined(NO_PIC)
|
|
|
|
|
SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
|
|
|
|
|
.endif
|
|
|
|
|
.if ${MK_PROFILE} != "no"
|
|
|
|
|
SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
|
|
|
|
|
.endif
|
|
|
|
|
.endif
|
|
|
|
|
|
1996-01-21 19:23:58 -05:00
|
|
|
.include <bsd.lib.mk>
|