Makefile revision 158115
1161304Snetchild# @(#)Makefile 8.2 (Berkeley) 2/3/94 2161304Snetchild# $FreeBSD: head/lib/libc/Makefile 158115 2006-04-28 12:03:38Z ume $ 3293493Sdchagin 4161304SnetchildSHLIBDIR?= /lib 5161304Snetchild 6161304Snetchild.include <bsd.own.mk> 7161304Snetchild 8161304Snetchild# All library objects contain FreeBSD revision strings by default; they may be 9161304Snetchild# excluded as a space-saving measure. To produce a library that does 10161304Snetchild# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 11161304Snetchild# below. Note: there are no IDs for syscall stubs whose sources are generated. 12161304Snetchild# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 13161304Snetchild# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. 14161304SnetchildLIB=c 15161304Snetchild# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c. 16161304Snetchild# If you bump SHLIB_MAJOR, see standards/55112. 17161304SnetchildSHLIB_MAJOR= 6 18161304SnetchildWARNS?= 2 19161304SnetchildCFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include 20161304SnetchildCFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} 21161304SnetchildCLEANFILES+=tags 22161304SnetchildINSTALL_PIC_ARCHIVE= 23161304SnetchildPRECIOUSLIB= 24161304Snetchild 25161304Snetchild# Define (empty) variables so that make doesn't give substitution 26161304Snetchild# errors if the included makefiles don't change these: 27161304SnetchildMDSRCS= 28161304SnetchildMISRCS= 29161304SnetchildMDASM= 30161304SnetchildMIASM= 31161304SnetchildNOASM= 32161304Snetchild 33161304Snetchild.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" 34161304Snetchild.include "${.CURDIR}/db/Makefile.inc" 35161304Snetchild.include "${.CURDIR}/compat-43/Makefile.inc" 36166420Skib.include "${.CURDIR}/gdtoa/Makefile.inc" 37293493Sdchagin.include "${.CURDIR}/gen/Makefile.inc" 38161304Snetchild.include "${.CURDIR}/gmon/Makefile.inc" 39161304Snetchild.include "${.CURDIR}/inet/Makefile.inc" 40161304Snetchild.include "${.CURDIR}/isc/Makefile.inc" 41161304Snetchild.include "${.CURDIR}/locale/Makefile.inc" 42161304Snetchild.include "${.CURDIR}/nameser/Makefile.inc" 43161304Snetchild.include "${.CURDIR}/net/Makefile.inc" 44215706Sdim.include "${.CURDIR}/nls/Makefile.inc" 45161304Snetchild.include "${.CURDIR}/posix1e/Makefile.inc" 46178976Srdivacky.if ${MACHINE_ARCH} != "alpha" && \ 47246085Sjhb ${MACHINE_ARCH} != "amd64" && \ 48293493Sdchagin ${MACHINE_ARCH} != "ia64" && \ 49178976Srdivacky ${MACHINE_ARCH} != "sparc64" 50235063Snetchild.include "${.CURDIR}/quad/Makefile.inc" 51293493Sdchagin.endif 52293528Sdchagin.include "${.CURDIR}/regex/Makefile.inc" 53293493Sdchagin.include "${.CURDIR}/resolv/Makefile.inc" 54293493Sdchagin.include "${.CURDIR}/stdio/Makefile.inc" 55293493Sdchagin.include "${.CURDIR}/stdlib/Makefile.inc" 56161304Snetchild.include "${.CURDIR}/stdtime/Makefile.inc" 57293493Sdchagin.include "${.CURDIR}/string/Makefile.inc" 58161304Snetchild.include "${.CURDIR}/sys/Makefile.inc" 59161304Snetchild.include "${.CURDIR}/rpc/Makefile.inc" 60161304Snetchild.include "${.CURDIR}/uuid/Makefile.inc" 61293493Sdchagin.include "${.CURDIR}/xdr/Makefile.inc" 62161304Snetchild.if ${MACHINE_ARCH} == "arm" 63161304Snetchild.include "${.CURDIR}/softfloat/Makefile.inc" 64161304Snetchild.endif 65161304Snetchild.if ${MK_NIS} != "no" 66293528SdchaginCFLAGS+= -DYP 67293528Sdchagin.include "${.CURDIR}/yp/Makefile.inc" 68293528Sdchagin.endif 69293528Sdchagin.if ${MK_HESIOD} != "no" 70293528SdchaginCFLAGS+= -DHESIOD 71293528Sdchagin.endif 72293528Sdchagin.if ${MK_FP_LIBC} == "no" 73293528SdchaginCFLAGS+= -DNO_FLOATING_POINT 74293528Sdchagin.endif 75293528Sdchagin.if ${MK_NS_CACHING} != "no" 76293528SdchaginCFLAGS+= -DNS_CACHING 77293528Sdchagin.endif 78293528Sdchagin 79293528Sdchagin.if defined(SYMVER_ENABLED) 80293528SdchaginVERSION_DEF=${.CURDIR}/Versions.def 81293528SdchaginSYMBOL_MAPS=${SYM_MAPS} 82293493SdchaginCFLAGS+= -DSYMBOL_VERSIONING 83293493Sdchagin.endif 84161304Snetchild 85293493Sdchagin# If there are no machine dependent sources, append all the 86293528Sdchagin# machine-independent sources: 87293546Sdchagin.if empty(MDSRCS) 88293559SdchaginSRCS+= ${MISRCS} 89161304Snetchild.else 90293493Sdchagin# Append machine-dependent sources, then append machine-independent sources 91293559Sdchagin# for which there is no machine-dependent variant. 92293559SdchaginSRCS+= ${MDSRCS} 93293493Sdchagin.for _src in ${MISRCS} 94293493Sdchagin.if ${MDSRCS:R:M${_src:R}} == "" 95167157SjkimSRCS+= ${_src} 96293546Sdchagin.endif 97293546Sdchagin.endfor 98293546Sdchagin.endif 99293493Sdchagin 100161304SnetchildKQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 101293559Sdchagin lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 102235063Snetchild subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 103293559SdchaginKSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ 104293528Sdchagin strcat.c strcmp.c strcpy.c strlen.c strncpy.c 105293532Sdchagin 106293528Sdchaginlibkern: libkern.gen libkern.${MACHINE_ARCH} 107293559Sdchagin 108161304Snetchildlibkern.gen: ${KQSRCS} ${KSRCS} 109293493Sdchagin cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 110161304Snetchild 111293559Sdchaginlibkern.${MACHINE_ARCH}:: ${KMSRCS} 112293559Sdchagin.if defined(KMSRCS) && !empty(KMSRCS) 113235063Snetchild cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} 114293559Sdchagin.endif 115235063Snetchild 116161304Snetchild.include <bsd.lib.mk> 117293493Sdchagin 118161304Snetchild# Disable warnings in contributed sources. 119293493SdchaginCWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/} 120293559Sdchagin