Makefile revision 13546
1#	@(#)Makefile	8.2 (Berkeley) 2/3/94
2#
3# All library objects contain rcsid strings by default; they may be
4# excluded as a space-saving measure.  To produce a library that does
5# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
6# from CFLAGS below.  To remove these strings from just the system call
7# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
8LIB=c_r
9SHLIB_MAJOR= 2
10SHLIB_MINOR= 2
11CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
12CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
13AINC=	-I${.CURDIR}/../libc/${MACHINE} -I${.CURDIR}/uthread
14CLEANFILES+=tags
15INSTALL_PIC_ARCHIVE=	yes
16PRECIOUSLIB=	yes
17
18.include "${.CURDIR}/db/Makefile.inc"
19.include "${.CURDIR}/compat-43/Makefile.inc"
20.include "${.CURDIR}/gen/Makefile.inc"
21.include "${.CURDIR}/gmon/Makefile.inc"
22.include "${.CURDIR}/locale/Makefile.inc"
23.include "${.CURDIR}/net/Makefile.inc"
24.include "${.CURDIR}/nls/Makefile.inc"
25.include "${.CURDIR}/quad/Makefile.inc"
26.include "${.CURDIR}/regex/Makefile.inc"
27.include "${.CURDIR}/stdio/Makefile.inc"
28.include "${.CURDIR}/stdlib/Makefile.inc"
29.include "${.CURDIR}/stdtime/Makefile.inc"
30.include "${.CURDIR}/string/Makefile.inc"
31.include "${.CURDIR}/sys/Makefile.inc"
32.include "${.CURDIR}/rpc/Makefile.inc"
33.include "${.CURDIR}/uthread/Makefile.inc"
34.include "${.CURDIR}/xdr/Makefile.inc"
35.if !defined(NO_YP_LIBC)
36CFLAGS+= -DYP
37.include "${.CURDIR}/yp/Makefile.inc"
38.endif
39.include "${.CURDIR}/${MACHINE}/sys/Makefile.inc"
40
41KQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
42	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
43	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
44KSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
45	strlen.c strncpy.c
46
47libkern: libkern.gen libkern.${MACHINE}
48
49libkern.gen: ${KQSRCS} ${KSRCS}
50	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} /sys/libkern
51
52libkern.${MACHINE}:: ${KMSRCS}
53.if defined(KMSRCS) && !empty(KMSRCS)
54	cp -p ${.ALLSRC} /sys/libkern/${MACHINE}
55.endif
56
57#beforeinstall: tags
58#	${INSTALL} ${COPY} -o bin -g bin -m 444 tags /var/db/libc.tags
59
60tags: ${SRCS}
61	ctags ${.ALLSRC:M*.c}
62	egrep -o "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" ${.ALLSRC:M*.s} | \
63	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
64	    >> tags; sort -o tags tags
65
66.include <bsd.lib.mk>
67