Makefile revision 107052
1#	@(#)Makefile	8.2 (Berkeley) 2/3/94
2# $FreeBSD: head/lib/libc/Makefile 107052 2002-11-18 09:50:57Z ru $
3#
4# All library objects contain FreeBSD revision strings by default; they may be
5# excluded as a space-saving measure.  To produce a library that does
6# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
7# below.  Note, there are no IDs for syscall stubs whose sources are generated.
8# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
9# (for system call stubs) to CFLAGS below.  -DSYSLIBC_SCCS affects just the
10# system call stubs.
11LIB=c
12SHLIB_MAJOR= 5
13CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
14AINC=	-I${.CURDIR}/${MACHINE_ARCH}
15CLEANFILES+=tags
16INSTALL_PIC_ARCHIVE=	yes
17PRECIOUSLIB=	yes
18
19# Define (empty) variables so that make doesn't give substitution
20# errors if the included makefiles don't change these:
21MDSRCS=
22MISRCS=
23MDASM=
24MIASM=
25NOASM=
26
27#
28# If there is a machine dependent makefile, use it:
29#
30.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
31.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
32.endif
33
34.include "${.CURDIR}/db/Makefile.inc"
35.include "${.CURDIR}/compat-43/Makefile.inc"
36.include "${.CURDIR}/gen/Makefile.inc"
37.if ${MACHINE_ARCH} != "powerpc"
38.include "${.CURDIR}/gmon/Makefile.inc"
39.endif
40.include "${.CURDIR}/locale/Makefile.inc"
41.include "${.CURDIR}/net/Makefile.inc"
42.include "${.CURDIR}/nls/Makefile.inc"
43.include "${.CURDIR}/posix1e/Makefile.inc"
44.if !defined(NO_QUAD)
45.include "${.CURDIR}/quad/Makefile.inc"
46.endif
47.include "${.CURDIR}/regex/Makefile.inc"
48.include "${.CURDIR}/stdio/Makefile.inc"
49.include "${.CURDIR}/stdlib/Makefile.inc"
50.include "${.CURDIR}/stdtime/Makefile.inc"
51.include "${.CURDIR}/string/Makefile.inc"
52.include "${.CURDIR}/sys/Makefile.inc"
53.include "${.CURDIR}/rpc/Makefile.inc"
54.include "${.CURDIR}/uuid/Makefile.inc"
55.include "${.CURDIR}/xdr/Makefile.inc"
56.if !defined(NO_YP_LIBC)
57CFLAGS+= -DYP
58.include "${.CURDIR}/yp/Makefile.inc"
59.endif
60.if !defined(NO_HESIOD_LIBC)
61CFLAGS+= -DHESIOD
62.endif
63
64# If there are no machine dependent sources, append all the
65# machine-independent sources:
66.if empty(MDSRCS)
67SRCS+=	${MISRCS}
68.else
69# Append machine-dependent sources, then append machine-independent sources
70# for which there is no machine-dependent variant.
71SRCS+=	${MDSRCS}
72.for _src in ${MISRCS}
73.if ${MDSRCS:R:M${_src:R}} == ""
74SRCS+=	${_src}
75.endif
76.endfor
77.endif
78
79KQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
80	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
81	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
82KSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
83	strlen.c strncpy.c
84
85libkern: libkern.gen libkern.${MACHINE_ARCH}
86
87libkern.gen: ${KQSRCS} ${KSRCS}
88	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
89
90libkern.${MACHINE_ARCH}:: ${KMSRCS}
91.if defined(KMSRCS) && !empty(KMSRCS)
92	cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
93.endif
94
95.include <bsd.lib.mk>
96