Makefile revision 1.118
11.118Slukem# $NetBSD: Makefile,v 1.118 2004/07/31 14:13:05 lukem 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.107SlukemUSE_SHLIBDIR= yes 211.107Slukem 221.104Sthorpej.include <bsd.own.mk> 231.104Sthorpej 241.82StvLIB= c 251.104SthorpejCPPFLAGS+= -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT 261.117SchristosCPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR} 271.104Sthorpej 281.104Sthorpej.if (${USE_HESIOD} != "no") 291.104SthorpejCPPFLAGS+= -DHESIOD 301.104Sthorpej.endif 311.104Sthorpej 321.113Smatt.if (${USE_INET6} != "no") 331.87SitojunCPPFLAGS+= -DINET6 341.113Smatt.endif 351.104SthorpejCPPFLAGS+= -DNLS 361.100Slukem 371.104Sthorpej.if (${USE_YP} != "no") 381.104SthorpejCPPFLAGS+= -DYP 391.104Sthorpej.endif 401.98Schristos 411.98Schristos.if ${MACHINE_ARCH} == "i386" 421.98Schristos# Set lint to exit on warnings 431.98SchristosLINTFLAGS+= -w 441.98Schristos.endif 451.98Schristos# ignore 'empty translation unit' warnings. 461.98SchristosLINTFLAGS+= -X 272 471.82Stv 481.95Sitojun.if exists(${.CURDIR}/arch/${MACHINE_ARCH}) 491.95SitojunARCHSUBDIR= ${MACHINE_ARCH} 501.95Sitojun.elif exists(${.CURDIR}/arch/${MACHINE_CPU}) 511.95SitojunARCHSUBDIR= ${MACHINE_CPU} 521.95Sitojun.else 531.95Sitojun.BEGIN: 541.95Sitojun @echo no ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU} 551.95Sitojun @false 561.95Sitojun.endif 571.95Sitojun 581.83SdrochnerARCHDIR= ${.CURDIR}/arch/${ARCHSUBDIR} 591.116SlukemAFLAGS+= -I${ARCHDIR} 601.27Smycroft.if defined(DESTDIR) 611.116SlukemAFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include 621.27Smycroft.endif 631.102SthorpejCLEANFILES+= tags 641.51Scgd 651.73Smikel# Don't try to lint the C library against itself when creating llib-lc.ln 661.51ScgdLLIBS= 671.89Sfvdl 681.89SfvdlINCSDIR= /usr/include 691.9Sderaadt 701.82Stv.if exists (${ARCHDIR}/Makefile.inc) 711.82Stv.PATH: ${ARCHDIR} 721.82Stv.include "${ARCHDIR}/Makefile.inc" 731.9Sderaadt.endif 741.114Smatt.if exists (${ARCHDIR}/genassym.cf) 751.114SmattDPSRCS+= assym.h 761.114SmattCLEANFILES+= assym.h assym.h.tmp 771.114Smatt 781.114Smattassym.h: genassym.sh ${ARCHDIR}/genassym.cf 791.114Smatt ${_MKTARGET_CREATE} 801.114Smatt ${HOST_SH} ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \ 811.114Smatt < ${ARCHDIR}/genassym.cf > assym.h.tmp && \ 821.114Smatt mv -f assym.h.tmp assym.h 831.114Smatt.endif 841.1Scgd 851.7Scgd.include "${.CURDIR}/db/Makefile.inc" 861.111Stshiozak.include "${.CURDIR}/citrus/Makefile.inc" 871.1Scgd.include "${.CURDIR}/compat-43/Makefile.inc" 881.88Sminoura.include "${.CURDIR}/dlfcn/Makefile.inc" 891.1Scgd.include "${.CURDIR}/gen/Makefile.inc" 901.24Scgd.include "${.CURDIR}/gmon/Makefile.inc" 911.81Sexplorer.include "${.CURDIR}/hash/Makefile.inc" 921.111Stshiozak.include "${.CURDIR}/iconv/Makefile.inc" 931.117Schristos.include "${.CURDIR}/inet/Makefile.inc" 941.117Schristos.include "${.CURDIR}/isc/Makefile.inc" 951.1Scgd.include "${.CURDIR}/locale/Makefile.inc" 961.52Sthorpej.include "${.CURDIR}/md/Makefile.inc" 971.1Scgd.include "${.CURDIR}/net/Makefile.inc" 981.117Schristos.include "${.CURDIR}/nameser/Makefile.inc" 991.25Sjtc.include "${.CURDIR}/nls/Makefile.inc" 1001.78Seeh.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64") 1011.24Scgd.include "${.CURDIR}/quad/Makefile.inc" 1021.34Scgd.endif 1031.24Scgd.include "${.CURDIR}/regex/Makefile.inc" 1041.117Schristos.include "${.CURDIR}/resolv/Makefile.inc" 1051.24Scgd.include "${.CURDIR}/rpc/Makefile.inc" 1061.1Scgd.include "${.CURDIR}/stdio/Makefile.inc" 1071.1Scgd.include "${.CURDIR}/stdlib/Makefile.inc" 1081.1Scgd.include "${.CURDIR}/string/Makefile.inc" 1091.40Sjtc.include "${.CURDIR}/termios/Makefile.inc" 1101.108Sthorpej.include "${.CURDIR}/thread-stub/Makefile.inc" 1111.38Sjtc.include "${.CURDIR}/time/Makefile.inc" 1121.1Scgd.include "${.CURDIR}/sys/Makefile.inc" 1131.104Sthorpej.if (${MKYP} != "no") 1141.4Sderaadt.include "${.CURDIR}/yp/Makefile.inc" 1151.104Sthorpej.endif 1161.41Sjtc 1171.109SjmmvNLS= C.msg Pig.msg ca.msg cs.msg de.msg es.msg fi.msg fr.msg nl.msg \ 1181.110Ssalo no.msg pl.msg sk.msg sv.msg 1191.1Scgd 1201.106SlukemLIBKERN= ${NETBSDSRCDIR}/sys/lib/libkern 1211.14Sjtc 1221.80SbouyerKSRCS= bcopy.c bcmp.c bswap16.c bswap32.c bswap64.c bzero.c ffs.c \ 1231.76Sperry strcat.c strchr.c strcmp.c strcpy.c strlen.c \ 1241.76Sperry strncmp.c strncpy.c strrchr.c \ 1251.76Sperry htonl.c htons.c ntohl.c ntohs.c md5c.c \ 1261.76Sperry memchr.c memcmp.c memcpy.c memmove.c memset.c \ 1271.76Sperry index.c rindex.c 1281.78Seeh.if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "sparc64") 1291.22ScgdKSRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 1301.22Scgd lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 1311.22Scgd subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 1321.22ScgdKINCLUDES+= quad/quad.h 1331.35Scgd.endif 1341.14Sjtc 1351.15Sjtccopy-to-libkern: copy-to-libkern-machind copy-to-libkern-machdep 1361.15Sjtc 1371.15Sjtccopy-to-libkern-machind: ${KSRCS} 1381.14Sjtc cp -p ${.ALLSRC} ${LIBKERN} 1391.35Scgd.if defined(KINCLUDES) && !empty(KINCLUDES) 1401.22Scgd (cd ${.CURDIR} ; cp -p ${KINCLUDES} ${LIBKERN}) 1411.35Scgd.endif 1421.14Sjtc 1431.15Sjtccopy-to-libkern-machdep: ${KMSRCS} 1441.15Sjtc.if defined(KMSRCS) && !empty(KMSRCS) 1451.83Sdrochner cp -p ${.ALLSRC} ${LIBKERN}/arch/${ARCHSUBDIR} 1461.18Scgd.endif 1471.18Scgd.if defined(KMINCLUDES) && !empty(KMINCLUDES) 1481.83Sdrochner (cd ${.CURDIR} ; cp -p ${KMINCLUDES} ${LIBKERN}/arch/${ARCHSUBDIR}) 1491.15Sjtc.endif 1501.15Sjtc 1511.14Sjtcrm-from-libkern: 1521.14Sjtc for i in ${KSRCS}; do rm -f ${LIBKERN}/$$i; done 1531.15Sjtc.if defined(KMSRCS) && !empty(KMSRCS) 1541.83Sdrochner for i in ${KMSRCS}; do rm -f ${LIBKERN}/arch/${ARCHSUBDIR}/$$i; done 1551.15Sjtc.endif 1561.36Scgd 1571.102Sthorpejrealall: tags 1581.102Sthorpejtags: ${SRCS} 1591.118Slukem ${_MKTARGET_CREATE} 1601.115Sross -${TOOL_CTAGS} -w ${.ALLSRC:M*.c} 1611.115Sross -egrep "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" /dev/null ${.ALLSRC:M*.S} | \ 1621.36Scgd sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \ 1631.64Schristos >> ${.TARGET}; sort -o ${.TARGET} ${.TARGET} 1641.65Schristos 1651.102SthorpejFILES= tags 1661.82StvFILESNAME= libc.tags 1671.82StvFILESDIR= /var/db 1681.32Scgd 1691.97Sitojun 1701.103Stshiozak# workaround for I18N stuffs: build singlebyte setlocale() for libc.a, 1711.97Sitojun# multibyte for libc.so. the quirk should be removed when we support 1721.97Sitojun# dlopen() from within statically linked binaries. 1731.105SyamtCSHLIBFLAGS+= -D_I18N_DYNAMIC 1741.105Syamt 1751.105Syamt.include <bsd.lib.mk> 176