Makefile revision 156773
1#	@(#)Makefile	8.2 (Berkeley) 2/3/94
2# $FreeBSD: head/lib/libc/Makefile 156773 2006-03-16 15:16:23Z deischen $
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 include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
9# to CFLAGS below.  -DSYSLIBC_SCCS affects just the system call stubs.
10LIB=c
11# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c.
12# If you bump SHLIB_MAJOR, see standards/55112.
13SHLIB_MAJOR= 6
14SHLIBDIR?= /lib
15WARNS?=	2
16CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
17CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
18CLEANFILES+=tags
19INSTALL_PIC_ARCHIVE=
20PRECIOUSLIB=
21
22# Define (empty) variables so that make doesn't give substitution
23# errors if the included makefiles don't change these:
24MDSRCS=
25MISRCS=
26MDASM=
27MIASM=
28NOASM=
29
30.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
31.include "${.CURDIR}/db/Makefile.inc"
32.include "${.CURDIR}/compat-43/Makefile.inc"
33.include "${.CURDIR}/gdtoa/Makefile.inc"
34.include "${.CURDIR}/gen/Makefile.inc"
35.include "${.CURDIR}/gmon/Makefile.inc"
36.include "${.CURDIR}/locale/Makefile.inc"
37.include "${.CURDIR}/net/Makefile.inc"
38.include "${.CURDIR}/nls/Makefile.inc"
39.include "${.CURDIR}/posix1e/Makefile.inc"
40.if ${MACHINE_ARCH} != "alpha" && \
41    ${MACHINE_ARCH} != "amd64" && \
42    ${MACHINE_ARCH} != "ia64" && \
43    ${MACHINE_ARCH} != "sparc64"
44.include "${.CURDIR}/quad/Makefile.inc"
45.endif
46.include "${.CURDIR}/regex/Makefile.inc"
47.include "${.CURDIR}/stdio/Makefile.inc"
48.include "${.CURDIR}/stdlib/Makefile.inc"
49.include "${.CURDIR}/stdtime/Makefile.inc"
50.include "${.CURDIR}/string/Makefile.inc"
51.include "${.CURDIR}/sys/Makefile.inc"
52.include "${.CURDIR}/rpc/Makefile.inc"
53.include "${.CURDIR}/uuid/Makefile.inc"
54.include "${.CURDIR}/xdr/Makefile.inc"
55.if ${MACHINE_ARCH} == "arm"
56.include "${.CURDIR}/softfloat/Makefile.inc"
57.endif
58.if !defined(NO_NIS)
59CFLAGS+= -DYP
60.include "${.CURDIR}/yp/Makefile.inc"
61.endif
62.if defined(YES_HESIOD)
63CFLAGS+= -DHESIOD
64.endif
65.if defined(NO_FP_LIBC)
66CFLAGS+= -DNO_FLOATING_POINT
67.endif
68
69.if defined(SYMVER_ENABLED)
70VERSION_DEF=${.CURDIR}/Versions.def
71SYMBOL_MAPS=${SYM_MAPS}
72CFLAGS+= -DSYMBOL_VERSIONING
73.endif
74
75# If there are no machine dependent sources, append all the
76# machine-independent sources:
77.if empty(MDSRCS)
78SRCS+=	${MISRCS}
79.else
80# Append machine-dependent sources, then append machine-independent sources
81# for which there is no machine-dependent variant.
82SRCS+=	${MDSRCS}
83.for _src in ${MISRCS}
84.if ${MDSRCS:R:M${_src:R}} == ""
85SRCS+=	${_src}
86.endif
87.endfor
88.endif
89
90KQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
91	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
92	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
93KSRCS=	bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
94	strcat.c strcmp.c strcpy.c strlen.c strncpy.c
95
96libkern: libkern.gen libkern.${MACHINE_ARCH}
97
98libkern.gen: ${KQSRCS} ${KSRCS}
99	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
100
101libkern.${MACHINE_ARCH}:: ${KMSRCS}
102.if defined(KMSRCS) && !empty(KMSRCS)
103	cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
104.endif
105        
106.include <bsd.lib.mk>
107
108# Disable warnings in contributed sources.
109CWARNFLAGS:=	${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/}
110