]>
Commit | Line | Data |
---|---|---|
5b2abdfb A |
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: | |
7 | MDSRCS= | |
8 | MISRCS= | |
5b2abdfb | 9 | |
9385eb3d A |
10 | # SUPPRESSSRCS is used to prevent machine-independent files from being |
11 | # built, when a machine-dependent file defines multiple symbols. | |
12 | # Use MDSRCS to block one file, and SUPPRESSSRCS to block the others. | |
13 | SUPPRESSSRCS= | |
14 | ||
59e0d9fe A |
15 | # Auto-patching variables |
16 | AUTOPATCHHDRS= | |
17 | AUTOPATCHMAN= | |
18 | AUTOPATCHSRCS= | |
19 | ||
b5d655f7 | 20 | # Auto-patch (or symlink) |
59e0d9fe A |
21 | _AUTOPATCH: .USE |
22 | @if [ -f ${.ALLSRC}.patch ]; then \ | |
34e8f829 A |
23 | ${ECHO} ${CP} ${.ALLSRC} ${.TARGET}; \ |
24 | ${CP} ${.ALLSRC} ${.TARGET}; \ | |
25 | ${ECHO} ${PATCH} ${.TARGET} ${.ALLSRC}.patch; \ | |
26 | ${PATCH} ${.TARGET} ${.ALLSRC}.patch; \ | |
59e0d9fe | 27 | else \ |
34e8f829 A |
28 | t=`${BASENAME} ${.ALLSRC}` && x=`${DIRNAME} ${.ALLSRC}` && d=`${BASENAME} $$x`; \ |
29 | ${ECHO} ${LN} -fs $$d/$$t ${.TARGET}; \ | |
30 | ${LN} -fs $$d/$$t ${.TARGET}; \ | |
59e0d9fe | 31 | fi |
224c7076 A |
32 | # Standard compilation for the various forms |
33 | _STANDARD_STATIC: .USE | |
34e8f829 | 34 | ${MYCC} -static \ |
224c7076 A |
35 | ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ |
36 | ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ | |
37 | ${VARIANTCFLAGS} ${LIBCFLAGS} \ | |
38 | -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET} | |
39 | _STANDARD_PROFILE: .USE | |
34e8f829 | 40 | ${MYCC} -pg -DPROFILE \ |
224c7076 A |
41 | ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ |
42 | ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ | |
43 | ${VARIANTCFLAGS} ${LIBCFLAGS} \ | |
44 | -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET} | |
45 | _STANDARD_DYNAMIC: .USE | |
34e8f829 | 46 | ${MYCC} \ |
224c7076 A |
47 | ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ |
48 | ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ | |
49 | ${VARIANTCFLAGS} ${LIBCFLAGS} \ | |
50 | -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET} | |
51 | _STANDARD_DEBUG: .USE | |
34e8f829 | 52 | ${MYCC} -g -DDEBUG \ |
224c7076 A |
53 | ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \ |
54 | ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \ | |
55 | ${VARIANTCFLAGS} ${LIBCFLAGS} \ | |
56 | -c ${.IMPSRC} -o ${.TARGET} | |
9385eb3d | 57 | |
5b2abdfb A |
58 | # |
59 | # If there is a machine dependent makefile, use it: | |
60 | # | |
b5d655f7 | 61 | .sinclude "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" |
5b2abdfb | 62 | |
3d9156a7 | 63 | .include "${.CURDIR}/darwin/Makefile.inc" |
5b2abdfb A |
64 | .include "${.CURDIR}/db/Makefile.inc" |
65 | .include "${.CURDIR}/compat-43/Makefile.inc" | |
59e0d9fe | 66 | .include "${.CURDIR}/emulated/Makefile.inc" |
9385eb3d | 67 | .include "${.CURDIR}/gdtoa/Makefile.inc" |
5b2abdfb A |
68 | .include "${.CURDIR}/gen/Makefile.inc" |
69 | .include "${.CURDIR}/gmon/Makefile.inc" | |
70 | .include "${.CURDIR}/include/Makefile.inc" | |
b5d655f7 | 71 | .ifdef FEATURE_LEGACY_NX_INTERNAT_APIS |
5b2abdfb | 72 | .include "${.CURDIR}/internat/Makefile.inc" |
b5d655f7 | 73 | .endif |
5b2abdfb | 74 | .include "${.CURDIR}/locale/Makefile.inc" |
224c7076 | 75 | .include "${.CURDIR}/man/Makefile.inc" |
5b2abdfb | 76 | .include "${.CURDIR}/net/Makefile.inc" |
9385eb3d | 77 | .include "${.CURDIR}/nls/Makefile.inc" |
3d9156a7 | 78 | .include "${.CURDIR}/posix1e/Makefile.inc" |
5b2abdfb | 79 | .include "${.CURDIR}/pthreads/Makefile.inc" |
5b2abdfb | 80 | .include "${.CURDIR}/regex/Makefile.inc" |
224c7076 | 81 | .include "${.CURDIR}/secure/Makefile.inc" |
5b2abdfb A |
82 | .include "${.CURDIR}/stdio/Makefile.inc" |
83 | .include "${.CURDIR}/stdlib/Makefile.inc" | |
84 | .include "${.CURDIR}/stdtime/Makefile.inc" | |
85 | .include "${.CURDIR}/string/Makefile.inc" | |
86 | .include "${.CURDIR}/sys/Makefile.inc" | |
87 | .include "${.CURDIR}/threads/Makefile.inc" | |
88 | .include "${.CURDIR}/util/Makefile.inc" | |
59e0d9fe | 89 | .include "${.CURDIR}/uuid/Makefile.inc" |
5b2abdfb A |
90 | |
91 | # If there are no machine dependent sources, append all the | |
92 | # machine-independent sources: | |
93 | .if empty(MDSRCS) | |
94 | SRCS+= ${MISRCS} | |
95 | .else | |
96 | # Append machine-dependent sources, then append machine-independent sources | |
9385eb3d | 97 | # for which there is no machine-dependent variant, and not being suppressed. |
5b2abdfb | 98 | SRCS+= ${MDSRCS} |
9385eb3d | 99 | _SUPPRESS= ${MDSRCS} ${SUPPRESSSRCS} |
5b2abdfb | 100 | .for _src in ${MISRCS} |
9385eb3d | 101 | .if ${_SUPPRESS:R:M${_src:R}} == "" |
5b2abdfb A |
102 | SRCS+= ${_src} |
103 | .endif | |
104 | .endfor | |
105 | .endif |