Deleted Added
full compact
sys.mk (301083) sys.mk (301284)
1# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
1# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
2# $FreeBSD: head/share/mk/sys.mk 301083 2016-05-31 22:37:11Z bdrewery $
2# $FreeBSD: head/share/mk/sys.mk 301284 2016-06-03 19:25:36Z bdrewery $
3
4unix ?= We run FreeBSD, not UNIX.
5.FreeBSD ?= true
6
7.if !defined(%POSIX)
8#
9# MACHINE_CPUARCH defines a collection of MACHINE_ARCH. Machines with
10# the same MACHINE_ARCH can run each other's binaries, so it necessarily
11# has word size and endian swizzled in. However, support files for
12# these machines often are shared amongst all combinations of size
13# and/or endian. This is called MACHINE_CPU in NetBSD, but that's used
14# for something different in FreeBSD.
15#
16MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/}
17.endif
18
19
20# Some options we need now
21__DEFAULT_NO_OPTIONS= \
22 DIRDEPS_BUILD \
23 DIRDEPS_CACHE
24
25__DEFAULT_DEPENDENT_OPTIONS= \
26 AUTO_OBJ/DIRDEPS_BUILD \
27 META_MODE/DIRDEPS_BUILD \
28 STAGING/DIRDEPS_BUILD \
29 SYSROOT/DIRDEPS_BUILD
30
31__ENV_ONLY_OPTIONS:= \
32 ${__DEFAULT_NO_OPTIONS} \
33 ${__DEFAULT_YES_OPTIONS} \
34 ${__DEFAULT_DEPENDENT_OPTIONS:H}
35
36# early include for customization
37# see local.sys.mk below
38# Not included when building in fmake compatibility mode (still needed
39# for older system support)
40.if defined(.PARSEDIR)
41.sinclude <local.sys.env.mk>
42
43.include <bsd.mkopt.mk>
44
45.if ${MK_DIRDEPS_BUILD} == "yes"
46.sinclude <meta.sys.mk>
47.elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == ""
48# verbose will show .MAKE.META.PREFIX for each target.
49META_MODE+= meta verbose
50# silent will hide command output if a .meta file is created.
51.if !defined(NO_SILENT)
52META_MODE+= silent=yes
53.endif
54.if !exists(/dev/filemon)
55.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON)
56.error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded.
57.endif
58META_MODE+= nofilemon
59.endif
60.endif
61META_MODE?= normal
62.export META_MODE
63.MAKE.MODE?= ${META_MODE}
3
4unix ?= We run FreeBSD, not UNIX.
5.FreeBSD ?= true
6
7.if !defined(%POSIX)
8#
9# MACHINE_CPUARCH defines a collection of MACHINE_ARCH. Machines with
10# the same MACHINE_ARCH can run each other's binaries, so it necessarily
11# has word size and endian swizzled in. However, support files for
12# these machines often are shared amongst all combinations of size
13# and/or endian. This is called MACHINE_CPU in NetBSD, but that's used
14# for something different in FreeBSD.
15#
16MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/}
17.endif
18
19
20# Some options we need now
21__DEFAULT_NO_OPTIONS= \
22 DIRDEPS_BUILD \
23 DIRDEPS_CACHE
24
25__DEFAULT_DEPENDENT_OPTIONS= \
26 AUTO_OBJ/DIRDEPS_BUILD \
27 META_MODE/DIRDEPS_BUILD \
28 STAGING/DIRDEPS_BUILD \
29 SYSROOT/DIRDEPS_BUILD
30
31__ENV_ONLY_OPTIONS:= \
32 ${__DEFAULT_NO_OPTIONS} \
33 ${__DEFAULT_YES_OPTIONS} \
34 ${__DEFAULT_DEPENDENT_OPTIONS:H}
35
36# early include for customization
37# see local.sys.mk below
38# Not included when building in fmake compatibility mode (still needed
39# for older system support)
40.if defined(.PARSEDIR)
41.sinclude <local.sys.env.mk>
42
43.include <bsd.mkopt.mk>
44
45.if ${MK_DIRDEPS_BUILD} == "yes"
46.sinclude <meta.sys.mk>
47.elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == ""
48# verbose will show .MAKE.META.PREFIX for each target.
49META_MODE+= meta verbose
50# silent will hide command output if a .meta file is created.
51.if !defined(NO_SILENT)
52META_MODE+= silent=yes
53.endif
54.if !exists(/dev/filemon)
55.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON)
56.error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded.
57.endif
58META_MODE+= nofilemon
59.endif
60.endif
61META_MODE?= normal
62.export META_MODE
63.MAKE.MODE?= ${META_MODE}
64.if ${.MAKE.MODE:Mmeta*} != ""
65OP_META= .META
66.endif
67
68.if ${MK_AUTO_OBJ} == "yes"
69# This needs to be done early - before .PATH is computed
70# Don't do this for 'make showconfig' as it enables all options where meta mode
71# is not expected.
72.if !make(showconfig)
73.sinclude <auto.obj.mk>
74.endif
75.endif
76.else # bmake
77.include <bsd.mkopt.mk>
78.endif
79
80# If the special target .POSIX appears (without prerequisites or
81# commands) before the first noncomment line in the makefile, make shall
82# process the makefile as specified by the Posix 1003.2 specification.
83# make(1) sets the special macro %POSIX in this case (to the actual
84# value "1003.2", for what it's worth).
85#
86# The rules below use this macro to distinguish between Posix-compliant
87# and default behaviour.
88#
89# This functionality is currently broken, since make(1) processes sys.mk
90# before reading any other files, and consequently has no opportunity to
91# set the %POSIX macro before we read this point.
92
93.if defined(%POSIX)
94.SUFFIXES: .o .c .y .l .a .sh .f
95.else
96.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh
97.endif
98
99AR ?= ar
100.if defined(%POSIX)
101ARFLAGS ?= -rv
102.else
103ARFLAGS ?= -crD
104.endif
105RANLIB ?= ranlib
106.if !defined(%POSIX)
107RANLIBFLAGS ?= -D
108.endif
109
110AS ?= as
111AFLAGS ?=
112ACFLAGS ?=
113
114.if defined(%POSIX)
115CC ?= c89
116CFLAGS ?= -O
117.else
118CC ?= cc
119.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
120CFLAGS ?= -O -pipe
121.else
122CFLAGS ?= -O2 -pipe
123.endif
124.if defined(NO_STRICT_ALIASING)
125CFLAGS += -fno-strict-aliasing
126.endif
127.endif
128PO_CFLAGS ?= ${CFLAGS}
129
130# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle
131# read-only files as non-root by passing -f.
132CP ?= cp -f
133
134CPP ?= cpp
135
136# C Type Format data is required for DTrace
137CTFFLAGS ?= -L VERSION
138
139CTFCONVERT ?= ctfconvert
140CTFMERGE ?= ctfmerge
141
142.if defined(CFLAGS) && (${CFLAGS:M-g} != "")
143CTFFLAGS += -g
144.endif
145
146CXX ?= c++
147CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition}
148PO_CXXFLAGS ?= ${CXXFLAGS}
149
150DTRACE ?= dtrace
151DTRACEFLAGS ?= -C -x nolibs
152
153.if empty(.MAKEFLAGS:M-s)
154ECHO ?= echo
155ECHODIR ?= echo
156.else
157ECHO ?= true
158.if ${.MAKEFLAGS:M-s} == "-s"
159ECHODIR ?= echo
160.else
161ECHODIR ?= true
162.endif
163.endif
164
165.if ${.MAKEFLAGS:M-N}
166# bmake -N is supposed to skip executing anything but it does not skip
167# exeucting '+' commands. The '+' feature is used where .MAKE
168# is not safe for the entire target. -N is intended to skip building sub-makes
169# so it executing '+' commands is not right. Work around the bug by not
170# setting '+' when -N is used.
171_+_ ?=
172.else
173_+_ ?= +
174.endif
175
176.if defined(%POSIX)
177FC ?= fort77
178FFLAGS ?= -O 1
179.else
180FC ?= f77
181FFLAGS ?= -O
182.endif
183EFLAGS ?=
184
185INSTALL ?= install
186
187LEX ?= lex
188LFLAGS ?=
189
190LD ?= ld
191LDFLAGS ?= # LDFLAGS is for CC,
192_LDFLAGS = ${LDFLAGS:S/-Wl,//g} # strip -Wl, for LD
193
194LINT ?= lint
195LINTFLAGS ?= -cghapbx
196LINTKERNFLAGS ?= ${LINTFLAGS}
197LINTOBJFLAGS ?= -cghapbxu -i
198LINTOBJKERNFLAGS?= ${LINTOBJFLAGS}
199LINTLIBFLAGS ?= -cghapbxu -C ${LIB}
200
201MAKE ?= make
202
203.if !defined(%POSIX)
204NM ?= nm
205NMFLAGS ?=
206
207OBJC ?= cc
208OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import
209
210OBJCOPY ?= objcopy
211
212OBJDUMP ?= objdump
213
214PC ?= pc
215PFLAGS ?=
216
217RC ?= f77
218RFLAGS ?=
219.endif
220
221SHELL ?= sh
222
223.if !defined(%POSIX)
224SIZE ?= size
225.endif
226
227YACC ?= yacc
228.if defined(%POSIX)
229YFLAGS ?=
230.else
231YFLAGS ?= -d
232.endif
233
234.if defined(%POSIX)
235
236# Posix 1003.2 mandated rules
237#
238# Quoted directly from the Posix 1003.2 draft, only the macros
239# $@, $< and $* have been replaced by ${.TARGET}, ${.IMPSRC}, and
240# ${.PREFIX}, resp.
241
242# SINGLE SUFFIX RULES
243.c:
244 ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC}
245
246.f:
247 ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC}
248
249.sh:
250 cp -f ${.IMPSRC} ${.TARGET}
251 chmod a+x ${.TARGET}
252
253# DOUBLE SUFFIX RULES
254
255.c.o:
256 ${CC} ${CFLAGS} -c ${.IMPSRC}
257
258.f.o:
259 ${FC} ${FFLAGS} -c ${.IMPSRC}
260
261.y.o:
262 ${YACC} ${YFLAGS} ${.IMPSRC}
263 ${CC} ${CFLAGS} -c y.tab.c
264 rm -f y.tab.c
265 mv y.tab.o ${.TARGET}
266
267.l.o:
268 ${LEX} ${LFLAGS} ${.IMPSRC}
269 ${CC} ${CFLAGS} -c lex.yy.c
270 rm -f lex.yy.c
271 mv lex.yy.o ${.TARGET}
272
273.y.c:
274 ${YACC} ${YFLAGS} ${.IMPSRC}
275 mv y.tab.c ${.TARGET}
276
277.l.c:
278 ${LEX} ${LFLAGS} ${.IMPSRC}
279 mv lex.yy.c ${.TARGET}
280
281.c.a:
282 ${CC} ${CFLAGS} -c ${.IMPSRC}
283 ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
284 rm -f ${.PREFIX}.o
285
286.f.a:
287 ${FC} ${FFLAGS} -c ${.IMPSRC}
288 ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
289 rm -f ${.PREFIX}.o
290
291.else
292
293# non-Posix rule set
294
64
65.if ${MK_AUTO_OBJ} == "yes"
66# This needs to be done early - before .PATH is computed
67# Don't do this for 'make showconfig' as it enables all options where meta mode
68# is not expected.
69.if !make(showconfig)
70.sinclude <auto.obj.mk>
71.endif
72.endif
73.else # bmake
74.include <bsd.mkopt.mk>
75.endif
76
77# If the special target .POSIX appears (without prerequisites or
78# commands) before the first noncomment line in the makefile, make shall
79# process the makefile as specified by the Posix 1003.2 specification.
80# make(1) sets the special macro %POSIX in this case (to the actual
81# value "1003.2", for what it's worth).
82#
83# The rules below use this macro to distinguish between Posix-compliant
84# and default behaviour.
85#
86# This functionality is currently broken, since make(1) processes sys.mk
87# before reading any other files, and consequently has no opportunity to
88# set the %POSIX macro before we read this point.
89
90.if defined(%POSIX)
91.SUFFIXES: .o .c .y .l .a .sh .f
92.else
93.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh
94.endif
95
96AR ?= ar
97.if defined(%POSIX)
98ARFLAGS ?= -rv
99.else
100ARFLAGS ?= -crD
101.endif
102RANLIB ?= ranlib
103.if !defined(%POSIX)
104RANLIBFLAGS ?= -D
105.endif
106
107AS ?= as
108AFLAGS ?=
109ACFLAGS ?=
110
111.if defined(%POSIX)
112CC ?= c89
113CFLAGS ?= -O
114.else
115CC ?= cc
116.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
117CFLAGS ?= -O -pipe
118.else
119CFLAGS ?= -O2 -pipe
120.endif
121.if defined(NO_STRICT_ALIASING)
122CFLAGS += -fno-strict-aliasing
123.endif
124.endif
125PO_CFLAGS ?= ${CFLAGS}
126
127# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle
128# read-only files as non-root by passing -f.
129CP ?= cp -f
130
131CPP ?= cpp
132
133# C Type Format data is required for DTrace
134CTFFLAGS ?= -L VERSION
135
136CTFCONVERT ?= ctfconvert
137CTFMERGE ?= ctfmerge
138
139.if defined(CFLAGS) && (${CFLAGS:M-g} != "")
140CTFFLAGS += -g
141.endif
142
143CXX ?= c++
144CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition}
145PO_CXXFLAGS ?= ${CXXFLAGS}
146
147DTRACE ?= dtrace
148DTRACEFLAGS ?= -C -x nolibs
149
150.if empty(.MAKEFLAGS:M-s)
151ECHO ?= echo
152ECHODIR ?= echo
153.else
154ECHO ?= true
155.if ${.MAKEFLAGS:M-s} == "-s"
156ECHODIR ?= echo
157.else
158ECHODIR ?= true
159.endif
160.endif
161
162.if ${.MAKEFLAGS:M-N}
163# bmake -N is supposed to skip executing anything but it does not skip
164# exeucting '+' commands. The '+' feature is used where .MAKE
165# is not safe for the entire target. -N is intended to skip building sub-makes
166# so it executing '+' commands is not right. Work around the bug by not
167# setting '+' when -N is used.
168_+_ ?=
169.else
170_+_ ?= +
171.endif
172
173.if defined(%POSIX)
174FC ?= fort77
175FFLAGS ?= -O 1
176.else
177FC ?= f77
178FFLAGS ?= -O
179.endif
180EFLAGS ?=
181
182INSTALL ?= install
183
184LEX ?= lex
185LFLAGS ?=
186
187LD ?= ld
188LDFLAGS ?= # LDFLAGS is for CC,
189_LDFLAGS = ${LDFLAGS:S/-Wl,//g} # strip -Wl, for LD
190
191LINT ?= lint
192LINTFLAGS ?= -cghapbx
193LINTKERNFLAGS ?= ${LINTFLAGS}
194LINTOBJFLAGS ?= -cghapbxu -i
195LINTOBJKERNFLAGS?= ${LINTOBJFLAGS}
196LINTLIBFLAGS ?= -cghapbxu -C ${LIB}
197
198MAKE ?= make
199
200.if !defined(%POSIX)
201NM ?= nm
202NMFLAGS ?=
203
204OBJC ?= cc
205OBJCFLAGS ?= ${OBJCINCLUDES} ${CFLAGS} -Wno-import
206
207OBJCOPY ?= objcopy
208
209OBJDUMP ?= objdump
210
211PC ?= pc
212PFLAGS ?=
213
214RC ?= f77
215RFLAGS ?=
216.endif
217
218SHELL ?= sh
219
220.if !defined(%POSIX)
221SIZE ?= size
222.endif
223
224YACC ?= yacc
225.if defined(%POSIX)
226YFLAGS ?=
227.else
228YFLAGS ?= -d
229.endif
230
231.if defined(%POSIX)
232
233# Posix 1003.2 mandated rules
234#
235# Quoted directly from the Posix 1003.2 draft, only the macros
236# $@, $< and $* have been replaced by ${.TARGET}, ${.IMPSRC}, and
237# ${.PREFIX}, resp.
238
239# SINGLE SUFFIX RULES
240.c:
241 ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC}
242
243.f:
244 ${FC} ${FFLAGS} ${LDFLAGS} -o ${.TARGET} ${.IMPSRC}
245
246.sh:
247 cp -f ${.IMPSRC} ${.TARGET}
248 chmod a+x ${.TARGET}
249
250# DOUBLE SUFFIX RULES
251
252.c.o:
253 ${CC} ${CFLAGS} -c ${.IMPSRC}
254
255.f.o:
256 ${FC} ${FFLAGS} -c ${.IMPSRC}
257
258.y.o:
259 ${YACC} ${YFLAGS} ${.IMPSRC}
260 ${CC} ${CFLAGS} -c y.tab.c
261 rm -f y.tab.c
262 mv y.tab.o ${.TARGET}
263
264.l.o:
265 ${LEX} ${LFLAGS} ${.IMPSRC}
266 ${CC} ${CFLAGS} -c lex.yy.c
267 rm -f lex.yy.c
268 mv lex.yy.o ${.TARGET}
269
270.y.c:
271 ${YACC} ${YFLAGS} ${.IMPSRC}
272 mv y.tab.c ${.TARGET}
273
274.l.c:
275 ${LEX} ${LFLAGS} ${.IMPSRC}
276 mv lex.yy.c ${.TARGET}
277
278.c.a:
279 ${CC} ${CFLAGS} -c ${.IMPSRC}
280 ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
281 rm -f ${.PREFIX}.o
282
283.f.a:
284 ${FC} ${FFLAGS} -c ${.IMPSRC}
285 ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
286 rm -f ${.PREFIX}.o
287
288.else
289
290# non-Posix rule set
291
295.sh: ${OP_META}
292.sh:
296 cp -f ${.IMPSRC} ${.TARGET}
297 chmod a+x ${.TARGET}
298
293 cp -f ${.IMPSRC} ${.TARGET}
294 chmod a+x ${.TARGET}
295
299.c.ln: ${OP_META}
296.c.ln:
300 ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \
301 touch ${.TARGET}
302
297 ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} || \
298 touch ${.TARGET}
299
303.cc.ln .C.ln .cpp.ln .cxx.ln: ${OP_META}
300.cc.ln .C.ln .cpp.ln .cxx.ln:
304 ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \
305 touch ${.TARGET}
306
301 ${LINT} ${LINTOBJFLAGS} ${CXXFLAGS:M-[DIU]*} ${.IMPSRC} || \
302 touch ${.TARGET}
303
307.c: ${OP_META}
304.c:
308 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
309 ${CTFCONVERT_CMD}
310
305 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
306 ${CTFCONVERT_CMD}
307
311.c.o: ${OP_META}
308.c.o:
312 ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
313 ${CTFCONVERT_CMD}
314
309 ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
310 ${CTFCONVERT_CMD}
311
315.cc .cpp .cxx .C: ${OP_META}
312.cc .cpp .cxx .C:
316 ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
317
313 ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
314
318.cc.o .cpp.o .cxx.o .C.o: ${OP_META}
315.cc.o .cpp.o .cxx.o .C.o:
319 ${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
320
316 ${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
317
321.m.o: ${OP_META}
318.m.o:
322 ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
323 ${CTFCONVERT_CMD}
324
319 ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
320 ${CTFCONVERT_CMD}
321
325.p.o: ${OP_META}
322.p.o:
326 ${PC} ${PFLAGS} -c ${.IMPSRC} -o ${.TARGET}
327 ${CTFCONVERT_CMD}
328
323 ${PC} ${PFLAGS} -c ${.IMPSRC} -o ${.TARGET}
324 ${CTFCONVERT_CMD}
325
329.e .r .F .f: ${OP_META}
326.e .r .F .f:
330 ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \
331 -o ${.TARGET}
332
327 ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} \
328 -o ${.TARGET}
329
333.e.o .r.o .F.o .f.o: ${OP_META}
330.e.o .r.o .F.o .f.o:
334 ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} -o ${.TARGET}
335
331 ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} -o ${.TARGET}
332
336.S.o: ${OP_META}
333.S.o:
337 ${CC:N${CCACHE_BIN}} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
338 ${CTFCONVERT_CMD}
339
334 ${CC:N${CCACHE_BIN}} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
335 ${CTFCONVERT_CMD}
336
340.asm.o: ${OP_META}
337.asm.o:
341 ${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \
342 -o ${.TARGET}
343 ${CTFCONVERT_CMD}
344
338 ${CC:N${CCACHE_BIN}} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \
339 -o ${.TARGET}
340 ${CTFCONVERT_CMD}
341
345.s.o: ${OP_META}
342.s.o:
346 ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
347 ${CTFCONVERT_CMD}
348
349# XXX not -j safe
343 ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
344 ${CTFCONVERT_CMD}
345
346# XXX not -j safe
350.y.o: ${OP_META}
347.y.o:
351 ${YACC} ${YFLAGS} ${.IMPSRC}
352 ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET}
353 rm -f y.tab.c
354 ${CTFCONVERT_CMD}
355
348 ${YACC} ${YFLAGS} ${.IMPSRC}
349 ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET}
350 rm -f y.tab.c
351 ${CTFCONVERT_CMD}
352
356.l.o: ${OP_META}
353.l.o:
357 ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
358 ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET}
359 rm -f ${.PREFIX}.tmp.c
360 ${CTFCONVERT_CMD}
361
362# XXX not -j safe
354 ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
355 ${CC} ${CFLAGS} -c ${.PREFIX}.tmp.c -o ${.TARGET}
356 rm -f ${.PREFIX}.tmp.c
357 ${CTFCONVERT_CMD}
358
359# XXX not -j safe
363.y.c: ${OP_META}
360.y.c:
364 ${YACC} ${YFLAGS} ${.IMPSRC}
365 mv y.tab.c ${.TARGET}
366
361 ${YACC} ${YFLAGS} ${.IMPSRC}
362 mv y.tab.c ${.TARGET}
363
367.l.c: ${OP_META}
364.l.c:
368 ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.TARGET}
369
365 ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.TARGET}
366
370.s.out .c.out .o.out: ${OP_META}
367.s.out .c.out .o.out:
371 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
372 ${CTFCONVERT_CMD}
373
368 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
369 ${CTFCONVERT_CMD}
370
374.f.out .F.out .r.out .e.out: ${OP_META}
371.f.out .F.out .r.out .e.out:
375 ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \
376 ${LDLIBS} -o ${.TARGET}
377 rm -f ${.PREFIX}.o
378 ${CTFCONVERT_CMD}
379
380# XXX not -j safe
372 ${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \
373 ${LDLIBS} -o ${.TARGET}
374 rm -f ${.PREFIX}.o
375 ${CTFCONVERT_CMD}
376
377# XXX not -j safe
381.y.out: ${OP_META}
378.y.out:
382 ${YACC} ${YFLAGS} ${.IMPSRC}
383 ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
384 rm -f y.tab.c
385 ${CTFCONVERT_CMD}
386
379 ${YACC} ${YFLAGS} ${.IMPSRC}
380 ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
381 rm -f y.tab.c
382 ${CTFCONVERT_CMD}
383
387.l.out: ${OP_META}
384.l.out:
388 ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
389 ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET}
390 rm -f ${.PREFIX}.tmp.c
391 ${CTFCONVERT_CMD}
392
393# Pull in global settings.
394__MAKE_CONF?=/etc/make.conf
395.if exists(${__MAKE_CONF})
396.include "${__MAKE_CONF}"
397.endif
398
399# late include for customization
400.sinclude <local.sys.mk>
401
402.if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
403SHELL= ${__MAKE_SHELL}
404.SHELL: path=${__MAKE_SHELL}
405.endif
406
407# Tell bmake to expand -V VAR by default
408.MAKE.EXPAND_VARIABLES= yes
409
410# Tell bmake the makefile preference
411.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile
412
413# Tell bmake to always pass job tokens, regardless of target depending on
414# .MAKE or looking like ${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make.
415.MAKE.ALWAYS_PASS_JOB_QUEUE= yes
416
417# By default bmake does *not* use set -e
418# when running target scripts, this is a problem for many makefiles here.
419# So define a shell that will do what FreeBSD expects.
420.ifndef WITHOUT_SHELL_ERRCTL
421__MAKE_SHELL?=/bin/sh
422.SHELL: name=sh \
423 quiet="set -" echo="set -v" filter="set -" \
424 hasErrCtl=yes check="set -e" ignore="set +e" \
425 echoFlag=v errFlag=e \
426 path=${__MAKE_SHELL}
427.endif
428
429# Hack for ports compatibility. Historically, ports makefiles have
430# assumed they can examine MACHINE_CPU without including anything
431# because this was automatically included in sys.mk. For /usr/src,
432# this file has moved to being included from bsd.opts.mk. Until all
433# the ports files are modernized, and a reasonable transition
434# period has passed, include it while we're in a ports tree here
435# to preserve historic behavior.
436.if exists(${.CURDIR}/../../Mk/bsd.port.mk)
437.include <bsd.cpu.mk>
438.endif
439
440.endif # ! Posix
385 ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
386 ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET}
387 rm -f ${.PREFIX}.tmp.c
388 ${CTFCONVERT_CMD}
389
390# Pull in global settings.
391__MAKE_CONF?=/etc/make.conf
392.if exists(${__MAKE_CONF})
393.include "${__MAKE_CONF}"
394.endif
395
396# late include for customization
397.sinclude <local.sys.mk>
398
399.if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
400SHELL= ${__MAKE_SHELL}
401.SHELL: path=${__MAKE_SHELL}
402.endif
403
404# Tell bmake to expand -V VAR by default
405.MAKE.EXPAND_VARIABLES= yes
406
407# Tell bmake the makefile preference
408.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile
409
410# Tell bmake to always pass job tokens, regardless of target depending on
411# .MAKE or looking like ${MAKE}/${.MAKE}/$(MAKE)/$(.MAKE)/make.
412.MAKE.ALWAYS_PASS_JOB_QUEUE= yes
413
414# By default bmake does *not* use set -e
415# when running target scripts, this is a problem for many makefiles here.
416# So define a shell that will do what FreeBSD expects.
417.ifndef WITHOUT_SHELL_ERRCTL
418__MAKE_SHELL?=/bin/sh
419.SHELL: name=sh \
420 quiet="set -" echo="set -v" filter="set -" \
421 hasErrCtl=yes check="set -e" ignore="set +e" \
422 echoFlag=v errFlag=e \
423 path=${__MAKE_SHELL}
424.endif
425
426# Hack for ports compatibility. Historically, ports makefiles have
427# assumed they can examine MACHINE_CPU without including anything
428# because this was automatically included in sys.mk. For /usr/src,
429# this file has moved to being included from bsd.opts.mk. Until all
430# the ports files are modernized, and a reasonable transition
431# period has passed, include it while we're in a ports tree here
432# to preserve historic behavior.
433.if exists(${.CURDIR}/../../Mk/bsd.port.mk)
434.include <bsd.cpu.mk>
435.endif
436
437.endif # ! Posix