Makefile revision 1.98
11.98Schristos# $NetBSD: Makefile,v 1.98 2001/02/06 18:47:09 christos 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.79Slukem# 171.79Slukem# The Hesiod functions are always in libc. To choose that getpwent() and friends 181.79Slukem# actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below. 191.4Sderaadt 201.88Sminoura.include <bsd.own.mk> 211.88Sminoura 221.82StvLIB= c 231.82StvCPPFLAGS+= -D_LIBC -DNLS -DYP -DHESIOD -DLIBC_SCCS -DSYSLIBC_SCCS \ 241.82Stv -D_REENTRANT -I${.CURDIR}/include 251.87SitojunCPPFLAGS+= -DINET6 261.98Schristos 271.98Schristos.if ${MACHINE_ARCH} == "i386" 281.98Schristos# Set lint to exit on warnings 291.98SchristosLINTFLAGS+= -w 301.98Schristos.endif 311.98Schristos# ignore 'empty translation unit' warnings. 321.98SchristosLINTFLAGS+= -X 272 331.82Stv 341.95Sitojun.if exists(${.CURDIR}/arch/${MACHINE_ARCH}) 351.95SitojunARCHSUBDIR= ${MACHINE_ARCH} 361.95Sitojun.elif exists(${.CURDIR}/arch/${MACHINE_CPU}) 371.95SitojunARCHSUBDIR= ${MACHINE_CPU} 381.95Sitojun.else 391.95Sitojun.BEGIN: 401.95Sitojun @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU} 411.95Sitojun @false 421.95Sitojun.endif 431.95Sitojun 441.83SdrochnerARCHDIR= ${.CURDIR}/arch/${ARCHSUBDIR} 451.82StvAINC= -I${ARCHDIR} 461.27Smycroft.if defined(DESTDIR) 471.82StvAINC+= -nostdinc -idirafter ${DESTDIR}/usr/include 481.27Smycroft.endif 491.66SmikelCLEANFILES+= ${.CURDIR}/tags ${.OBJDIR}/tags 501.51Scgd 511.73Smikel# Don't try to lint the C library against itself when creating llib-lc.ln 521.51ScgdLLIBS= 531.89Sfvdl 541.89SfvdlINCSDIR= /usr/include 551.9Sderaadt 561.82Stv.if exists (${ARCHDIR}/Makefile.inc) 571.82Stv.PATH: ${ARCHDIR} 581.82Stv.include "${ARCHDIR}/Makefile.inc" 591.9Sderaadt.endif 601.1Scgd 611.7Scgd.include "${.CURDIR}/db/Makefile.inc" 621.1Scgd.include "${.CURDIR}/compat-43/Makefile.inc" 631.88Sminoura.include "${.CURDIR}/dlfcn/Makefile.inc" 641.1Scgd.include "${.CURDIR}/gen/Makefile.inc" 651.24Scgd.include "${.CURDIR}/gmon/Makefile.inc" 661.81Sexplorer.include "${.CURDIR}/hash/Makefile.inc" 671.1Scgd.include "${.CURDIR}/locale/Makefile.inc" 681.52Sthorpej.include "${.CURDIR}/md/Makefile.inc" 691.1Scgd.include "${.CURDIR}/net/Makefile.inc" 701.25Sjtc.include "${.CURDIR}/nls/Makefile.inc" 711.78Seeh.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64") 721.24Scgd.include "${.CURDIR}/quad/Makefile.inc" 731.34Scgd.endif 741.24Scgd.include "${.CURDIR}/regex/Makefile.inc" 751.24Scgd.include "${.CURDIR}/rpc/Makefile.inc" 761.1Scgd.include "${.CURDIR}/stdio/Makefile.inc" 771.1Scgd.include "${.CURDIR}/stdlib/Makefile.inc" 781.1Scgd.include "${.CURDIR}/string/Makefile.inc" 791.40Sjtc.include "${.CURDIR}/termios/Makefile.inc" 801.38Sjtc.include "${.CURDIR}/time/Makefile.inc" 811.1Scgd.include "${.CURDIR}/sys/Makefile.inc" 821.4Sderaadt.include "${.CURDIR}/yp/Makefile.inc" 831.41Sjtc 841.85SjdolecekNLS= C.msg Pig.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg no.msg sv.msg 851.1Scgd 861.30ScgdLIBKERN= ${.CURDIR}/../../sys/lib/libkern 871.14Sjtc 881.80SbouyerKSRCS= bcopy.c bcmp.c bswap16.c bswap32.c bswap64.c bzero.c ffs.c \ 891.76Sperry strcat.c strchr.c strcmp.c strcpy.c strlen.c \ 901.76Sperry strncmp.c strncpy.c strrchr.c \ 911.76Sperry htonl.c htons.c ntohl.c ntohs.c md5c.c \ 921.76Sperry memchr.c memcmp.c memcpy.c memmove.c memset.c \ 931.76Sperry index.c rindex.c 941.78Seeh.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64") 951.22ScgdKSRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 961.22Scgd lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 971.22Scgd subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 981.22ScgdKINCLUDES+= quad/quad.h 991.35Scgd.endif 1001.14Sjtc 1011.15Sjtccopy-to-libkern: copy-to-libkern-machind copy-to-libkern-machdep 1021.15Sjtc 1031.15Sjtccopy-to-libkern-machind: ${KSRCS} 1041.14Sjtc cp -p ${.ALLSRC} ${LIBKERN} 1051.35Scgd.if defined(KINCLUDES) && !empty(KINCLUDES) 1061.22Scgd (cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN}) 1071.35Scgd.endif 1081.14Sjtc 1091.15Sjtccopy-to-libkern-machdep: ${KMSRCS} 1101.15Sjtc.if defined(KMSRCS) && !empty(KMSRCS) 1111.83Sdrochner cp -p ${.ALLSRC} ${LIBKERN}/arch/${ARCHSUBDIR} 1121.18Scgd.endif 1131.18Scgd.if defined(KMINCLUDES) && !empty(KMINCLUDES) 1141.83Sdrochner (cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${ARCHSUBDIR}) 1151.15Sjtc.endif 1161.15Sjtc 1171.14Sjtcrm-from-libkern: 1181.14Sjtc for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done 1191.15Sjtc.if defined(KMSRCS) && !empty(KMSRCS) 1201.83Sdrochner for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${ARCHSUBDIR}/$$i; done 1211.15Sjtc.endif 1221.36Scgd 1231.86Smycroftrealall: ${.OBJDIR}/tags 1241.65Schristos${.OBJDIR}/tags: ${SRCS} 1251.90Schristos ctags -w ${.ALLSRC:M*.c} 1261.37Sjtc egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \ 1271.36Scgd sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \ 1281.64Schristos >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET} 1291.65Schristos 1301.82StvFILES= ${.OBJDIR}/tags 1311.82StvFILESNAME= libc.tags 1321.82StvFILESDIR= /var/db 1331.32Scgd 1341.1Scgd.include <bsd.lib.mk> 1351.97Sitojun 1361.97Sitojun# workaround for lib/libc/locale: build singlebyte setlocale() for libc.a, 1371.97Sitojun# multibyte for libc.so. the quirk should be removed when we support 1381.97Sitojun# dlopen() from within statically linked binaries. 1391.97SitojunCPICFLAGS+= -DDLRUNE 140