Makefile revision 174092
1# $FreeBSD: head/lib/libkse/Makefile 174092 2007-11-29 21:49:08Z brooks $
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.  Note, there are no IDs for syscall stubs whose sources are generated.
7# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
8# (for system call stubs) to CFLAGS below.  -DSYSLIBC_SCCS affects just the
9# system call stubs.
10
11.include <bsd.own.mk>
12
13.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no"
14LIB=kse
15.if ${SHLIBDIR} == "/usr/lib"
16SHLIBDIR= /lib
17.endif
18.else
19SHLIB=kse
20.endif
21
22SHLIB_MAJOR= 3
23CFLAGS+=-DPTHREAD_KERNEL
24CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
25	-I${.CURDIR}/../../include
26CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include
27CFLAGS+=-I${.CURDIR}/sys
28CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
29CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH}
30CFLAGS+=-fno-builtin
31CFLAGS+=-fno-strict-aliasing
32
33# Uncomment this if you want libkse to contain debug information for
34# thread locking.
35CFLAGS+=-D_LOCK_DEBUG
36WARNS?=2
37
38# Uncomment this if you want to build a 1:1 threading mode library
39# however it is no longer strictly conformed to POSIX
40# CFLAGS+=-DSYSTEM_SCOPE_ONLY
41
42# Enable extra internal consistancy checks.
43CFLAGS+=-D_PTHREADS_INVARIANTS -Wall
44
45VERSION_MAP=${.CURDIR}/kse.map
46
47PRECIOUSLIB=
48
49.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
50.include "${.CURDIR}/support/Makefile.inc"
51.include "${.CURDIR}/sys/Makefile.inc"
52.include "${.CURDIR}/thread/Makefile.inc"
53
54.if ${DEFAULT_THREAD_LIB} == "libkse" || ${MK_LIBTHR} == "no"
55SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
56.if !defined(NO_PIC)
57SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
58.endif
59.if ${MK_PROFILE} != "no"
60SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
61.endif
62.endif
63
64.include <bsd.lib.mk>
65