]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/Makefile
This commit was generated by cvs2svn to compensate for changes in r161389,
[FreeBSD/FreeBSD.git] / lib / libc / Makefile
1 #       @(#)Makefile    8.2 (Berkeley) 2/3/94
2 # $FreeBSD$
3
4 SHLIBDIR?= /lib
5
6 .include <bsd.own.mk>
7
8 # All library objects contain FreeBSD revision strings by default; they may be
9 # excluded as a space-saving measure.  To produce a library that does
10 # not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
11 # below.  Note: there are no IDs for syscall stubs whose sources are generated.
12 # To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
13 # to CFLAGS below.  -DSYSLIBC_SCCS affects just the system call stubs.
14 LIB=c
15 SHLIB_MAJOR= 7
16 WARNS?= 2
17 CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
18 CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
19 CLEANFILES+=tags
20 INSTALL_PIC_ARCHIVE=
21 PRECIOUSLIB=
22
23 # Define (empty) variables so that make doesn't give substitution
24 # errors if the included makefiles don't change these:
25 MDSRCS=
26 MISRCS=
27 MDASM=
28 MIASM=
29 NOASM=
30
31 .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
32 .include "${.CURDIR}/db/Makefile.inc"
33 .include "${.CURDIR}/compat-43/Makefile.inc"
34 .include "${.CURDIR}/gdtoa/Makefile.inc"
35 .include "${.CURDIR}/gen/Makefile.inc"
36 .include "${.CURDIR}/gmon/Makefile.inc"
37 .include "${.CURDIR}/inet/Makefile.inc"
38 .include "${.CURDIR}/isc/Makefile.inc"
39 .include "${.CURDIR}/locale/Makefile.inc"
40 .include "${.CURDIR}/nameser/Makefile.inc"
41 .include "${.CURDIR}/net/Makefile.inc"
42 .include "${.CURDIR}/nls/Makefile.inc"
43 .include "${.CURDIR}/posix1e/Makefile.inc"
44 .if ${MACHINE_ARCH} != "alpha" && \
45     ${MACHINE_ARCH} != "amd64" && \
46     ${MACHINE_ARCH} != "ia64" && \
47     ${MACHINE_ARCH} != "sparc64"
48 .include "${.CURDIR}/quad/Makefile.inc"
49 .endif
50 .include "${.CURDIR}/regex/Makefile.inc"
51 .include "${.CURDIR}/resolv/Makefile.inc"
52 .include "${.CURDIR}/stdio/Makefile.inc"
53 .include "${.CURDIR}/stdlib/Makefile.inc"
54 .include "${.CURDIR}/stdtime/Makefile.inc"
55 .include "${.CURDIR}/string/Makefile.inc"
56 .include "${.CURDIR}/sys/Makefile.inc"
57 .include "${.CURDIR}/rpc/Makefile.inc"
58 .include "${.CURDIR}/uuid/Makefile.inc"
59 .include "${.CURDIR}/xdr/Makefile.inc"
60 .if ${MACHINE_ARCH} == "arm"
61 .include "${.CURDIR}/softfloat/Makefile.inc"
62 .endif
63 .if ${MK_NIS} != "no"
64 CFLAGS+= -DYP
65 .include "${.CURDIR}/yp/Makefile.inc"
66 .endif
67 .if ${MK_HESIOD} != "no"
68 CFLAGS+= -DHESIOD
69 .endif
70 .if ${MK_FP_LIBC} == "no"
71 CFLAGS+= -DNO_FLOATING_POINT
72 .endif
73 .if ${MK_NS_CACHING} != "no"
74 CFLAGS+= -DNS_CACHING
75 .endif
76
77 .if defined(SYMVER_ENABLED)
78 VERSION_DEF=${.CURDIR}/Versions.def
79 SYMBOL_MAPS=${SYM_MAPS}
80 CFLAGS+= -DSYMBOL_VERSIONING
81 .endif
82
83 # If there are no machine dependent sources, append all the
84 # machine-independent sources:
85 .if empty(MDSRCS)
86 SRCS+=  ${MISRCS}
87 .else
88 # Append machine-dependent sources, then append machine-independent sources
89 # for which there is no machine-dependent variant.
90 SRCS+=  ${MDSRCS}
91 .for _src in ${MISRCS}
92 .if ${MDSRCS:R:M${_src:R}} == ""
93 SRCS+=  ${_src}
94 .endif
95 .endfor
96 .endif
97
98 KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
99         lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
100         subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
101 KSRCS=  bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
102         strcat.c strcmp.c strcpy.c strlen.c strncpy.c
103
104 libkern: libkern.gen libkern.${MACHINE_ARCH}
105
106 libkern.gen: ${KQSRCS} ${KSRCS}
107         cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
108
109 libkern.${MACHINE_ARCH}:: ${KMSRCS}
110 .if defined(KMSRCS) && !empty(KMSRCS)
111         cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
112 .endif
113         
114 .include <bsd.lib.mk>
115
116 # Disable warnings in contributed sources.
117 CWARNFLAGS:=    ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/}