FreeBSD/Linux Kernel Cross Reference
sys/Makefile
1 # @(#)Makefile 8.2 (Berkeley) 2/3/94
2 # $FreeBSD: src/lib/libc/Makefile,v 1.56.2.3 2007/03/11 10:15:48 simon Exp $
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.
10 LIB=c
11 # If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c.
12 # If you bump SHLIB_MAJOR, see standards/55112.
13 SHLIB_MAJOR= 6
14 SHLIBDIR?= /lib
15 WARNS?= 2
16 CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include
17 CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH}
18 CLEANFILES+=tags
19 INSTALL_PIC_ARCHIVE=
20 PRECIOUSLIB=
21
22 # Define (empty) variables so that make doesn't give substitution
23 # errors if the included makefiles don't change these:
24 MDSRCS=
25 MISRCS=
26 MDASM=
27 MIASM=
28 NOASM=
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}/inet/Makefile.inc"
37 .include "${.CURDIR}/isc/Makefile.inc"
38 .include "${.CURDIR}/locale/Makefile.inc"
39 .include "${.CURDIR}/nameser/Makefile.inc"
40 .include "${.CURDIR}/net/Makefile.inc"
41 .include "${.CURDIR}/nls/Makefile.inc"
42 .include "${.CURDIR}/posix1e/Makefile.inc"
43 .if !defined(NO_QUAD)
44 .include "${.CURDIR}/quad/Makefile.inc"
45 .endif
46 .include "${.CURDIR}/regex/Makefile.inc"
47 .include "${.CURDIR}/resolv/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 ${MACHINE_ARCH} == "arm"
57 .include "${.CURDIR}/softfloat/Makefile.inc"
58 .endif
59 .if !defined(NO_NIS)
60 CFLAGS+= -DYP
61 .include "${.CURDIR}/yp/Makefile.inc"
62 .endif
63 .if !defined(NO_HESIOD_LIBC)
64 CFLAGS+= -DHESIOD
65 .endif
66 .if defined(NO_FP_LIBC)
67 CFLAGS+= -DNO_FLOATING_POINT
68 .endif
69 .if defined(_FREEFALL_CONFIG)
70 CFLAGS+=-D_FREEFALL_CONFIG
71 .endif
72
73 # If there are no machine dependent sources, append all the
74 # machine-independent sources:
75 .if empty(MDSRCS)
76 SRCS+= ${MISRCS}
77 .else
78 # Append machine-dependent sources, then append machine-independent sources
79 # for which there is no machine-dependent variant.
80 SRCS+= ${MDSRCS}
81 .for _src in ${MISRCS}
82 .if ${MDSRCS:R:M${_src:R}} == ""
83 SRCS+= ${_src}
84 .endif
85 .endfor
86 .endif
87
88 KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
89 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
90 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
91 KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \
92 strcat.c strcmp.c strcpy.c strlen.c strncpy.c
93
94 libkern: libkern.gen libkern.${MACHINE_ARCH}
95
96 libkern.gen: ${KQSRCS} ${KSRCS}
97 cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
98
99 libkern.${MACHINE_ARCH}:: ${KMSRCS}
100 .if defined(KMSRCS) && !empty(KMSRCS)
101 cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
102 .endif
103
104 .include <bsd.lib.mk>
105
106 # Disable warnings in contributed sources.
107 CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/}
Cache object: 80b40b01e1cfb02e7e400af6c36c8a9f
|