Makefile revision 1.73
11.73Smikel#	$NetBSD: Makefile,v 1.73 1998/03/04 08:17:20 mikel Exp $
21.36Scgd#	@(#)Makefile	8.2 (Berkeley) 2/3/94
31.1Scgd#
41.1Scgd# All library objects contain sccsid strings by default; they may be
51.1Scgd# excluded as a space-saving measure.  To produce a library that does
61.1Scgd# not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
71.71Slukem# from CPPFLAGS below.  To remove these strings from just the system call
81.71Slukem# stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
91.28Sjtc#
101.28Sjtc# The NLS (message catalog) functions are always in libc.  To choose that
111.28Sjtc# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
121.71Slukem# functions, put -DNLS on the CPPFLAGS line below.
131.4Sderaadt#
141.6Sderaadt# The YP functions are always in libc. To choose that getpwent() and friends
151.71Slukem# actually call the YP functions, put -DYP on the CPPFLAGS line below.
161.4Sderaadt
171.1ScgdLIB=c
181.71SlukemCPPFLAGS+=-DNLS -DYP -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
191.71SlukemCPPFLAGS+=-I${.CURDIR}/include
201.21ScgdAINC=	-I${.CURDIR}/arch/${MACHINE_ARCH}
211.27Smycroft.if defined(DESTDIR)
221.27SmycroftAINC+=	-nostdinc -idirafter ${DESTDIR}/usr/include
231.27Smycroft.endif
241.66SmikelCLEANFILES+=	${.CURDIR}/tags ${.OBJDIR}/tags
251.51Scgd
261.73Smikel# Don't try to lint the C library against itself when creating llib-lc.ln
271.51ScgdLLIBS=
281.9Sderaadt
291.21Scgd.if exists (${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc)
301.21Scgd.PATH:	${.CURDIR}/arch/${MACHINE_ARCH}
311.21Scgd.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
321.9Sderaadt.endif
331.1Scgd
341.7Scgd.include "${.CURDIR}/db/Makefile.inc"
351.1Scgd.include "${.CURDIR}/compat-43/Makefile.inc"
361.1Scgd.include "${.CURDIR}/gen/Makefile.inc"
371.24Scgd.include "${.CURDIR}/gmon/Makefile.inc"
381.1Scgd.include "${.CURDIR}/locale/Makefile.inc"
391.52Sthorpej.include "${.CURDIR}/md/Makefile.inc"
401.1Scgd.include "${.CURDIR}/net/Makefile.inc"
411.25Sjtc.include "${.CURDIR}/nls/Makefile.inc"
421.58Sthorpej.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "powerpc")
431.24Scgd.include "${.CURDIR}/quad/Makefile.inc"
441.34Scgd.endif
451.24Scgd.include "${.CURDIR}/regex/Makefile.inc"
461.24Scgd.include "${.CURDIR}/rpc/Makefile.inc"
471.1Scgd.include "${.CURDIR}/stdio/Makefile.inc"
481.1Scgd.include "${.CURDIR}/stdlib/Makefile.inc"
491.1Scgd.include "${.CURDIR}/string/Makefile.inc"
501.40Sjtc.include "${.CURDIR}/termios/Makefile.inc"
511.38Sjtc.include "${.CURDIR}/time/Makefile.inc"
521.1Scgd.include "${.CURDIR}/sys/Makefile.inc"
531.4Sderaadt.include "${.CURDIR}/yp/Makefile.inc"
541.41Sjtc
551.62SraggeNLS=	C.msg Pig.msg de.msg es.msg fi.msg fr.msg nl.msg no.msg sv.msg
561.1Scgd
571.30ScgdLIBKERN=	${.CURDIR}/../../sys/lib/libkern
581.14Sjtc
591.18ScgdKSRCS=	bcmp.c bzero.c ffs.c strcat.c strcmp.c strcpy.c strlen.c strncmp.c \
601.72Scgd	strncpy.c htonl.c htons.c ntohl.c ntohs.c md5c.c memcmp.c memset.c \
611.72Scgd	memchr.c index.c rindex.c
621.35Scgd.if (${MACHINE_ARCH} != "alpha")
631.22ScgdKSRCS+=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
641.22Scgd	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
651.22Scgd	subdi3.c  ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
661.22ScgdKINCLUDES+=	quad/quad.h
671.35Scgd.endif
681.14Sjtc
691.15Sjtccopy-to-libkern:	copy-to-libkern-machind copy-to-libkern-machdep
701.15Sjtc
711.15Sjtccopy-to-libkern-machind: ${KSRCS}
721.14Sjtc	cp -p ${.ALLSRC} ${LIBKERN}
731.35Scgd.if defined(KINCLUDES) && !empty(KINCLUDES)
741.22Scgd	(cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN})
751.35Scgd.endif
761.14Sjtc
771.15Sjtccopy-to-libkern-machdep: ${KMSRCS}
781.15Sjtc.if defined(KMSRCS) && !empty(KMSRCS)
791.26Sderaadt	cp -p ${.ALLSRC} ${LIBKERN}/arch/${MACHINE_ARCH}
801.18Scgd.endif
811.18Scgd.if defined(KMINCLUDES) && !empty(KMINCLUDES)
821.26Sderaadt	(cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${MACHINE_ARCH})
831.15Sjtc.endif
841.15Sjtc
851.14Sjtcrm-from-libkern:
861.14Sjtc	for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done
871.15Sjtc.if defined(KMSRCS) && !empty(KMSRCS)
881.26Sderaadt	for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${MACHINE_ARCH}/$$i; done
891.15Sjtc.endif
901.36Scgd
911.65Schristosall: ${.OBJDIR}/tags
921.65Schristos${.OBJDIR}/tags: ${SRCS}
931.36Scgd	ctags ${.ALLSRC:M*.c}
941.37Sjtc	egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
951.36Scgd	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
961.64Schristos	    >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
971.42Scgd
981.65Schristostags: ${.CURDIR}/tags
991.65Schristos${.CURDIR}/tags: 
1001.65Schristos	@rm -f ${.TARGET}
1011.65Schristos	ln -s /var/db/libc.tags ${.TARGET}
1021.65Schristos
1031.65SchristosFILES=${.OBJDIR}/tags
1041.65SchristosFILESNAME=libc.tags
1051.56SchristosFILESDIR=/var/db
1061.32Scgd
1071.1Scgd.include <bsd.lib.mk>
108