Makefile revision 117120
1219820Sjeff# @(#)Makefile 8.2 (Berkeley) 2/3/94 2219820Sjeff# $FreeBSD: head/lib/libc/Makefile 117120 2003-07-01 15:07:01Z ru $ 3219820Sjeff# 4219820Sjeff# All library objects contain FreeBSD revision strings by default; they may be 5219820Sjeff# excluded as a space-saving measure. To produce a library that does 6219820Sjeff# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 7219820Sjeff# below. Note, there are no IDs for syscall stubs whose sources are generated. 8219820Sjeff# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 9219820Sjeff# (for system call stubs) to CFLAGS below. -DSYSLIBC_SCCS affects just the 10219820Sjeff# system call stubs. 11219820SjeffLIB=c 12219820SjeffSHLIB_MAJOR= 5 13219820SjeffCFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include 14219820SjeffCFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} 15219820SjeffCLEANFILES+=tags 16219820SjeffINSTALL_PIC_ARCHIVE= yes 17219820SjeffPRECIOUSLIB= yes 18219820Sjeff 19219820Sjeff# Define (empty) variables so that make doesn't give substitution 20219820Sjeff# errors if the included makefiles don't change these: 21219820SjeffMDSRCS= 22219820SjeffMISRCS= 23219820SjeffMDASM= 24219820SjeffMIASM= 25219820SjeffNOASM= 26219820Sjeff 27219820Sjeff# 28219820Sjeff# If there is a machine dependent makefile, use it: 29219820Sjeff# 30219820Sjeff.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc) 31219820Sjeff.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" 32219820Sjeff.endif 33219820Sjeff 34219820Sjeff.include "${.CURDIR}/db/Makefile.inc" 35219820Sjeff.include "${.CURDIR}/compat-43/Makefile.inc" 36219820Sjeff.include "${.CURDIR}/gdtoa/Makefile.inc" 37219820Sjeff.include "${.CURDIR}/gen/Makefile.inc" 38219820Sjeff.if ${MACHINE_ARCH} != "powerpc" 39219820Sjeff.include "${.CURDIR}/gmon/Makefile.inc" 40219820Sjeff.endif 41219820Sjeff.include "${.CURDIR}/locale/Makefile.inc" 42219820Sjeff.include "${.CURDIR}/net/Makefile.inc" 43219820Sjeff.include "${.CURDIR}/nls/Makefile.inc" 44219820Sjeff.include "${.CURDIR}/posix1e/Makefile.inc" 45219820Sjeff.if !defined(NO_QUAD) 46219820Sjeff.include "${.CURDIR}/quad/Makefile.inc" 47219820Sjeff.endif 48219820Sjeff.include "${.CURDIR}/regex/Makefile.inc" 49219820Sjeff.include "${.CURDIR}/stdio/Makefile.inc" 50219820Sjeff.include "${.CURDIR}/stdlib/Makefile.inc" 51219820Sjeff.include "${.CURDIR}/stdtime/Makefile.inc" 52219820Sjeff.include "${.CURDIR}/string/Makefile.inc" 53219820Sjeff.include "${.CURDIR}/sys/Makefile.inc" 54219820Sjeff.include "${.CURDIR}/rpc/Makefile.inc" 55219820Sjeff.include "${.CURDIR}/uuid/Makefile.inc" 56219820Sjeff.include "${.CURDIR}/xdr/Makefile.inc" 57219820Sjeff.if !defined(NO_YP_LIBC) 58219820SjeffCFLAGS+= -DYP 59219820Sjeff.include "${.CURDIR}/yp/Makefile.inc" 60219820Sjeff.endif 61219820Sjeff.if !defined(NO_HESIOD_LIBC) 62219820SjeffCFLAGS+= -DHESIOD 63219820Sjeff.endif 64219820Sjeff 65219820Sjeff# If there are no machine dependent sources, append all the 66219820Sjeff# machine-independent sources: 67219820Sjeff.if empty(MDSRCS) 68219820SjeffSRCS+= ${MISRCS} 69219820Sjeff.else 70219820Sjeff# Append machine-dependent sources, then append machine-independent sources 71219820Sjeff# for which there is no machine-dependent variant. 72219820SjeffSRCS+= ${MDSRCS} 73219820Sjeff.for _src in ${MISRCS} 74219820Sjeff.if ${MDSRCS:R:M${_src:R}} == "" 75219820SjeffSRCS+= ${_src} 76219820Sjeff.endif 77219820Sjeff.endfor 78219820Sjeff.endif 79219820Sjeff 80219820SjeffKQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 81219820Sjeff lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 82219820Sjeff subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 83219820SjeffKSRCS= bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \ 84219820Sjeff strlen.c strncpy.c 85219820Sjeff 86219820Sjefflibkern: libkern.gen libkern.${MACHINE_ARCH} 87219820Sjeff 88219820Sjefflibkern.gen: ${KQSRCS} ${KSRCS} 89219820Sjeff cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 90219820Sjeff 91219820Sjefflibkern.${MACHINE_ARCH}:: ${KMSRCS} 92219820Sjeff.if defined(KMSRCS) && !empty(KMSRCS) 93219820Sjeff cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} 94219820Sjeff.endif 95219820Sjeff 96219820Sjeff.include <bsd.lib.mk> 97219820Sjeff