1 # $FreeBSD: src/lMakefile.inc,v 1.7 2001/04/04 18:17:25 tmm Exp $
3 # This file contains make rules that are shared by libc and libc_r.
5 # Define (empty) variables so that make doesn't give substitution
6 # errors if the included makefiles don't change these:
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.
18 # Auto-patching variables
23 # Auto-patch into OBJROOT
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; \
31 echo ln -s ${.ALLSRC} ${.TARGET}; \
32 ln -s ${.ALLSRC} ${.TARGET}; \
34 # Auto-patch into current directory
36 @echo cp ${.ALLSRC} ${.TARGET}; \
37 cp ${.ALLSRC} ${.TARGET}; \
38 if [ -f ${.ALLSRC}.patch ]; then \
39 echo patch ${.TARGET} ${.ALLSRC}.patch; \
40 patch ${.TARGET} ${.ALLSRC}.patch; \
42 # Standard compilation for the various forms
43 _STANDARD_STATIC: .USE
45 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
46 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
47 ${VARIANTCFLAGS} ${LIBCFLAGS} \
48 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
49 _STANDARD_PROFILE: .USE
51 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
52 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
53 ${VARIANTCFLAGS} ${LIBCFLAGS} \
54 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
55 _STANDARD_DYNAMIC: .USE
57 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
58 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
59 ${VARIANTCFLAGS} ${LIBCFLAGS} \
60 -Os ${OPTIMIZE-${.IMPSRC:T}} -c ${.IMPSRC} -o ${.TARGET}
63 ${PRECFLAGS} ${PRECFLAGS-${.IMPSRC:T}} \
64 ${CFLAGS} ${CFLAGS-${.IMPSRC:T}} \
65 ${VARIANTCFLAGS} ${LIBCFLAGS} \
66 -c ${.IMPSRC} -o ${.TARGET}
68 # set object file suffix
69 .if make(lib${LIB}_static.a)
72 .if make(lib${LIB}_profile.a)
75 .if make(lib${LIB}_debug.a)
84 # If there is a machine dependent makefile, use it:
86 .if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
87 .include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc"
90 .include "${.CURDIR}/darwin/Makefile.inc"
91 .include "${.CURDIR}/db/Makefile.inc"
92 .include "${.CURDIR}/compat-43/Makefile.inc"
93 .include "${.CURDIR}/emulated/Makefile.inc"
94 .include "${.CURDIR}/gdtoa/Makefile.inc"
95 .include "${.CURDIR}/gen/Makefile.inc"
96 .include "${.CURDIR}/gmon/Makefile.inc"
97 .include "${.CURDIR}/include/Makefile.inc"
98 .include "${.CURDIR}/internat/Makefile.inc"
99 .include "${.CURDIR}/locale/Makefile.inc"
100 .include "${.CURDIR}/man/Makefile.inc"
101 .include "${.CURDIR}/net/Makefile.inc"
102 .include "${.CURDIR}/nls/Makefile.inc"
103 .include "${.CURDIR}/posix1e/Makefile.inc"
104 .include "${.CURDIR}/pthreads/Makefile.inc"
105 .include "${.CURDIR}/regex/Makefile.inc"
106 .include "${.CURDIR}/secure/Makefile.inc"
107 .include "${.CURDIR}/stdio/Makefile.inc"
108 .include "${.CURDIR}/stdlib/Makefile.inc"
109 .include "${.CURDIR}/stdtime/Makefile.inc"
110 .include "${.CURDIR}/string/Makefile.inc"
111 .include "${.CURDIR}/sys/Makefile.inc"
112 .include "${.CURDIR}/threads/Makefile.inc"
113 .include "${.CURDIR}/util/Makefile.inc"
114 .include "${.CURDIR}/uuid/Makefile.inc"
116 # If there are no machine dependent sources, append all the
117 # machine-independent sources:
121 # Append machine-dependent sources, then append machine-independent sources
122 # for which there is no machine-dependent variant, and not being suppressed.
124 _SUPPRESS= ${MDSRCS} ${SUPPRESSSRCS}
125 .for _src in ${MISRCS}
126 .if ${_SUPPRESS:R:M${_src:R}} == ""