Makefile revision 119071
118340Sswallace#	@(#)Makefile	8.2 (Berkeley) 2/3/94
215353Swosch# $FreeBSD: head/lib/libc/Makefile 119071 2003-08-18 15:25:39Z obrien $
315353Swosch#
415353Swosch# All library objects contain FreeBSD revision strings by default; they may be
515353Swosch# excluded as a space-saving measure.  To produce a library that does
615353Swosch# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
715353Swosch# below.  Note, there are no IDs for syscall stubs whose sources are generated.
815353Swosch# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
915948Swosch# (for system call stubs) to CFLAGS below.  -DSYSLIBC_SCCS affects just the
1015948Swosch# system call stubs.
1118340SswallaceLIB=c
1218340SswallaceSHLIB_MAJOR= 5
1315948SwoschSHLIBDIR?= /lib
1415948SwoschCFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
1515353SwoschCFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
1618340SswallaceCLEANFILES+=tags
1715948SwoschINSTALL_PIC_ARCHIVE=	yes
1816663SjkhPRECIOUSLIB=	yes
1915353Swosch
2018340Sswallace# Define (empty) variables so that make doesn't give substitution
2116663Sjkh# errors if the included makefiles don't change these:
2215353SwoschMDSRCS=
2315353SwoschMISRCS=
2415353SwoschMDASM=
2515353SwoschMIASM=
2615353SwoschNOASM=
2715353Swosch
2815353Swosch#
2916663Sjkh# If there is a machine dependent makefile, use it:
3015353Swosch#
3115353Swosch.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
3216663Sjkh.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
3315353Swosch.endif
3414801Swosch
3518340Sswallace.include "${.CURDIR}/db/Makefile.inc"
3618340Sswallace.include "${.CURDIR}/compat-43/Makefile.inc"
3718340Sswallace.include "${.CURDIR}/gdtoa/Makefile.inc"
3818340Sswallace.include "${.CURDIR}/gen/Makefile.inc"
3918340Sswallace.if ${MACHINE_ARCH} != "powerpc"
4014801Swosch.include "${.CURDIR}/gmon/Makefile.inc"
4118340Sswallace.endif
4218340Sswallace.include "${.CURDIR}/locale/Makefile.inc"
4318340Sswallace.include "${.CURDIR}/net/Makefile.inc"
4418340Sswallace.include "${.CURDIR}/nls/Makefile.inc"
4518340Sswallace.include "${.CURDIR}/posix1e/Makefile.inc"
4618340Sswallace.if !defined(NO_QUAD)
4718340Sswallace.include "${.CURDIR}/quad/Makefile.inc"
4818340Sswallace.endif
4918340Sswallace.include "${.CURDIR}/regex/Makefile.inc"
5018340Sswallace.include "${.CURDIR}/stdio/Makefile.inc"
5118340Sswallace.include "${.CURDIR}/stdlib/Makefile.inc"
5218340Sswallace.include "${.CURDIR}/stdtime/Makefile.inc"
5318340Sswallace.include "${.CURDIR}/string/Makefile.inc"
5418340Sswallace.include "${.CURDIR}/sys/Makefile.inc"
5518340Sswallace.include "${.CURDIR}/rpc/Makefile.inc"
5614801Swosch.include "${.CURDIR}/uuid/Makefile.inc"
5714801Swosch.include "${.CURDIR}/xdr/Makefile.inc"
5814801Swosch.if !defined(NO_YP_LIBC)
5914801SwoschCFLAGS+= -DYP
6016663Sjkh.include "${.CURDIR}/yp/Makefile.inc"
6116663Sjkh.endif
6218340Sswallace.if !defined(NO_HESIOD_LIBC)
6318340SswallaceCFLAGS+= -DHESIOD
6418340Sswallace.endif
6518340Sswallace
6616663Sjkh# If there are no machine dependent sources, append all the
6716663Sjkh# machine-independent sources:
6818340Sswallace.if empty(MDSRCS)
6916663SjkhSRCS+=	${MISRCS}
7015353Swosch.else
7116663Sjkh# Append machine-dependent sources, then append machine-independent sources
7218340Sswallace# for which there is no machine-dependent variant.
7318340SswallaceSRCS+=	${MDSRCS}
7418340Sswallace.for _src in ${MISRCS}
7518340Sswallace.if ${MDSRCS:R:M${_src:R}} == ""
7616663SjkhSRCS+=	${_src}
7716663Sjkh.endif
7818051Sbde.endfor
7918340Sswallace.endif
8018340Sswallace
8114801SwoschKQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
8214801Swosch	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
8314801Swosch	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
8415353SwoschKSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
8514801Swosch	strlen.c strncpy.c
8616663Sjkh
8716663Sjkhlibkern: libkern.gen libkern.${MACHINE_ARCH}
8818340Sswallace
8918051Sbdelibkern.gen: ${KQSRCS} ${KSRCS}
9018340Sswallace	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
9116663Sjkh
9218340Sswallacelibkern.${MACHINE_ARCH}:: ${KMSRCS}
9316663Sjkh.if defined(KMSRCS) && !empty(KMSRCS)
9416663Sjkh	cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
9516663Sjkh.endif
9615166Swosch
9717116Spst.include <bsd.lib.mk>
9817116Spst