]>
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= | |
9 | MDASM= | |
10 | MIASM= | |
11 | NOASM= | |
12 | ||
9385eb3d A |
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. | |
16 | SUPPRESSSRCS= | |
17 | ||
59e0d9fe A |
18 | # Auto-patching variables |
19 | AUTOPATCHHDRS= | |
20 | AUTOPATCHMAN= | |
21 | AUTOPATCHSRCS= | |
22 | ||
b5d655f7 | 23 | # Auto-patch (or symlink) |
59e0d9fe A |
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 \ | |
b5d655f7 A |
31 | t=`basename ${.ALLSRC}` && x=`dirname ${.ALLSRC}` && d=`basename $$x`; \ |
32 | echo ln -fs $$d/$$t ${.TARGET}; \ | |
33 | ln -fs $$d/$$t ${.TARGET}; \ | |
59e0d9fe | 34 | fi |
224c7076 A |
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} | |
9385eb3d | 60 | |
5b2abdfb A |
61 | # |
62 | # If there is a machine dependent makefile, use it: | |
63 | # | |
b5d655f7 | 64 | .sinclude "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" |
5b2abdfb | 65 | |
3d9156a7 | 66 | .include "${.CURDIR}/darwin/Makefile.inc" |
5b2abdfb A |
67 | .include "${.CURDIR}/db/Makefile.inc" |
68 | .include "${.CURDIR}/compat-43/Makefile.inc" | |
59e0d9fe | 69 | .include "${.CURDIR}/emulated/Makefile.inc" |
9385eb3d | 70 | .include "${.CURDIR}/gdtoa/Makefile.inc" |
5b2abdfb A |
71 | .include "${.CURDIR}/gen/Makefile.inc" |
72 | .include "${.CURDIR}/gmon/Makefile.inc" | |
73 | .include "${.CURDIR}/include/Makefile.inc" | |
b5d655f7 | 74 | .ifdef FEATURE_LEGACY_NX_INTERNAT_APIS |
5b2abdfb | 75 | .include "${.CURDIR}/internat/Makefile.inc" |
b5d655f7 | 76 | .endif |
5b2abdfb | 77 | .include "${.CURDIR}/locale/Makefile.inc" |
224c7076 | 78 | .include "${.CURDIR}/man/Makefile.inc" |
5b2abdfb | 79 | .include "${.CURDIR}/net/Makefile.inc" |
9385eb3d | 80 | .include "${.CURDIR}/nls/Makefile.inc" |
3d9156a7 | 81 | .include "${.CURDIR}/posix1e/Makefile.inc" |
5b2abdfb | 82 | .include "${.CURDIR}/pthreads/Makefile.inc" |
5b2abdfb | 83 | .include "${.CURDIR}/regex/Makefile.inc" |
224c7076 | 84 | .include "${.CURDIR}/secure/Makefile.inc" |
5b2abdfb A |
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" | |
59e0d9fe | 92 | .include "${.CURDIR}/uuid/Makefile.inc" |
5b2abdfb A |
93 | |
94 | # If there are no machine dependent sources, append all the | |
95 | # machine-independent sources: | |
96 | .if empty(MDSRCS) | |
97 | SRCS+= ${MISRCS} | |
98 | .else | |
99 | # Append machine-dependent sources, then append machine-independent sources | |
9385eb3d | 100 | # for which there is no machine-dependent variant, and not being suppressed. |
5b2abdfb | 101 | SRCS+= ${MDSRCS} |
9385eb3d | 102 | _SUPPRESS= ${MDSRCS} ${SUPPRESSSRCS} |
5b2abdfb | 103 | .for _src in ${MISRCS} |
9385eb3d | 104 | .if ${_SUPPRESS:R:M${_src:R}} == "" |
5b2abdfb A |
105 | SRCS+= ${_src} |
106 | .endif | |
107 | .endfor | |
108 | .endif |