Makefile revision 1916
165793Smsmith#	@(#)Makefile	8.2 (Berkeley) 2/3/94
265793Smsmith#
381150Sscottl# All library objects contain sccsid strings by default; they may be
465793Smsmith# excluded as a space-saving measure.  To produce a library that does
581082Sscottl# not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
665793Smsmith# from CFLAGS below.  To remove these strings from just the system call
765793Smsmith# stubs, remove just -DSYSLIBC_SCCS from CFLAGS.
865793SmsmithLIB=c
965793SmsmithCFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS
1065793SmsmithAINC=	-I${.CURDIR}/${MACHINE}
1165793SmsmithCLEANFILES+=tags
1265793SmsmithINSTALL_PIC_ARCHIVE=	yes
1365793Smsmith
1465793Smsmith.include "${.CURDIR}/db/Makefile.inc"
1565793Smsmith.include "${.CURDIR}/compat-43/Makefile.inc"
1665793Smsmith.include "${.CURDIR}/gen/Makefile.inc"
1765793Smsmith.include "${.CURDIR}/gmon/Makefile.inc"
1865793Smsmith.include "${.CURDIR}/locale/Makefile.inc"
1965793Smsmith.include "${.CURDIR}/net/Makefile.inc"
2065793Smsmith.include "${.CURDIR}/quad/Makefile.inc"
2165793Smsmith.include "${.CURDIR}/regex/Makefile.inc"
2265793Smsmith.include "${.CURDIR}/stdio/Makefile.inc"
2365793Smsmith.include "${.CURDIR}/stdlib/Makefile.inc"
2465793Smsmith.include "${.CURDIR}/string/Makefile.inc"
2565793Smsmith.include "${.CURDIR}/sys/Makefile.inc"
2665793Smsmith
2765793SmsmithKQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
2865793Smsmith	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
2965793Smsmith	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
3065793SmsmithKSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
3165793Smsmith	strlen.c strncpy.c
3265793Smsmith
3365793Smsmithlibkern: libkern.gen libkern.${MACHINE}
3465793Smsmith
3565793Smsmithlibkern.gen: ${KQSRCS} ${KSRCS}
3665793Smsmith	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} /sys/libkern
3765793Smsmith
3865793Smsmithlibkern.${MACHINE}:: ${KMSRCS}
3983114Sscottl.if defined(KMSRCS) && !empty(KMSRCS)
4065793Smsmith	cp -p ${.ALLSRC} /sys/libkern/${MACHINE}
4165793Smsmith.endif
4265793Smsmith
4365793Smsmith#beforeinstall: tags
4465793Smsmith#	install -c -o bin -g bin -m 444 tags /var/db/libc.tags
4583114Sscottl
4665793Smsmithtags: ${SRCS}
4765793Smsmith	ctags ${.ALLSRC:M*.c}
4865793Smsmith	egrep -o "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" ${.ALLSRC:M*.s} | \
4965793Smsmith	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
5065793Smsmith	    >> tags; sort -o tags tags
5165793Smsmith
5265793Smsmith.include <bsd.lib.mk>
5365793Smsmith