]> git.saurik.com Git - apple/libc.git/blame_incremental - Makefile.inc
Libc-498.1.7.tar.gz
[apple/libc.git] / Makefile.inc
... / ...
CommitLineData
1# $FreeBSD: src/lMakefile.inc,v 1.7 2001/04/04 18:17:25 tmm Exp $
2#
3# This file contains make rules that are shared by libc and libc_r.
4#
5# Define (empty) variables so that make doesn't give substitution
6# errors if the included makefiles don't change these:
7MDSRCS=
8MISRCS=
9MDASM=
10MIASM=
11NOASM=
12
13# SUPPRESSSRCS is used to prevent machine-independent files from being
14# built, when a machine-dependent file defines multiple symbols.
15# Use MDSRCS to block one file, and SUPPRESSSRCS to block the others.
16SUPPRESSSRCS=
17
18# Auto-patching variables
19AUTOPATCHHDRS=
20AUTOPATCHMAN=
21AUTOPATCHSRCS=
22
23# Auto-patch (or symlink)
24_AUTOPATCH: .USE
25 @if [ -f ${.ALLSRC}.patch ]; then \
26 echo cp ${.ALLSRC} ${.TARGET}; \
27 cp ${.ALLSRC} ${.TARGET}; \
28 echo patch ${.TARGET} ${.ALLSRC}.patch; \
29 patch ${.TARGET} ${.ALLSRC}.patch; \
30 else \
31 t=`basename ${.ALLSRC}` && x=`dirname ${.ALLSRC}` && d=`basename $$x`; \
32 echo ln -fs $$d/$$t ${.TARGET}; \
33 ln -fs $$d/$$t ${.TARGET}; \
34 fi
35# Standard compilation for the various forms
36_STANDARD_STATIC: .USE
37 ${CC} -static \
38 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
39 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
40 ${VARIANTCFLAGS} ${LIBCFLAGS} \
41 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
42_STANDARD_PROFILE: .USE
43 ${CC} -pg -DPROFILE \
44 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
45 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
46 ${VARIANTCFLAGS} ${LIBCFLAGS} \
47 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
48_STANDARD_DYNAMIC: .USE
49 ${CC} \
50 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
51 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
52 ${VARIANTCFLAGS} ${LIBCFLAGS} \
53 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
54_STANDARD_DEBUG: .USE
55 ${CC} -g -DDEBUG \
56 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
57 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
58 ${VARIANTCFLAGS} ${LIBCFLAGS} \
59 -c ${.IMPSRC} -o ${.TARGET}
60
61#
62# If there is a machine dependent makefile, use it:
63#
64.sinclude "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
65
66.include "${.CURDIR}/darwin/Makefile.inc"
67.include "${.CURDIR}/db/Makefile.inc"
68.include "${.CURDIR}/compat-43/Makefile.inc"
69.include "${.CURDIR}/emulated/Makefile.inc"
70.include "${.CURDIR}/gdtoa/Makefile.inc"
71.include "${.CURDIR}/gen/Makefile.inc"
72.include "${.CURDIR}/gmon/Makefile.inc"
73.include "${.CURDIR}/include/Makefile.inc"
74.ifdef FEATURE_LEGACY_NX_INTERNAT_APIS
75.include "${.CURDIR}/internat/Makefile.inc"
76.endif
77.include "${.CURDIR}/locale/Makefile.inc"
78.include "${.CURDIR}/man/Makefile.inc"
79.include "${.CURDIR}/net/Makefile.inc"
80.include "${.CURDIR}/nls/Makefile.inc"
81.include "${.CURDIR}/posix1e/Makefile.inc"
82.include "${.CURDIR}/pthreads/Makefile.inc"
83.include "${.CURDIR}/regex/Makefile.inc"
84.include "${.CURDIR}/secure/Makefile.inc"
85.include "${.CURDIR}/stdio/Makefile.inc"
86.include "${.CURDIR}/stdlib/Makefile.inc"
87.include "${.CURDIR}/stdtime/Makefile.inc"
88.include "${.CURDIR}/string/Makefile.inc"
89.include "${.CURDIR}/sys/Makefile.inc"
90.include "${.CURDIR}/threads/Makefile.inc"
91.include "${.CURDIR}/util/Makefile.inc"
92.include "${.CURDIR}/uuid/Makefile.inc"
93
94# If there are no machine dependent sources, append all the
95# machine-independent sources:
96.if empty(MDSRCS)
97SRCS+= ${MISRCS}
98.else
99# Append machine-dependent sources, then append machine-independent sources
100# for which there is no machine-dependent variant, and not being suppressed.
101SRCS+= ${MDSRCS}
102_SUPPRESS= ${MDSRCS} ${SUPPRESSSRCS}
103.for _src in ${MISRCS}
104.if ${_SUPPRESS:R:M${_src:R}} == ""
105SRCS+= ${_src}
106.endif
107.endfor
108.endif