xref: /freebsd/lib/libc/Makefile (revision e481bf775f89bd578ec32ca319c9d710aadc889f)
158f0484fSRodney W. Grimes#	@(#)Makefile	8.2 (Berkeley) 2/3/94
27f3dea24SPeter Wemm# $FreeBSD$
358f0484fSRodney W. Grimes#
4ecaaecd7SDavid E. O'Brien# All library objects contain FreeBSD revision strings by default; they may be
558f0484fSRodney W. Grimes# excluded as a space-saving measure.  To produce a library that does
654a5fb6cSDavid E. O'Brien# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
7e481bf77SBruce Evans# below.  Note: there are no IDs for syscall stubs whose sources are generated.
8e481bf77SBruce Evans# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
9e481bf77SBruce Evans# to CFLAGS below.  -DSYSLIBC_SCCS affects just the system call stubs.
1058f0484fSRodney W. GrimesLIB=c
11e481bf77SBruce Evans# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c.
12e481bf77SBruce Evans# If you bump SHLIB_MAJOR, see standards/55112.
1391e1be28SWarner LoshSHLIB_MAJOR= 5
1441d8423fSGordon TetlowSHLIBDIR?= /lib
158d870a43SJacques VidrineWARNS?=	1
160b3cbc5cSRuslan ErmilovCFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
170b3cbc5cSRuslan ErmilovCFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
1858f0484fSRodney W. GrimesCLEANFILES+=tags
192ceb2ce9SGarrett WollmanINSTALL_PIC_ARCHIVE=	yes
20fa04bc24SGarrett WollmanPRECIOUSLIB=	yes
2158f0484fSRodney W. Grimes
22c51d717fSRuslan Ermilov# Define (empty) variables so that make doesn't give substitution
23c51d717fSRuslan Ermilov# errors if the included makefiles don't change these:
24c51d717fSRuslan ErmilovMDSRCS=
25c51d717fSRuslan ErmilovMISRCS=
26c51d717fSRuslan ErmilovMDASM=
27c51d717fSRuslan ErmilovMIASM=
28c51d717fSRuslan ErmilovNOASM=
29c51d717fSRuslan Ermilov
3087003932SJohn Birrell#
31c51d717fSRuslan Ermilov# If there is a machine dependent makefile, use it:
3287003932SJohn Birrell#
33c51d717fSRuslan Ermilov.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
34c51d717fSRuslan Ermilov.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
35c51d717fSRuslan Ermilov.endif
36c51d717fSRuslan Ermilov
37c51d717fSRuslan Ermilov.include "${.CURDIR}/db/Makefile.inc"
38c51d717fSRuslan Ermilov.include "${.CURDIR}/compat-43/Makefile.inc"
39120a95cbSDavid E. O'Brien.include "${.CURDIR}/gdtoa/Makefile.inc"
40c51d717fSRuslan Ermilov.include "${.CURDIR}/gen/Makefile.inc"
41c51d717fSRuslan Ermilov.if ${MACHINE_ARCH} != "powerpc"
42c51d717fSRuslan Ermilov.include "${.CURDIR}/gmon/Makefile.inc"
43c51d717fSRuslan Ermilov.endif
44c51d717fSRuslan Ermilov.include "${.CURDIR}/locale/Makefile.inc"
45c51d717fSRuslan Ermilov.include "${.CURDIR}/net/Makefile.inc"
46c51d717fSRuslan Ermilov.include "${.CURDIR}/nls/Makefile.inc"
47c51d717fSRuslan Ermilov.include "${.CURDIR}/posix1e/Makefile.inc"
48c51d717fSRuslan Ermilov.if !defined(NO_QUAD)
49c51d717fSRuslan Ermilov.include "${.CURDIR}/quad/Makefile.inc"
50c51d717fSRuslan Ermilov.endif
51c51d717fSRuslan Ermilov.include "${.CURDIR}/regex/Makefile.inc"
52c51d717fSRuslan Ermilov.include "${.CURDIR}/stdio/Makefile.inc"
53c51d717fSRuslan Ermilov.include "${.CURDIR}/stdlib/Makefile.inc"
54c51d717fSRuslan Ermilov.include "${.CURDIR}/stdtime/Makefile.inc"
55c51d717fSRuslan Ermilov.include "${.CURDIR}/string/Makefile.inc"
56c51d717fSRuslan Ermilov.include "${.CURDIR}/sys/Makefile.inc"
57c51d717fSRuslan Ermilov.include "${.CURDIR}/rpc/Makefile.inc"
58c51d717fSRuslan Ermilov.include "${.CURDIR}/uuid/Makefile.inc"
59c51d717fSRuslan Ermilov.include "${.CURDIR}/xdr/Makefile.inc"
60c51d717fSRuslan Ermilov.if !defined(NO_YP_LIBC)
61c51d717fSRuslan ErmilovCFLAGS+= -DYP
62c51d717fSRuslan Ermilov.include "${.CURDIR}/yp/Makefile.inc"
63c51d717fSRuslan Ermilov.endif
64c51d717fSRuslan Ermilov.if !defined(NO_HESIOD_LIBC)
65c51d717fSRuslan ErmilovCFLAGS+= -DHESIOD
66c51d717fSRuslan Ermilov.endif
67c51d717fSRuslan Ermilov
68c51d717fSRuslan Ermilov# If there are no machine dependent sources, append all the
69c51d717fSRuslan Ermilov# machine-independent sources:
70c51d717fSRuslan Ermilov.if empty(MDSRCS)
71c51d717fSRuslan ErmilovSRCS+=	${MISRCS}
72c51d717fSRuslan Ermilov.else
73c51d717fSRuslan Ermilov# Append machine-dependent sources, then append machine-independent sources
74c51d717fSRuslan Ermilov# for which there is no machine-dependent variant.
75c51d717fSRuslan ErmilovSRCS+=	${MDSRCS}
76c51d717fSRuslan Ermilov.for _src in ${MISRCS}
77c51d717fSRuslan Ermilov.if ${MDSRCS:R:M${_src:R}} == ""
78c51d717fSRuslan ErmilovSRCS+=	${_src}
79c51d717fSRuslan Ermilov.endif
80c51d717fSRuslan Ermilov.endfor
81c51d717fSRuslan Ermilov.endif
8258f0484fSRodney W. Grimes
8358f0484fSRodney W. GrimesKQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
8458f0484fSRodney W. Grimes	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
8558f0484fSRodney W. Grimes	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
8658f0484fSRodney W. GrimesKSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
8758f0484fSRodney W. Grimes	strlen.c strncpy.c
8858f0484fSRodney W. Grimes
89d22114bfSKATO Takenorilibkern: libkern.gen libkern.${MACHINE_ARCH}
9058f0484fSRodney W. Grimes
9158f0484fSRodney W. Grimeslibkern.gen: ${KQSRCS} ${KSRCS}
926ded366aSSatoshi Asami	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
9358f0484fSRodney W. Grimes
94d22114bfSKATO Takenorilibkern.${MACHINE_ARCH}:: ${KMSRCS}
9558f0484fSRodney W. Grimes.if defined(KMSRCS) && !empty(KMSRCS)
96d22114bfSKATO Takenori	cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
9758f0484fSRodney W. Grimes.endif
9858f0484fSRodney W. Grimes
9958f0484fSRodney W. Grimes.include <bsd.lib.mk>
100