1998-01-22 03:17:11 +03:00
|
|
|
# $NetBSD: Makefile,v 1.72 1998/01/22 00:17:11 cgd Exp $
|
1995-02-25 06:31:42 +03:00
|
|
|
# @(#)Makefile 8.2 (Berkeley) 2/3/94
|
1993-03-21 12:45:37 +03:00
|
|
|
#
|
|
|
|
# All library objects contain sccsid strings by default; they may be
|
|
|
|
# excluded as a space-saving measure. To produce a library that does
|
|
|
|
# not contain these strings, delete -DLIBC_SCCS and -DSYSLIBC_SCCS
|
1997-10-23 03:14:04 +04:00
|
|
|
# from CPPFLAGS below. To remove these strings from just the system call
|
|
|
|
# stubs, remove just -DSYSLIBC_SCCS from CPPFLAGS.
|
1993-04-26 12:25:13 +04:00
|
|
|
#
|
1994-09-03 08:53:16 +04:00
|
|
|
# The NLS (message catalog) functions are always in libc. To choose that
|
|
|
|
# strerror(), perror(), strsignal(), psignal(), etc. actually call the NLS
|
1997-10-23 03:14:04 +04:00
|
|
|
# functions, put -DNLS on the CPPFLAGS line below.
|
1994-09-03 08:53:16 +04:00
|
|
|
#
|
1993-04-27 14:11:24 +04:00
|
|
|
# The YP functions are always in libc. To choose that getpwent() and friends
|
1997-10-23 03:14:04 +04:00
|
|
|
# actually call the YP functions, put -DYP on the CPPFLAGS line below.
|
1993-04-26 12:25:13 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
LIB=c
|
1997-10-23 03:14:04 +04:00
|
|
|
CPPFLAGS+=-DNLS -DYP -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT
|
|
|
|
CPPFLAGS+=-I${.CURDIR}/include
|
1993-12-04 05:31:56 +03:00
|
|
|
AINC= -I${.CURDIR}/arch/${MACHINE_ARCH}
|
1994-07-06 08:06:27 +04:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
AINC+= -nostdinc -idirafter ${DESTDIR}/usr/include
|
|
|
|
.endif
|
1997-06-19 10:12:10 +04:00
|
|
|
CLEANFILES+= ${.CURDIR}/tags ${.OBJDIR}/tags
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1996-12-19 10:52:52 +03:00
|
|
|
# Don't try to lint the C libarary against itself when creating llib-lc.ln
|
|
|
|
LLIBS=
|
|
|
|
|
1993-12-04 05:31:56 +03:00
|
|
|
.if exists (${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc)
|
|
|
|
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
|
|
|
|
.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
|
1993-09-06 02:12:35 +04:00
|
|
|
.endif
|
|
|
|
|
1993-06-15 03:51:26 +04:00
|
|
|
.include "${.CURDIR}/db/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/compat-43/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/gen/Makefile.inc"
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/gmon/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/locale/Makefile.inc"
|
1997-01-30 04:02:17 +03:00
|
|
|
.include "${.CURDIR}/md/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/net/Makefile.inc"
|
1994-05-30 02:09:13 +04:00
|
|
|
.include "${.CURDIR}/nls/Makefile.inc"
|
1997-03-30 00:01:36 +03:00
|
|
|
.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "powerpc")
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/quad/Makefile.inc"
|
1995-02-10 20:45:39 +03:00
|
|
|
.endif
|
1994-05-14 10:25:56 +04:00
|
|
|
.include "${.CURDIR}/regex/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/rpc/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/stdio/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/stdlib/Makefile.inc"
|
|
|
|
.include "${.CURDIR}/string/Makefile.inc"
|
1995-04-25 04:00:58 +04:00
|
|
|
.include "${.CURDIR}/termios/Makefile.inc"
|
1995-03-13 08:26:07 +03:00
|
|
|
.include "${.CURDIR}/time/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
.include "${.CURDIR}/sys/Makefile.inc"
|
1993-04-26 12:25:13 +04:00
|
|
|
.include "${.CURDIR}/yp/Makefile.inc"
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-04-29 01:36:45 +04:00
|
|
|
NLS= C.msg Pig.msg de.msg es.msg fi.msg fr.msg nl.msg no.msg sv.msg
|
1995-05-02 23:57:15 +04:00
|
|
|
|
1994-10-19 06:05:22 +03:00
|
|
|
LIBKERN= ${.CURDIR}/../../sys/lib/libkern
|
1993-10-15 04:06:47 +03:00
|
|
|
|
1993-11-06 01:43:47 +03:00
|
|
|
KSRCS= bcmp.c bzero.c ffs.c strcat.c strcmp.c strcpy.c strlen.c strncmp.c \
|
1998-01-22 03:17:11 +03:00
|
|
|
strncpy.c htonl.c htons.c ntohl.c ntohs.c md5c.c memcmp.c memset.c \
|
|
|
|
memchr.c index.c rindex.c
|
1995-02-14 00:57:24 +03:00
|
|
|
.if (${MACHINE_ARCH} != "alpha")
|
1993-12-04 08:15:26 +03:00
|
|
|
KSRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
|
|
|
|
lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
|
|
|
|
subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
|
|
|
|
KINCLUDES+= quad/quad.h
|
1995-02-14 00:57:24 +03:00
|
|
|
.endif
|
1993-10-15 04:06:47 +03:00
|
|
|
|
1993-10-15 04:23:49 +03:00
|
|
|
copy-to-libkern: copy-to-libkern-machind copy-to-libkern-machdep
|
|
|
|
|
|
|
|
copy-to-libkern-machind: ${KSRCS}
|
1993-10-15 04:06:47 +03:00
|
|
|
cp -p ${.ALLSRC} ${LIBKERN}
|
1995-02-14 00:57:24 +03:00
|
|
|
.if defined(KINCLUDES) && !empty(KINCLUDES)
|
1993-12-04 08:15:26 +03:00
|
|
|
(cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN})
|
1995-02-14 00:57:24 +03:00
|
|
|
.endif
|
1993-10-15 04:06:47 +03:00
|
|
|
|
1993-10-15 04:23:49 +03:00
|
|
|
copy-to-libkern-machdep: ${KMSRCS}
|
|
|
|
.if defined(KMSRCS) && !empty(KMSRCS)
|
1994-06-30 10:44:54 +04:00
|
|
|
cp -p ${.ALLSRC} ${LIBKERN}/arch/${MACHINE_ARCH}
|
1993-10-15 04:23:49 +03:00
|
|
|
.endif
|
1993-11-06 01:43:47 +03:00
|
|
|
.if defined(KMINCLUDES) && !empty(KMINCLUDES)
|
1994-06-30 10:44:54 +04:00
|
|
|
(cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${MACHINE_ARCH})
|
1993-11-06 01:43:47 +03:00
|
|
|
.endif
|
1993-10-15 04:23:49 +03:00
|
|
|
|
1993-10-15 04:06:47 +03:00
|
|
|
rm-from-libkern:
|
|
|
|
for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done
|
1993-10-15 04:23:49 +03:00
|
|
|
.if defined(KMSRCS) && !empty(KMSRCS)
|
1994-06-30 10:44:54 +04:00
|
|
|
for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${MACHINE_ARCH}/$$i; done
|
1993-10-15 04:23:49 +03:00
|
|
|
.endif
|
1995-01-30 15:21:41 +03:00
|
|
|
|
1997-06-05 03:11:54 +04:00
|
|
|
all: ${.OBJDIR}/tags
|
|
|
|
${.OBJDIR}/tags: ${SRCS}
|
1995-02-25 06:31:42 +03:00
|
|
|
ctags ${.ALLSRC:M*.c}
|
1995-03-05 10:12:54 +03:00
|
|
|
egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \
|
1995-02-25 06:31:42 +03:00
|
|
|
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
|
1997-05-12 20:41:03 +04:00
|
|
|
>> ${.TARGET}; sort -o ${.TARGET} ${.TARGET}
|
1995-02-25 06:31:42 +03:00
|
|
|
|
1997-06-05 03:11:54 +04:00
|
|
|
tags: ${.CURDIR}/tags
|
|
|
|
${.CURDIR}/tags:
|
|
|
|
@rm -f ${.TARGET}
|
|
|
|
ln -s /var/db/libc.tags ${.TARGET}
|
|
|
|
|
|
|
|
FILES=${.OBJDIR}/tags
|
|
|
|
FILESNAME=libc.tags
|
1997-03-25 01:11:48 +03:00
|
|
|
FILESDIR=/var/db
|
1995-06-07 08:37:54 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
.include <bsd.lib.mk>
|