Makefile revision 169720
1# @(#)Makefile 8.2 (Berkeley) 2/3/94 2# $FreeBSD: head/lib/libc/Makefile 169720 2007-05-19 04:32:56Z kan $ 3 4SHLIBDIR?= /lib 5 6.include <bsd.own.mk> 7 8# All library objects contain FreeBSD revision strings by default; they may be 9# excluded as a space-saving measure. To produce a library that does 10# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 11# below. Note: there are no IDs for syscall stubs whose sources are generated. 12# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 13# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. 14LIB=c 15SHLIB_MAJOR= 7 16WARNS?= 2 17CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include 18CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} 19CLEANFILES+=tags 20INSTALL_PIC_ARCHIVE= 21PRECIOUSLIB= 22 23# 24# Only link with static libgcc.a (no libgcc_eh.a). 25# 26LDFLAGS+= -nodefaultlibs -lgcc 27 28# Define (empty) variables so that make doesn't give substitution 29# errors if the included makefiles don't change these: 30MDSRCS= 31MISRCS= 32MDASM= 33MIASM= 34NOASM= 35 36.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" 37.include "${.CURDIR}/db/Makefile.inc" 38.include "${.CURDIR}/compat-43/Makefile.inc" 39.include "${.CURDIR}/gdtoa/Makefile.inc" 40.include "${.CURDIR}/gen/Makefile.inc" 41.include "${.CURDIR}/gmon/Makefile.inc" 42.include "${.CURDIR}/inet/Makefile.inc" 43.include "${.CURDIR}/isc/Makefile.inc" 44.include "${.CURDIR}/locale/Makefile.inc" 45.include "${.CURDIR}/nameser/Makefile.inc" 46.include "${.CURDIR}/net/Makefile.inc" 47.include "${.CURDIR}/nls/Makefile.inc" 48.include "${.CURDIR}/posix1e/Makefile.inc" 49.if ${MACHINE_ARCH} != "amd64" && \ 50 ${MACHINE_ARCH} != "ia64" && \ 51 ${MACHINE_ARCH} != "sparc64" 52.include "${.CURDIR}/quad/Makefile.inc" 53.endif 54.include "${.CURDIR}/regex/Makefile.inc" 55.include "${.CURDIR}/resolv/Makefile.inc" 56.include "${.CURDIR}/stdio/Makefile.inc" 57.include "${.CURDIR}/stdlib/Makefile.inc" 58.include "${.CURDIR}/stdtime/Makefile.inc" 59.include "${.CURDIR}/string/Makefile.inc" 60.include "${.CURDIR}/sys/Makefile.inc" 61.include "${.CURDIR}/rpc/Makefile.inc" 62.include "${.CURDIR}/uuid/Makefile.inc" 63.include "${.CURDIR}/xdr/Makefile.inc" 64.if ${MACHINE_ARCH} == "arm" 65.include "${.CURDIR}/softfloat/Makefile.inc" 66.endif 67.if ${MK_NIS} != "no" 68CFLAGS+= -DYP 69.include "${.CURDIR}/yp/Makefile.inc" 70.endif 71.if ${MK_HESIOD} != "no" 72CFLAGS+= -DHESIOD 73.endif 74.if ${MK_FP_LIBC} == "no" 75CFLAGS+= -DNO_FLOATING_POINT 76.endif 77.if ${MK_NS_CACHING} != "no" 78CFLAGS+= -DNS_CACHING 79.endif 80.if defined(_FREEFALL_CONFIG) 81CFLAGS+=-D_FREEFALL_CONFIG 82.endif 83 84VERSION_DEF=${.CURDIR}/Versions.def 85SYMBOL_MAPS=${SYM_MAPS} 86CFLAGS+= -DSYMBOL_VERSIONING 87 88# If there are no machine dependent sources, append all the 89# machine-independent sources: 90.if empty(MDSRCS) 91SRCS+= ${MISRCS} 92.else 93# Append machine-dependent sources, then append machine-independent sources 94# for which there is no machine-dependent variant. 95SRCS+= ${MDSRCS} 96.for _src in ${MISRCS} 97.if ${MDSRCS:R:M${_src:R}} == "" 98SRCS+= ${_src} 99.endif 100.endfor 101.endif 102 103KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 104 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 105 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 106KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ 107 strcat.c strcmp.c strcpy.c strlen.c strncpy.c 108 109libkern: libkern.gen libkern.${MACHINE_ARCH} 110 111libkern.gen: ${KQSRCS} ${KSRCS} 112 cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 113 114libkern.${MACHINE_ARCH}:: ${KMSRCS} 115.if defined(KMSRCS) && !empty(KMSRCS) 116 cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} 117.endif 118 119.include <bsd.lib.mk> 120 121# Disable warnings in contributed sources. 122CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/} 123