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