Makefile revision 17580
178344Sobrien#	@(#)Makefile	8.2 (Berkeley) 2/3/94
278344Sobrien#
398184Sgordon# All library objects contain rcsid strings by default; they may be
478344Sobrien# excluded as a space-saving measure.  To produce a library that does
578344Sobrien# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
678344Sobrien# from CFLAGS below.  To remove these strings from just the system call
778344Sobrien# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
898184SgordonLIB=c
9136224SmtmSHLIB_MAJOR= 3
1078344SobrienSHLIB_MINOR= 0
1178344SobrienCFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
1278344SobrienAINC=	-I${.CURDIR}/${MACHINE}
1378344SobrienCLEANFILES+=tags
1478344SobrienINSTALL_PIC_ARCHIVE=	yes
1598184SgordonPRECIOUSLIB=	yes
1678344Sobrien
1778344Sobrien.include "${.CURDIR}/db/Makefile.inc"
1898184Sgordon.include "${.CURDIR}/compat-43/Makefile.inc"
1978344Sobrien.include "${.CURDIR}/gen/Makefile.inc"
2098184Sgordon.include "${.CURDIR}/gmon/Makefile.inc"
2178344Sobrien.include "${.CURDIR}/locale/Makefile.inc"
2278344Sobrien.include "${.CURDIR}/net/Makefile.inc"
2398184Sgordon.include "${.CURDIR}/nls/Makefile.inc"
2498184Sgordon.include "${.CURDIR}/quad/Makefile.inc"
25124622Smtm.include "${.CURDIR}/regex/Makefile.inc"
26124622Smtm.include "${.CURDIR}/stdio/Makefile.inc"
27124622Smtm.include "${.CURDIR}/stdlib/Makefile.inc"
28124622Smtm.include "${.CURDIR}/stdtime/Makefile.inc"
29124622Smtm.include "${.CURDIR}/string/Makefile.inc"
30124622Smtm.include "${.CURDIR}/sys/Makefile.inc"
31136684Sthomas.include "${.CURDIR}/rpc/Makefile.inc"
32136901Sdes.include "${.CURDIR}/xdr/Makefile.inc"
33136684Sthomas.if !defined(NO_YP_LIBC)
34124622SmtmCFLAGS+= -DYP
3598184Sgordon.include "${.CURDIR}/yp/Makefile.inc"
36124622Smtm.endif
37124622Smtm.include "${.CURDIR}/${MACHINE}/sys/Makefile.inc"
38124622Smtm
39124622SmtmKQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
4098184Sgordon	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
41124622Smtm	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
42124622SmtmKSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
4398184Sgordon	strlen.c strncpy.c
4498184Sgordon
45124622Smtmlibkern: libkern.gen libkern.${MACHINE}
46136901Sdes
47136901Sdeslibkern.gen: ${KQSRCS} ${KSRCS}
48124622Smtm	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} /sys/libkern
49124622Smtm
50136901Sdeslibkern.${MACHINE}:: ${KMSRCS}
51136901Sdes.if defined(KMSRCS) && !empty(KMSRCS)
52136901Sdes	cp -p ${.ALLSRC} /sys/libkern/${MACHINE}
53136901Sdes.endif
54136901Sdes
5598184Sgordon#beforeinstall: tags
5698184Sgordon#	${INSTALL} ${COPY} -o bin -g bin -m 444 tags /var/db/libc.tags
5798184Sgordon
5898184Sgordontags: ${SRCS}
5998184Sgordon	ctags ${.ALLSRC:M*.c}
60179962Smtm	egrep -o "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" ${.ALLSRC:M*.s} | \
61179962Smtm	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
62179962Smtm	    >> tags; sort -o tags tags
63179962Smtm
64179962Smtm.include <bsd.lib.mk>
6578344Sobrien