]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/Makefile
This commit was generated by cvs2svn to compensate for changes in r170222,
[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 #
24 # Only link with static libgcc.a (no libgcc_eh.a).
25 #
26 LDFLAGS+= -nodefaultlibs
27 LDADD+= -lgcc
28
29 # Define (empty) variables so that make doesn't give substitution
30 # errors if the included makefiles don't change these:
31 MDSRCS=
32 MISRCS=
33 MDASM=
34 MIASM=
35 NOASM=
36
37 .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
38 .include "${.CURDIR}/db/Makefile.inc"
39 .include "${.CURDIR}/compat-43/Makefile.inc"
40 .include "${.CURDIR}/gdtoa/Makefile.inc"
41 .include "${.CURDIR}/gen/Makefile.inc"
42 .include "${.CURDIR}/gmon/Makefile.inc"
43 .include "${.CURDIR}/inet/Makefile.inc"
44 .include "${.CURDIR}/isc/Makefile.inc"
45 .include "${.CURDIR}/locale/Makefile.inc"
46 .include "${.CURDIR}/nameser/Makefile.inc"
47 .include "${.CURDIR}/net/Makefile.inc"
48 .include "${.CURDIR}/nls/Makefile.inc"
49 .include "${.CURDIR}/posix1e/Makefile.inc"
50 .if ${MACHINE_ARCH} != "amd64" && \
51     ${MACHINE_ARCH} != "ia64" && \
52     ${MACHINE_ARCH} != "sparc64"
53 .include "${.CURDIR}/quad/Makefile.inc"
54 .endif
55 .include "${.CURDIR}/regex/Makefile.inc"
56 .include "${.CURDIR}/resolv/Makefile.inc"
57 .include "${.CURDIR}/stdio/Makefile.inc"
58 .include "${.CURDIR}/stdlib/Makefile.inc"
59 .include "${.CURDIR}/stdtime/Makefile.inc"
60 .include "${.CURDIR}/string/Makefile.inc"
61 .include "${.CURDIR}/sys/Makefile.inc"
62 .include "${.CURDIR}/rpc/Makefile.inc"
63 .include "${.CURDIR}/uuid/Makefile.inc"
64 .include "${.CURDIR}/xdr/Makefile.inc"
65 .if ${MACHINE_ARCH} == "arm"
66 .include "${.CURDIR}/softfloat/Makefile.inc"
67 .endif
68 .if ${MK_NIS} != "no"
69 CFLAGS+= -DYP
70 .include "${.CURDIR}/yp/Makefile.inc"
71 .endif
72 .if ${MK_HESIOD} != "no"
73 CFLAGS+= -DHESIOD
74 .endif
75 .if ${MK_FP_LIBC} == "no"
76 CFLAGS+= -DNO_FLOATING_POINT
77 .endif
78 .if ${MK_NS_CACHING} != "no"
79 CFLAGS+= -DNS_CACHING
80 .endif
81 .if defined(_FREEFALL_CONFIG)
82 CFLAGS+=-D_FREEFALL_CONFIG
83 .endif
84
85 VERSION_DEF=${.CURDIR}/Versions.def
86 SYMBOL_MAPS=${SYM_MAPS}
87 CFLAGS+= -DSYMBOL_VERSIONING
88
89 # If there are no machine dependent sources, append all the
90 # machine-independent sources:
91 .if empty(MDSRCS)
92 SRCS+=  ${MISRCS}
93 .else
94 # Append machine-dependent sources, then append machine-independent sources
95 # for which there is no machine-dependent variant.
96 SRCS+=  ${MDSRCS}
97 .for _src in ${MISRCS}
98 .if ${MDSRCS:R:M${_src:R}} == ""
99 SRCS+=  ${_src}
100 .endif
101 .endfor
102 .endif
103
104 KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
105         lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
106         subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
107 KSRCS=  bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
108         strcat.c strcmp.c strcpy.c strlen.c strncpy.c
109
110 libkern: libkern.gen libkern.${MACHINE_ARCH}
111
112 libkern.gen: ${KQSRCS} ${KSRCS}
113         cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
114
115 libkern.${MACHINE_ARCH}:: ${KMSRCS}
116 .if defined(KMSRCS) && !empty(KMSRCS)
117         cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
118 .endif
119         
120 .include <bsd.lib.mk>
121
122 # Disable warnings in contributed sources.
123 CWARNFLAGS:=    ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/}