Wed Apr 24 07:54:53 2024 UTC (39d)
Switch alpha and VAX back to old Mesa for now untill someone fixes
those builds with newer Mesa.


(martin)
diff -r1.1369 -r1.1370 src/share/mk/bsd.own.mk

cvs diff -r1.1369 -r1.1370 src/share/mk/bsd.own.mk (switch to unified diff)

--- src/share/mk/bsd.own.mk 2024/04/24 05:20:35 1.1369
+++ src/share/mk/bsd.own.mk 2024/04/24 07:54:53 1.1370
@@ -1,1857 +1,1864 @@ @@ -1,1857 +1,1864 @@
1# $NetBSD: bsd.own.mk,v 1.1369 2024/04/24 05:20:35 nia Exp $ 1# $NetBSD: bsd.own.mk,v 1.1370 2024/04/24 07:54:53 martin Exp $
2 2
3# This needs to be before bsd.init.mk 3# This needs to be before bsd.init.mk
4.if defined(BSD_MK_COMPAT_FILE) 4.if defined(BSD_MK_COMPAT_FILE)
5.include <${BSD_MK_COMPAT_FILE}> 5.include <${BSD_MK_COMPAT_FILE}>
6.endif 6.endif
7 7
8.if !defined(_BSD_OWN_MK_) 8.if !defined(_BSD_OWN_MK_)
9_BSD_OWN_MK_=1 9_BSD_OWN_MK_=1
10 10
11MAKECONF?= /etc/mk.conf 11MAKECONF?= /etc/mk.conf
12.-include "${MAKECONF}" 12.-include "${MAKECONF}"
13 13
14# 14#
15# CPU model, derived from MACHINE_ARCH 15# CPU model, derived from MACHINE_ARCH
16# 16#
17MACHINE_CPU= ${MACHINE_ARCH:C/mips.*e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/e?arm.*/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/} 17MACHINE_CPU= ${MACHINE_ARCH:C/mips.*e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/e?arm.*/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/}
18 18
19.if (${MACHINE_ARCH} == "mips64el" || \ 19.if (${MACHINE_ARCH} == "mips64el" || \
20 ${MACHINE_ARCH} == "mips64eb" || \ 20 ${MACHINE_ARCH} == "mips64eb" || \
21 ${MACHINE_ARCH} == "mipsn64el" || \ 21 ${MACHINE_ARCH} == "mipsn64el" || \
22 ${MACHINE_ARCH} == "mipsn64eb") 22 ${MACHINE_ARCH} == "mipsn64eb")
23MACHINE_MIPS64= 1 23MACHINE_MIPS64= 1
24.else 24.else
25MACHINE_MIPS64= 0 25MACHINE_MIPS64= 0
26.endif 26.endif
27 27
28# 28#
29# Subdirectory used below ${RELEASEDIR} when building a release 29# Subdirectory used below ${RELEASEDIR} when building a release
30# 30#
31.if \ 31.if \
32 ${MACHINE:Mevbarm} || \ 32 ${MACHINE:Mevbarm} || \
33 ${MACHINE:Mevbmips} || \ 33 ${MACHINE:Mevbmips} || \
34 ${MACHINE:Mevbsh3} || \ 34 ${MACHINE:Mevbsh3} || \
35 ${MACHINE:Mriscv} 35 ${MACHINE:Mriscv}
36RELEASEMACHINEDIR?= ${MACHINE}-${MACHINE_ARCH} 36RELEASEMACHINEDIR?= ${MACHINE}-${MACHINE_ARCH}
37.else 37.else
38RELEASEMACHINEDIR?= ${MACHINE} 38RELEASEMACHINEDIR?= ${MACHINE}
39.endif 39.endif
40 40
41# 41#
42# Subdirectory or path component used for the following paths: 42# Subdirectory or path component used for the following paths:
43# distrib/${RELEASEMACHINE} 43# distrib/${RELEASEMACHINE}
44# distrib/notes/${RELEASEMACHINE} 44# distrib/notes/${RELEASEMACHINE}
45# etc/etc.${RELEASEMACHINE} 45# etc/etc.${RELEASEMACHINE}
46# Used when building a release. 46# Used when building a release.
47# 47#
48RELEASEMACHINE?= ${MACHINE} 48RELEASEMACHINE?= ${MACHINE}
49 49
50# 50#
51# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to 51# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
52# ensure that things defined by <bsd.own.mk> (default targets, 52# ensure that things defined by <bsd.own.mk> (default targets,
53# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. 53# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
54# 54#
55NEED_OWN_INSTALL_TARGET?= yes 55NEED_OWN_INSTALL_TARGET?= yes
56 56
57# 57#
58# This lists the platforms which do not have working in-tree toolchains. For 58# This lists the platforms which do not have working in-tree toolchains. For
59# the in-tree gcc toolchain, this list is empty. 59# the in-tree gcc toolchain, this list is empty.
60# 60#
61# If some future port is not supported by the in-tree toolchain, this should 61# If some future port is not supported by the in-tree toolchain, this should
62# be set to "yes" for that port only. 62# be set to "yes" for that port only.
63# 63#
64# .if ${MACHINE} == "playstation2" 64# .if ${MACHINE} == "playstation2"
65# TOOLCHAIN_MISSING?= yes 65# TOOLCHAIN_MISSING?= yes
66# .endif 66# .endif
67 67
68TOOLCHAIN_MISSING?= no 68TOOLCHAIN_MISSING?= no
69 69
70# 70#
71# GCC Using platforms. 71# GCC Using platforms.
72# 72#
73.if ${MKGCC:Uyes} != "no" # { 73.if ${MKGCC:Uyes} != "no" # {
74 74
75# 75#
76# What GCC is used? 76# What GCC is used?
77# 77#
78HAVE_GCC?= 10 78HAVE_GCC?= 10
79 79
80# 80#
81# Platforms that can't run a modern GCC natively 81# Platforms that can't run a modern GCC natively
82.if ${MACHINE_ARCH} == "m68000" 82.if ${MACHINE_ARCH} == "m68000"
83MKGCCCMDS?= no 83MKGCCCMDS?= no
84.endif 84.endif
85 85
86# 86#
87# We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is 87# We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is
88# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. 88# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC.
89# 89#
90.if ${HAVE_GCC} == 10 90.if ${HAVE_GCC} == 10
91EXTERNAL_GCC_SUBDIR?= gcc.old 91EXTERNAL_GCC_SUBDIR?= gcc.old
92.elif ${HAVE_GCC} == 12 92.elif ${HAVE_GCC} == 12
93EXTERNAL_GCC_SUBDIR?= gcc 93EXTERNAL_GCC_SUBDIR?= gcc
94.else 94.else
95EXTERNAL_GCC_SUBDIR?= /does/not/exist 95EXTERNAL_GCC_SUBDIR?= /does/not/exist
96.endif 96.endif
97 97
98.else # MKGCC == no # } { 98.else # MKGCC == no # } {
99MKGCCCMDS?= no 99MKGCCCMDS?= no
100.endif # MKGCC == no # } 100.endif # MKGCC == no # }
101 101
102# 102#
103# What binutils is used? 103# What binutils is used?
104# 104#
105HAVE_BINUTILS?= 239 105HAVE_BINUTILS?= 239
106 106
107.if ${HAVE_BINUTILS} == 239 107.if ${HAVE_BINUTILS} == 239
108EXTERNAL_BINUTILS_SUBDIR= binutils 108EXTERNAL_BINUTILS_SUBDIR= binutils
109.elif ${HAVE_BINUTILS} == 234 109.elif ${HAVE_BINUTILS} == 234
110EXTERNAL_BINUTILS_SUBDIR= binutils.old 110EXTERNAL_BINUTILS_SUBDIR= binutils.old
111.else 111.else
112EXTERNAL_BINUTILS_SUBDIR= /does/not/exist 112EXTERNAL_BINUTILS_SUBDIR= /does/not/exist
113.endif 113.endif
114 114
115# 115#
116# What GDB is used? 116# What GDB is used?
117# 117#
118HAVE_GDB?= 1320 118HAVE_GDB?= 1320
119 119
120.if ${HAVE_GDB} == 1320 120.if ${HAVE_GDB} == 1320
121EXTERNAL_GDB_SUBDIR= gdb 121EXTERNAL_GDB_SUBDIR= gdb
122.elif ${HAVE_GDB} == 1100 122.elif ${HAVE_GDB} == 1100
123EXTERNAL_GDB_SUBDIR= gdb.old 123EXTERNAL_GDB_SUBDIR= gdb.old
124.else 124.else
125EXTERNAL_GDB_SUBDIR= /does/not/exist 125EXTERNAL_GDB_SUBDIR= /does/not/exist
126.endif 126.endif
127 127
128# 128#
129# What OpenSSL is used? 129# What OpenSSL is used?
130# 130#
131HAVE_OPENSSL?= 30 131HAVE_OPENSSL?= 30
132 132
133.if ${HAVE_OPENSSL} == 30 133.if ${HAVE_OPENSSL} == 30
134EXTERNAL_OPENSSL_SUBDIR=openssl 134EXTERNAL_OPENSSL_SUBDIR=openssl
135.elif ${HAVE_OPENSSL} == 11 135.elif ${HAVE_OPENSSL} == 11
136EXTERNAL_OPENSSL_SUBDIR=openssl.old 136EXTERNAL_OPENSSL_SUBDIR=openssl.old
137.else 137.else
138EXTERNAL_OPENSSL_SUBDIR=/does/not/exist 138EXTERNAL_OPENSSL_SUBDIR=/does/not/exist
139.endif 139.endif
140 140
141# 141#
142# Does the platform support ACPI? 142# Does the platform support ACPI?
143# 143#
144.if ${MACHINE} == "i386" || \ 144.if ${MACHINE} == "i386" || \
145 ${MACHINE} == "amd64" || \ 145 ${MACHINE} == "amd64" || \
146 ${MACHINE} == "ia64" || \ 146 ${MACHINE} == "ia64" || \
147 ${MACHINE_ARCH:Maarch64*} 147 ${MACHINE_ARCH:Maarch64*}
148HAVE_ACPI= yes 148HAVE_ACPI= yes
149.else 149.else
150HAVE_ACPI= no 150HAVE_ACPI= no
151.endif 151.endif
152 152
153# 153#
154# Does the platform support UEFI? 154# Does the platform support UEFI?
155# 155#
156.if ${MACHINE} == "i386" || \ 156.if ${MACHINE} == "i386" || \
157 ${MACHINE} == "amd64" || \ 157 ${MACHINE} == "amd64" || \
158 ${MACHINE} == "ia64" || \ 158 ${MACHINE} == "ia64" || \
159 ${MACHINE_ARCH:Mearmv7*} || \ 159 ${MACHINE_ARCH:Mearmv7*} || \
160 ${MACHINE_ARCH:Maarch64*} || \ 160 ${MACHINE_ARCH:Maarch64*} || \
161 ${MACHINE_ARCH} == "riscv64" 161 ${MACHINE_ARCH} == "riscv64"
162HAVE_UEFI= yes 162HAVE_UEFI= yes
163.else 163.else
164HAVE_UEFI= no 164HAVE_UEFI= no
165.endif 165.endif
166 166
167# 167#
168# Does the platform support NVMM? 168# Does the platform support NVMM?
169# 169#
170.if ${MACHINE_ARCH} == "x86_64" 170.if ${MACHINE_ARCH} == "x86_64"
171HAVE_NVMM= yes 171HAVE_NVMM= yes
172.else 172.else
173HAVE_NVMM= no 173HAVE_NVMM= no
174.endif 174.endif
175 175
176 176
177.if ${MACHINE_ARCH:Mearm*} 177.if ${MACHINE_ARCH:Mearm*}
178_LIBC_COMPILER_RT.${MACHINE_ARCH}= yes 178_LIBC_COMPILER_RT.${MACHINE_ARCH}= yes
179.endif 179.endif
180 180
181_LIBC_COMPILER_RT.aarch64= yes 181_LIBC_COMPILER_RT.aarch64= yes
182_LIBC_COMPILER_RT.aarch64eb= yes 182_LIBC_COMPILER_RT.aarch64eb= yes
183_LIBC_COMPILER_RT.i386= yes 183_LIBC_COMPILER_RT.i386= yes
184_LIBC_COMPILER_RT.powerpc= yes 184_LIBC_COMPILER_RT.powerpc= yes
185_LIBC_COMPILER_RT.powerpc64= yes 185_LIBC_COMPILER_RT.powerpc64= yes
186_LIBC_COMPILER_RT.sparc= yes 186_LIBC_COMPILER_RT.sparc= yes
187_LIBC_COMPILER_RT.sparc64= yes 187_LIBC_COMPILER_RT.sparc64= yes
188_LIBC_COMPILER_RT.x86_64= yes 188_LIBC_COMPILER_RT.x86_64= yes
189 189
190.if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes" 190.if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes"
191HAVE_LIBGCC?= no 191HAVE_LIBGCC?= no
192.else 192.else
193HAVE_LIBGCC?= yes 193HAVE_LIBGCC?= yes
194.endif 194.endif
195 195
196 196
197# Should libgcc have unwinding code? 197# Should libgcc have unwinding code?
198.if ${HAVE_LLVM:Uno} == "yes" || ${MACHINE_ARCH:Mearm*} 198.if ${HAVE_LLVM:Uno} == "yes" || ${MACHINE_ARCH:Mearm*}
199HAVE_LIBGCC_EH?= no 199HAVE_LIBGCC_EH?= no
200.else 200.else
201HAVE_LIBGCC_EH?= yes 201HAVE_LIBGCC_EH?= yes
202.endif 202.endif
203 203
204# Coverity does not like SSP 204# Coverity does not like SSP
205.if defined(COVERITY_TOP_CONFIG) || \ 205.if defined(COVERITY_TOP_CONFIG) || \
206 ${MACHINE} == "alpha" || \ 206 ${MACHINE} == "alpha" || \
207 ${MACHINE} == "hppa" || \ 207 ${MACHINE} == "hppa" || \
208 ${MACHINE} == "ia64" || \ 208 ${MACHINE} == "ia64" || \
209 ${MACHINE_CPU} == "mips" 209 ${MACHINE_CPU} == "mips"
210HAVE_SSP?= no 210HAVE_SSP?= no
211.else 211.else
212HAVE_SSP?= yes 212HAVE_SSP?= yes
213.if !defined(NOFORT) && ${USE_FORT:Uno} != "no" 213.if !defined(NOFORT) && ${USE_FORT:Uno} != "no"
214USE_SSP?= yes 214USE_SSP?= yes
215.endif 215.endif
216.endif 216.endif
217 217
218# 218#
219# What version of jemalloc we use (100 is the one 219# What version of jemalloc we use (100 is the one
220# built-in to libc from 2005 (pre version 3). 220# built-in to libc from 2005 (pre version 3).
221# 221#
222.if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2" 222.if ${MACHINE_ARCH} == "vax" || ${MACHINE} == "sun2"
223HAVE_JEMALLOC?= 100 223HAVE_JEMALLOC?= 100
224.else 224.else
225HAVE_JEMALLOC?= 510 225HAVE_JEMALLOC?= 510
226.endif 226.endif
227 227
228.if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) 228.if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*)
229.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 229.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
230PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 230PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
231.else 231.else
232PRINTOBJDIR= ${MAKE} -V .OBJDIR 232PRINTOBJDIR= ${MAKE} -V .OBJDIR
233.endif 233.endif
234.else 234.else
235PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion 235PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion
236.endif 236.endif
237 237
238# 238#
239# Determine if running in the NetBSD source tree by checking for the 239# Determine if running in the NetBSD source tree by checking for the
240# existence of build.sh and tools/ in the current or a parent directory, 240# existence of build.sh and tools/ in the current or a parent directory,
241# and setting _SRC_TOP_ to the result. 241# and setting _SRC_TOP_ to the result.
242# 242#
243.if !defined(_SRC_TOP_) # { 243.if !defined(_SRC_TOP_) # {
244_SRC_TOP_!= cd "${.CURDIR}"; while :; do \ 244_SRC_TOP_!= cd "${.CURDIR}"; while :; do \
245 here=$$(pwd); \ 245 here=$$(pwd); \
246 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ 246 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
247 case $$here in /) echo ""; break;; esac; \ 247 case $$here in /) echo ""; break;; esac; \
248 cd ..; done 248 cd ..; done
249 249
250.MAKEOVERRIDES+= _SRC_TOP_ 250.MAKEOVERRIDES+= _SRC_TOP_
251 251
252.endif # } 252.endif # }
253 253
254# 254#
255# If _SRC_TOP_ != "", we're within the NetBSD source tree. 255# If _SRC_TOP_ != "", we're within the NetBSD source tree.
256# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. 256# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
257# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the 257# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the
258# NetBSD version, or on variables defined at build time, can 258# NetBSD version, or on variables defined at build time, can
259# declare a dependency on ${_NETBSD_VERSION_DEPENDS}. 259# declare a dependency on ${_NETBSD_VERSION_DEPENDS}.
260# 260#
261.if (${_SRC_TOP_} != "") # { 261.if (${_SRC_TOP_} != "") # {
262 262
263NETBSDSRCDIR?= ${_SRC_TOP_} 263NETBSDSRCDIR?= ${_SRC_TOP_}
264 264
265.if !defined(_SRC_TOP_OBJ_) 265.if !defined(_SRC_TOP_OBJ_)
266_SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR} 266_SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR}
267.MAKEOVERRIDES+= _SRC_TOP_OBJ_ 267.MAKEOVERRIDES+= _SRC_TOP_OBJ_
268.endif 268.endif
269 269
270_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params 270_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params
271_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h 271_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h
272_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh 272_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh
273_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh 273_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh
274${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build" 274${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build"
275 275
276.endif # _SRC_TOP_ != "" # } 276.endif # _SRC_TOP_ != "" # }
277 277
278 278
279.if (${_SRC_TOP_} != "") && \ 279.if (${_SRC_TOP_} != "") && \
280 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) 280 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
281USETOOLS?= yes 281USETOOLS?= yes
282.endif 282.endif
283USETOOLS?= no 283USETOOLS?= no
284 284
285 285
286.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ 286.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
287 ${MACHINE_ARCH} == "sh3" 287 ${MACHINE_ARCH} == "sh3"
288.BEGIN: 288.BEGIN:
289 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" 289 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
290 @false 290 @false
291.elif defined(REQUIRETOOLS) && \ 291.elif defined(REQUIRETOOLS) && \
292 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ 292 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
293 ${USETOOLS} == "no" 293 ${USETOOLS} == "no"
294.BEGIN: 294.BEGIN:
295 @echo "USETOOLS=no, but this component requires a version-specific host toolchain" 295 @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
296 @false 296 @false
297.endif 297.endif
298 298
299# 299#
300# Host platform information; may be overridden 300# Host platform information; may be overridden
301# 301#
302.include <bsd.host.mk> 302.include <bsd.host.mk>
303 303
304.if ${USETOOLS} == "yes" # { 304.if ${USETOOLS} == "yes" # {
305 305
306# 306#
307# Provide a default for TOOLDIR. 307# Provide a default for TOOLDIR.
308# 308#
309.if !defined(TOOLDIR) 309.if !defined(TOOLDIR)
310TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 310TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
311.MAKEOVERRIDES+= TOOLDIR 311.MAKEOVERRIDES+= TOOLDIR
312.endif 312.endif
313 313
314# 314#
315# This is the prefix used for the NetBSD-sourced tools. 315# This is the prefix used for the NetBSD-sourced tools.
316# 316#
317_TOOL_PREFIX?= nb 317_TOOL_PREFIX?= nb
318 318
319# 319#
320# If an external toolchain base is specified, use it. 320# If an external toolchain base is specified, use it.
321# 321#
322.if defined(EXTERNAL_TOOLCHAIN) # { 322.if defined(EXTERNAL_TOOLCHAIN) # {
323AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 323AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
324AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 324AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
325ELFEDIT= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-elfedit 325ELFEDIT= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-elfedit
326LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 326LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
327NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 327NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
328OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 328OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
329OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 329OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
330RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 330RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
331READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf 331READELF= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf
332SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 332SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
333STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings 333STRINGS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings
334STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 334STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
335 335
336TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 336TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
337TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 337TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
338TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 338TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
339TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran 339TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gfortran
340TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 340TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
341 341
342TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 342TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
343TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 343TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
344TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++ 344TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++
345TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 345TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
346.else # } { 346.else # } {
347# Define default locations for common tools. 347# Define default locations for common tools.
348.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { 348.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
349AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 349AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
350AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 350AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
351ELFEDIT= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-elfedit 351ELFEDIT= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-elfedit
352LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 352LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
353NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 353NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
354OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 354OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
355OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 355OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
356RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 356RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
357READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf 357READELF= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
358SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 358SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
359STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings 359STRINGS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings
360STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 360STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
361 361
362# GCC supports C, C++, Fortran and Objective C 362# GCC supports C, C++, Fortran and Objective C
363TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 363TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
364TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 364TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
365TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 365TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
366TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran 366TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gfortran
367TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 367TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
368.endif # } 368.endif # }
369 369
370# Clang supports C, C++ and Objective C 370# Clang supports C, C++ and Objective C
371TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 371TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
372TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 372TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
373TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++ 373TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
374TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 374TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
375 375
376# PCC supports C and Fortran 376# PCC supports C and Fortran
377TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 377TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
378TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp 378TOOL_CPP.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp
379TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ 379TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++
380.endif # EXTERNAL_TOOLCHAIN # } 380.endif # EXTERNAL_TOOLCHAIN # }
381 381
382# 382#
383# Make sure DESTDIR is set, so that builds with these tools always 383# Make sure DESTDIR is set, so that builds with these tools always
384# get appropriate -nostdinc, -nostdlib, etc. handling. The default is 384# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
385# <empty string>, meaning start from /, the root directory. 385# <empty string>, meaning start from /, the root directory.
386# 386#
387DESTDIR?= 387DESTDIR?=
388 388
389# Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.) 389# Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.)
390# because it confuses Coverity. Still we need to cov-configure specially 390# because it confuses Coverity. Still we need to cov-configure specially
391# for each specific sysroot argument. 391# for each specific sysroot argument.
392# Also don't add a sysroot at all if a rumpkernel build. 392# Also don't add a sysroot at all if a rumpkernel build.
393.if !defined(HOSTPROG) && !defined(HOSTLIB) && !defined(RUMPRUN) 393.if !defined(HOSTPROG) && !defined(HOSTLIB) && !defined(RUMPRUN)
394. if ${DESTDIR} != "" 394. if ${DESTDIR} != ""
395. if empty(CPPFLAGS:M*--sysroot=*) 395. if empty(CPPFLAGS:M*--sysroot=*)
396CPPFLAGS+= --sysroot=${DESTDIR} 396CPPFLAGS+= --sysroot=${DESTDIR}
397. endif 397. endif
398LDFLAGS+= --sysroot=${DESTDIR} 398LDFLAGS+= --sysroot=${DESTDIR}
399. else 399. else
400. if empty(CPPFLAGS:M*--sysroot=*) 400. if empty(CPPFLAGS:M*--sysroot=*)
401CPPFLAGS+= --sysroot=/ 401CPPFLAGS+= --sysroot=/
402. endif 402. endif
403LDFLAGS+= --sysroot=/ 403LDFLAGS+= --sysroot=/
404. endif 404. endif
405.endif 405.endif
406 406
407DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 407DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
408ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout 408ARM_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout
409M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 409M68K_ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
410MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 410MIPS_ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
411INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 411INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
412LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 412LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
413LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 413LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
414LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 414LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
415MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 415MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
416MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 416MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
417PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 417PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
418TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 418TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
419YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 419YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
420 420
421TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 421TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
422TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 422TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
423TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 423TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
424TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 424TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
425TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 425TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
426TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 426TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
427TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 427TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
428TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 428TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
429TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen 429TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen
430TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 430TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
431TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 431TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
432TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 432TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
433TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 433TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
434TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert 434TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
435TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge 435TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
436TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest 436TOOL_CVSLATEST= ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest
437TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date 437TOOL_DATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}date
438TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 438TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
439TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel 439TOOL_DISKLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}disklabel
440TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc 440TOOL_DTC= ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc
441TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 441TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
442TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 442TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
443TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 443TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
444TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 444TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
445TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 445TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
446TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 446TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
447TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt 447TOOL_GPT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt
448TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep 448TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
449GROFF_SHARE_PATH= ${TOOLDIR}/share/groff 449GROFF_SHARE_PATH= ${TOOLDIR}/share/groff
450TOOL_GROFF_ENV= \ 450TOOL_GROFF_ENV= \
451 GROFF_ENCODING= \ 451 GROFF_ENCODING= \
452 GROFF_BIN_PATH=${TOOLDIR}/lib/groff \ 452 GROFF_BIN_PATH=${TOOLDIR}/lib/groff \
453 GROFF_FONT_PATH=${GROFF_SHARE_PATH}/site-font:${GROFF_SHARE_PATH}/font \ 453 GROFF_FONT_PATH=${GROFF_SHARE_PATH}/site-font:${GROFF_SHARE_PATH}/font \
454 GROFF_TMAC_PATH=${GROFF_SHARE_PATH}/site-tmac:${GROFF_SHARE_PATH}/tmac 454 GROFF_TMAC_PATH=${GROFF_SHARE_PATH}/site-tmac:${GROFF_SHARE_PATH}/tmac
455TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS} 455TOOL_GROFF= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff ${GROFF_FLAGS}
456TOOL_GROPS= ${TOOL_GROFF_ENV} ${TOOLDIR}/lib/groff/grops 456TOOL_GROPS= ${TOOL_GROFF_ENV} ${TOOLDIR}/lib/groff/grops
457 457
458TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 458TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
459TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 459TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
460TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot 460TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot
461TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 461TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
462TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 462TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
463TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 463TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
464TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 464TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
465TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen 465TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
466TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 466TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
467TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 467TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
468TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 468TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
469TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 469TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
470TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys 470TOOL_MAKEKEYS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys
471TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs 471TOOL_MAKESTRS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs
472TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 472TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
473TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii 473TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
474TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml 474TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
475TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint 475TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
476TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 476TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
477TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 477TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
478TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout 478TOOL_ARMELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}arm-elf2aout
479TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 479TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
480TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 480TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
481TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 481TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
482TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 482TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
483TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 483TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
484TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 484TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
485TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod 485TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod
486TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 486TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
487TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage 487TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
488TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb 488TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb
489TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 489TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
490TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 490TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
491TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid 491TOOL_MVME68KWRTVID= ${TOOLDIR}/bin/${_TOOL_PREFIX}mvme68k-wrtvid
492TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf 492TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf
493TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs 493TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs
494TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 494TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
495TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 495TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
496TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz 496TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz
497TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz 497TOOL_XZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}xz
498TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create 498TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
499TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 499TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
500TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 500TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
501TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 501TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
502TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 502TOOL_ROFF_ASCII= ${TOOL_GROFF_ENV} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
503TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 503TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
504TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 504TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
505TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} 505TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE}
506TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 506TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
507TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} 507TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE}
508TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 508TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
509TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 509TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
510TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 510TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
511TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc 511TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc
512TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 512TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
513TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo 513TOOL_SORTINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo
514TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 514TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
515TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 515TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
516TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 516TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
517TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 517TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
518TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 518TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
519TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic 519TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic
520TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 520TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
521TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 521TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
522TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr 522TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr
523TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 523TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
524 524
525.else # USETOOLS != yes # } { 525.else # USETOOLS != yes # } {
526 526
527# Clang supports C, C++ and Objective C 527# Clang supports C, C++ and Objective C
528TOOL_CC.clang= clang 528TOOL_CC.clang= clang
529TOOL_CPP.clang= clang-cpp 529TOOL_CPP.clang= clang-cpp
530TOOL_CXX.clang= clang++ 530TOOL_CXX.clang= clang++
531TOOL_OBJC.clang= clang 531TOOL_OBJC.clang= clang
532 532
533# GCC supports C, C++, Fortran and Objective C 533# GCC supports C, C++, Fortran and Objective C
534TOOL_CC.gcc= gcc 534TOOL_CC.gcc= gcc
535TOOL_CPP.gcc= cpp 535TOOL_CPP.gcc= cpp
536TOOL_CXX.gcc= c++ 536TOOL_CXX.gcc= c++
537TOOL_FC.gcc= gfortran 537TOOL_FC.gcc= gfortran
538TOOL_OBJC.gcc= gcc 538TOOL_OBJC.gcc= gcc
539 539
540# PCC supports C and Fortran 540# PCC supports C and Fortran
541TOOL_CC.pcc= pcc 541TOOL_CC.pcc= pcc
542TOOL_CPP.pcc= pcpp 542TOOL_CPP.pcc= pcpp
543TOOL_CXX.pcc= p++ 543TOOL_CXX.pcc= p++
544 544
545TOOL_AMIGAAOUT2BB= amiga-aout2bb 545TOOL_AMIGAAOUT2BB= amiga-aout2bb
546TOOL_AMIGAELF2BB= amiga-elf2bb 546TOOL_AMIGAELF2BB= amiga-elf2bb
547TOOL_AMIGATXLT= amiga-txlt 547TOOL_AMIGATXLT= amiga-txlt
548TOOL_ASN1_COMPILE= asn1_compile 548TOOL_ASN1_COMPILE= asn1_compile
549TOOL_AWK= awk 549TOOL_AWK= awk
550TOOL_CAP_MKDB= cap_mkdb 550TOOL_CAP_MKDB= cap_mkdb
551TOOL_CAT= cat 551TOOL_CAT= cat
552TOOL_CKSUM= cksum 552TOOL_CKSUM= cksum
553TOOL_CLANG_TBLGEN= clang-tblgen 553TOOL_CLANG_TBLGEN= clang-tblgen
554TOOL_COMPILE_ET= compile_et 554TOOL_COMPILE_ET= compile_et
555TOOL_CONFIG= config 555TOOL_CONFIG= config
556TOOL_CRUNCHGEN= crunchgen 556TOOL_CRUNCHGEN= crunchgen
557TOOL_CTAGS= ctags 557TOOL_CTAGS= ctags
558TOOL_CTFCONVERT= ctfconvert 558TOOL_CTFCONVERT= ctfconvert
559TOOL_CTFMERGE= ctfmerge 559TOOL_CTFMERGE= ctfmerge
560TOOL_CVSLATEST= cvslatest 560TOOL_CVSLATEST= cvslatest
561TOOL_DATE= date 561TOOL_DATE= date
562TOOL_DB= db 562TOOL_DB= db
563TOOL_DISKLABEL= disklabel 563TOOL_DISKLABEL= disklabel
564TOOL_DTC= dtc 564TOOL_DTC= dtc
565TOOL_EQN= eqn 565TOOL_EQN= eqn
566TOOL_FDISK= fdisk 566TOOL_FDISK= fdisk
567TOOL_FGEN= fgen 567TOOL_FGEN= fgen
568TOOL_GENASSYM= genassym 568TOOL_GENASSYM= genassym
569TOOL_GENCAT= gencat 569TOOL_GENCAT= gencat
570TOOL_GMAKE= gmake 570TOOL_GMAKE= gmake
571TOOL_GPT= gpt 571TOOL_GPT= gpt
572TOOL_GREP= grep 572TOOL_GREP= grep
573TOOL_GROFF= groff 573TOOL_GROFF= groff
574TOOL_GROPS= grops 574TOOL_GROPS= grops
575TOOL_HEXDUMP= hexdump 575TOOL_HEXDUMP= hexdump
576TOOL_HP300MKBOOT= hp300-mkboot 576TOOL_HP300MKBOOT= hp300-mkboot
577TOOL_HPPAMKBOOT= hppa-mkboot 577TOOL_HPPAMKBOOT= hppa-mkboot
578TOOL_INDXBIB= indxbib 578TOOL_INDXBIB= indxbib
579TOOL_INSTALLBOOT= installboot 579TOOL_INSTALLBOOT= installboot
580TOOL_INSTALL_INFO= install-info 580TOOL_INSTALL_INFO= install-info
581TOOL_JOIN= join 581TOOL_JOIN= join
582TOOL_LLVM_TBLGEN= llvm-tblgen 582TOOL_LLVM_TBLGEN= llvm-tblgen
583TOOL_M4= m4 583TOOL_M4= m4
584TOOL_MACPPCFIXCOFF= macppc-fixcoff 584TOOL_MACPPCFIXCOFF= macppc-fixcoff
585TOOL_MAKEFS= makefs 585TOOL_MAKEFS= makefs
586TOOL_MAKEINFO= makeinfo 586TOOL_MAKEINFO= makeinfo
587TOOL_MAKEKEYS= makekeys 587TOOL_MAKEKEYS= makekeys
588TOOL_MAKESTRS= makestrs 588TOOL_MAKESTRS= makestrs
589TOOL_MAKEWHATIS= /usr/libexec/makewhatis 589TOOL_MAKEWHATIS= /usr/libexec/makewhatis
590TOOL_MANDOC_ASCII= mandoc -Tascii 590TOOL_MANDOC_ASCII= mandoc -Tascii
591TOOL_MANDOC_HTML= mandoc -Thtml 591TOOL_MANDOC_HTML= mandoc -Thtml
592TOOL_MANDOC_LINT= mandoc -Tlint 592TOOL_MANDOC_LINT= mandoc -Tlint
593TOOL_MDSETIMAGE= mdsetimage 593TOOL_MDSETIMAGE= mdsetimage
594TOOL_MENUC= menuc 594TOOL_MENUC= menuc
595TOOL_ARMELF2AOUT= arm-elf2aout 595TOOL_ARMELF2AOUT= arm-elf2aout
596TOOL_M68KELF2AOUT= m68k-elf2aout 596TOOL_M68KELF2AOUT= m68k-elf2aout
597TOOL_MIPSELF2ECOFF= mips-elf2ecoff 597TOOL_MIPSELF2ECOFF= mips-elf2ecoff
598TOOL_MKCSMAPPER= mkcsmapper 598TOOL_MKCSMAPPER= mkcsmapper
599TOOL_MKESDB= mkesdb 599TOOL_MKESDB= mkesdb
600TOOL_MKLOCALE= mklocale 600TOOL_MKLOCALE= mklocale
601TOOL_MKMAGIC= file 601TOOL_MKMAGIC= file
602TOOL_MKNOD= mknod 602TOOL_MKNOD= mknod
603TOOL_MKTEMP= mktemp 603TOOL_MKTEMP= mktemp
604TOOL_MKUBOOTIMAGE= mkubootimage 604TOOL_MKUBOOTIMAGE= mkubootimage
605TOOL_ELFTOSB= elftosb 605TOOL_ELFTOSB= elftosb
606TOOL_MSGC= msgc 606TOOL_MSGC= msgc
607TOOL_MTREE= mtree 607TOOL_MTREE= mtree
608TOOL_MVME68KWRTVID= wrtvid 608TOOL_MVME68KWRTVID= wrtvid
609TOOL_NBPERF= nbperf 609TOOL_NBPERF= nbperf
610TOOL_NCDCS= ncdcs 610TOOL_NCDCS= ncdcs
611TOOL_PAX= pax 611TOOL_PAX= pax
612TOOL_PIC= pic 612TOOL_PIC= pic
613TOOL_PIGZ= pigz 613TOOL_PIGZ= pigz
614TOOL_XZ= xz 614TOOL_XZ= xz
615TOOL_PKG_CREATE= pkg_create 615TOOL_PKG_CREATE= pkg_create
616TOOL_POWERPCMKBOOTIMAGE=powerpc-mkbootimage 616TOOL_POWERPCMKBOOTIMAGE=powerpc-mkbootimage
617TOOL_PWD_MKDB= pwd_mkdb 617TOOL_PWD_MKDB= pwd_mkdb
618TOOL_REFER= refer 618TOOL_REFER= refer
619TOOL_ROFF_ASCII= nroff 619TOOL_ROFF_ASCII= nroff
620TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 620TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
621TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 621TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
622TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE} 622TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi ${ROFF_PAGESIZE}
623TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 623TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
624TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE} 624TOOL_ROFF_PS= ${TOOL_GROFF} -Tps ${ROFF_PAGESIZE}
625TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 625TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
626TOOL_RPCGEN= rpcgen 626TOOL_RPCGEN= rpcgen
627TOOL_SED= sed 627TOOL_SED= sed
628TOOL_SOELIM= soelim 628TOOL_SOELIM= soelim
629TOOL_SORTINFO= sortinfo 629TOOL_SORTINFO= sortinfo
630TOOL_SPARKCRC= sparkcrc 630TOOL_SPARKCRC= sparkcrc
631TOOL_STAT= stat 631TOOL_STAT= stat
632TOOL_STRFILE= strfile 632TOOL_STRFILE= strfile
633TOOL_SUNLABEL= sunlabel 633TOOL_SUNLABEL= sunlabel
634TOOL_TBL= tbl 634TOOL_TBL= tbl
635TOOL_TIC= tic 635TOOL_TIC= tic
636TOOL_UUDECODE= uudecode 636TOOL_UUDECODE= uudecode
637TOOL_VGRIND= vgrind -f 637TOOL_VGRIND= vgrind -f
638TOOL_VFONTEDPR= /usr/libexec/vfontedpr 638TOOL_VFONTEDPR= /usr/libexec/vfontedpr
639TOOL_ZIC= zic 639TOOL_ZIC= zic
640 640
641.endif # USETOOLS != yes # } 641.endif # USETOOLS != yes # }
642 642
643# Standalone code should not be compiled with PIE or CTF 643# Standalone code should not be compiled with PIE or CTF
644# Should create a better test 644# Should create a better test
645.if defined(BINDIR) && ${BINDIR} == "/usr/mdec" 645.if defined(BINDIR) && ${BINDIR} == "/usr/mdec"
646NOPIE= # defined 646NOPIE= # defined
647NOCTF= # defined 647NOCTF= # defined
648.elif ${MACHINE} == "sun2" 648.elif ${MACHINE} == "sun2"
649NOPIE= # we don't have PIC, so no PIE 649NOPIE= # we don't have PIC, so no PIE
650.endif 650.endif
651 651
652# Fallback to ensure that all variables are defined to something 652# Fallback to ensure that all variables are defined to something
653TOOL_CC.false= false 653TOOL_CC.false= false
654TOOL_CPP.false= false 654TOOL_CPP.false= false
655TOOL_CXX.false= false 655TOOL_CXX.false= false
656TOOL_FC.false= false 656TOOL_FC.false= false
657TOOL_OBJC.false= false 657TOOL_OBJC.false= false
658 658
659AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false 659AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false
660 660
661.for _t in CC CPP CXX FC OBJC 661.for _t in CC CPP CXX FC OBJC
662ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]} 662ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]}
663SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@} 663SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@}
664.endfor 664.endfor
665# make bugs prevent moving this into the .for loop 665# make bugs prevent moving this into the .for loop
666CC= ${TOOL_CC.${ACTIVE_CC}} 666CC= ${TOOL_CC.${ACTIVE_CC}}
667CPP= ${TOOL_CPP.${ACTIVE_CPP}} 667CPP= ${TOOL_CPP.${ACTIVE_CPP}}
668CXX= ${TOOL_CXX.${ACTIVE_CXX}} 668CXX= ${TOOL_CXX.${ACTIVE_CXX}}
669FC= ${TOOL_FC.${ACTIVE_FC}} 669FC= ${TOOL_FC.${ACTIVE_FC}}
670OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} 670OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}}
671 671
672# 672#
673# Clang and GCC compiler-specific options, usually to disable warnings. 673# Clang and GCC compiler-specific options, usually to disable warnings.
674# The naming convention is "CC" + the compiler flag converted 674# The naming convention is "CC" + the compiler flag converted
675# to upper case, with '-' and '=' changed to '_' a la `tr -=a-z __A-Z`. 675# to upper case, with '-' and '=' changed to '_' a la `tr -=a-z __A-Z`.
676# For variable naming purposes, treat -Werror=FLAG as -WFLAG, 676# For variable naming purposes, treat -Werror=FLAG as -WFLAG,
677# and -Wno-error=FLAG as -Wno-FLAG (usually from Clang). 677# and -Wno-error=FLAG as -Wno-FLAG (usually from Clang).
678# 678#
679# E.g., CC_WNO_ADDRESS_OF_PACKED_MEMBER contains 679# E.g., CC_WNO_ADDRESS_OF_PACKED_MEMBER contains
680# both -Wno-error=address-of-packed-member for Clang, 680# both -Wno-error=address-of-packed-member for Clang,
681# and -Wno-address-of-packed-member for GCC 9+. 681# and -Wno-address-of-packed-member for GCC 9+.
682# 682#
683# Use these with e.g. 683# Use these with e.g.
684# COPTS.foo.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 684# COPTS.foo.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
685# 685#
686CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \ 686CC_WNO_ADDRESS_OF_PACKED_MEMBER=${${ACTIVE_CC} == "clang" :? -Wno-error=address-of-packed-member :} \
687 ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :} 687 ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -Wno-address-of-packed-member :}
688 688
689CC_WNO_ARRAY_BOUNDS= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-array-bounds :} 689CC_WNO_ARRAY_BOUNDS= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-array-bounds :}
690CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :} 690CC_WNO_CAST_FUNCTION_TYPE= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-cast-function-type :}
691CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :} 691CC_WNO_FORMAT_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-overflow :}
692CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :} 692CC_WNO_FORMAT_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-format-truncation :}
693CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :} 693CC_WNO_IMPLICIT_FALLTHROUGH= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :}
694CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} 694CC_WNO_MAYBE_UNINITIALIZED= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :}
695CC_WNO_MISSING_TEMPLATE_KEYWORD=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-missing-template-keyword :} 695CC_WNO_MISSING_TEMPLATE_KEYWORD=${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-missing-template-keyword :}
696CC_WNO_REGISTER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-register :} 696CC_WNO_REGISTER= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-register :}
697CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :} 697CC_WNO_RETURN_LOCAL_ADDR= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-return-local-addr :}
698CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :} 698CC_WNO_STRINGOP_OVERFLOW= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-stringop-overflow :}
699CC_WNO_STRINGOP_OVERREAD= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-stringop-overread :} 699CC_WNO_STRINGOP_OVERREAD= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 12:? -Wno-stringop-overread :}
700CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :} 700CC_WNO_STRINGOP_TRUNCATION= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-stringop-truncation :}
701 701
702# For each ${MACHINE_CPU}, list the ports that use it. 702# For each ${MACHINE_CPU}, list the ports that use it.
703MACHINES.aarch64= evbarm 703MACHINES.aarch64= evbarm
704MACHINES.alpha= alpha 704MACHINES.alpha= alpha
705MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \ 705MACHINES.arm= acorn32 cats epoc32 evbarm hpcarm \
706 iyonix netwinder shark zaurus 706 iyonix netwinder shark zaurus
707MACHINES.coldfire= evbcf 707MACHINES.coldfire= evbcf
708MACHINES.i386= i386 708MACHINES.i386= i386
709MACHINES.ia64= ia64 709MACHINES.ia64= ia64
710MACHINES.hppa= hppa 710MACHINES.hppa= hppa
711MACHINES.m68000= sun2 711MACHINES.m68000= sun2
712MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ 712MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \
713 mvme68k news68k next68k sun3 virt68k x68k 713 mvme68k news68k next68k sun3 virt68k x68k
714MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ 714MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \
715 hpcmips mipsco newsmips pmax sbmips sgimips 715 hpcmips mipsco newsmips pmax sbmips sgimips
716MACHINES.or1k= or1k 716MACHINES.or1k= or1k
717MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \ 717MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \
718 ofppc prep rs6000 sandpoint 718 ofppc prep rs6000 sandpoint
719MACHINES.riscv= riscv 719MACHINES.riscv= riscv
720MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye 720MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye
721MACHINES.sparc= sparc sparc64 721MACHINES.sparc= sparc sparc64
722MACHINES.sparc64= sparc64 722MACHINES.sparc64= sparc64
723MACHINES.vax= vax 723MACHINES.vax= vax
724MACHINES.x86_64= amd64 724MACHINES.x86_64= amd64
725 725
726# OBJCOPY flags to create a.out binaries for old firmware 726# OBJCOPY flags to create a.out binaries for old firmware
727# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc 727# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
728.if ${MACHINE_CPU} == "arm" 728.if ${MACHINE_CPU} == "arm"
729OBJCOPY_ELF2AOUT_FLAGS?= \ 729OBJCOPY_ELF2AOUT_FLAGS?= \
730 -O a.out-arm-netbsd \ 730 -O a.out-arm-netbsd \
731 -R .ident \ 731 -R .ident \
732 -R .ARM.attributes \ 732 -R .ARM.attributes \
733 -R .ARM.exidx \ 733 -R .ARM.exidx \
734 -R .ARM.extab \ 734 -R .ARM.extab \
735 -R .SUNW_ctf \ 735 -R .SUNW_ctf \
736 -R .arm.atpcs \ 736 -R .arm.atpcs \
737 -R .comment \ 737 -R .comment \
738 -R .debug_abbrev \ 738 -R .debug_abbrev \
739 -R .debug_aranges \ 739 -R .debug_aranges \
740 -R .debug_info \ 740 -R .debug_info \
741 -R .debug_line \ 741 -R .debug_line \
742 -R .debug_frame \ 742 -R .debug_frame \
743 -R .debug_loc \ 743 -R .debug_loc \
744 -R .debug_pubnames \ 744 -R .debug_pubnames \
745 -R .debug_pubtypes \ 745 -R .debug_pubtypes \
746 -R .debug_ranges \ 746 -R .debug_ranges \
747 -R .debug_str \ 747 -R .debug_str \
748 -R .debug_macinfo \ 748 -R .debug_macinfo \
749 -R .eh_frame \ 749 -R .eh_frame \
750 -R .note.netbsd.ident 750 -R .note.netbsd.ident
751.endif 751.endif
752 752
753# 753#
754# Targets to check if DESTDIR or RELEASEDIR is provided 754# Targets to check if DESTDIR or RELEASEDIR is provided
755# 755#
756.if !target(check_DESTDIR) 756.if !target(check_DESTDIR)
757check_DESTDIR: .PHONY .NOTMAIN 757check_DESTDIR: .PHONY .NOTMAIN
758.if !defined(DESTDIR) 758.if !defined(DESTDIR)
759 @echo "setenv DESTDIR before doing that!" 759 @echo "setenv DESTDIR before doing that!"
760 @false 760 @false
761.else 761.else
762 @true 762 @true
763.endif 763.endif
764.endif 764.endif
765 765
766.if !target(check_RELEASEDIR) 766.if !target(check_RELEASEDIR)
767check_RELEASEDIR: .PHONY .NOTMAIN 767check_RELEASEDIR: .PHONY .NOTMAIN
768.if !defined(RELEASEDIR) 768.if !defined(RELEASEDIR)
769 @echo "setenv RELEASEDIR before doing that!" 769 @echo "setenv RELEASEDIR before doing that!"
770 @false 770 @false
771.else 771.else
772 @true 772 @true
773.endif 773.endif
774.endif 774.endif
775 775
776# 776#
777# Where the system object and source trees are kept; can be configurable 777# Where the system object and source trees are kept; can be configurable
778# by the user in case they want them in ~/foosrc and ~/fooobj (for example). 778# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
779# 779#
780BSDSRCDIR?= /usr/src 780BSDSRCDIR?= /usr/src
781BSDOBJDIR?= /usr/obj 781BSDOBJDIR?= /usr/obj
782NETBSDSRCDIR?= ${BSDSRCDIR} 782NETBSDSRCDIR?= ${BSDSRCDIR}
783 783
784BINGRP?= wheel 784BINGRP?= wheel
785BINOWN?= root 785BINOWN?= root
786BINMODE?= 555 786BINMODE?= 555
787NONBINMODE?= 444 787NONBINMODE?= 444
788 788
789# These are here mainly because we don't want suid root in case 789# These are here mainly because we don't want suid root in case
790# a Makefile defines BINMODE. 790# a Makefile defines BINMODE.
791RUMPBINGRP?= wheel 791RUMPBINGRP?= wheel
792RUMPBINOWN?= root 792RUMPBINOWN?= root
793RUMPBINMODE?= 555 793RUMPBINMODE?= 555
794RUMPNONBINMODE?=444 794RUMPNONBINMODE?=444
795 795
796MANDIR?= /usr/share/man 796MANDIR?= /usr/share/man
797MANGRP?= wheel 797MANGRP?= wheel
798MANOWN?= root 798MANOWN?= root
799MANMODE?= ${NONBINMODE} 799MANMODE?= ${NONBINMODE}
800MANINSTALL?= ${_MANINSTALL} 800MANINSTALL?= ${_MANINSTALL}
801 801
802INFODIR?= /usr/share/info 802INFODIR?= /usr/share/info
803INFOGRP?= wheel 803INFOGRP?= wheel
804INFOOWN?= root 804INFOOWN?= root
805INFOMODE?= ${NONBINMODE} 805INFOMODE?= ${NONBINMODE}
806 806
807LIBDIR?= /usr/lib 807LIBDIR?= /usr/lib
808 808
809LINTLIBDIR?= /usr/libdata/lint 809LINTLIBDIR?= /usr/libdata/lint
810LIBGRP?= ${BINGRP} 810LIBGRP?= ${BINGRP}
811LIBOWN?= ${BINOWN} 811LIBOWN?= ${BINOWN}
812LIBMODE?= ${NONBINMODE} 812LIBMODE?= ${NONBINMODE}
813 813
814DOCDIR?= /usr/share/doc 814DOCDIR?= /usr/share/doc
815DOCGRP?= wheel 815DOCGRP?= wheel
816DOCOWN?= root 816DOCOWN?= root
817DOCMODE?= ${NONBINMODE} 817DOCMODE?= ${NONBINMODE}
818 818
819NLSDIR?= /usr/share/nls 819NLSDIR?= /usr/share/nls
820NLSGRP?= wheel 820NLSGRP?= wheel
821NLSOWN?= root 821NLSOWN?= root
822NLSMODE?= ${NONBINMODE} 822NLSMODE?= ${NONBINMODE}
823 823
824KMODULEGRP?= wheel 824KMODULEGRP?= wheel
825KMODULEOWN?= root 825KMODULEOWN?= root
826KMODULEMODE?= ${NONBINMODE} 826KMODULEMODE?= ${NONBINMODE}
827 827
828LOCALEDIR?= /usr/share/locale 828LOCALEDIR?= /usr/share/locale
829LOCALEGRP?= wheel 829LOCALEGRP?= wheel
830LOCALEOWN?= root 830LOCALEOWN?= root
831LOCALEMODE?= ${NONBINMODE} 831LOCALEMODE?= ${NONBINMODE}
832 832
833FIRMWAREDIR?= /libdata/firmware 833FIRMWAREDIR?= /libdata/firmware
834FIRMWAREGRP?= wheel 834FIRMWAREGRP?= wheel
835FIRMWAREOWN?= root 835FIRMWAREOWN?= root
836FIRMWAREMODE?= ${NONBINMODE} 836FIRMWAREMODE?= ${NONBINMODE}
837 837
838DEBUGDIR?= /usr/libdata/debug 838DEBUGDIR?= /usr/libdata/debug
839DEBUGGRP?= wheel 839DEBUGGRP?= wheel
840DEBUGOWN?= root 840DEBUGOWN?= root
841DEBUGMODE?= ${NONBINMODE} 841DEBUGMODE?= ${NONBINMODE}
842 842
843DTBDIR?= /boot/dtb 843DTBDIR?= /boot/dtb
844DTBGRP?= wheel 844DTBGRP?= wheel
845DTBOWN?= root 845DTBOWN?= root
846DTBMODE?= ${NONBINMODE} 846DTBMODE?= ${NONBINMODE}
847 847
848MKDIRMODE?= 0755 848MKDIRMODE?= 0755
849MKDIRPERM?= -m ${MKDIRMODE} 849MKDIRPERM?= -m ${MKDIRMODE}
850 850
851# 851#
852# Data-driven table using make variables to control how 852# Data-driven table using make variables to control how
853# toolchain-dependent targets and shared libraries are built 853# toolchain-dependent targets and shared libraries are built
854# for different platforms and object formats. 854# for different platforms and object formats.
855# 855#
856# OBJECT_FMT: currently either "ELF" or "a.out". 856# OBJECT_FMT: currently either "ELF" or "a.out".
857# 857#
858# All platforms are ELF. 858# All platforms are ELF.
859# 859#
860OBJECT_FMT= ELF 860OBJECT_FMT= ELF
861 861
862# 862#
863# If this platform's toolchain is missing, we obviously cannot build it. 863# If this platform's toolchain is missing, we obviously cannot build it.
864# 864#
865.if ${TOOLCHAIN_MISSING} != "no" 865.if ${TOOLCHAIN_MISSING} != "no"
866MKBINUTILS:= no 866MKBINUTILS:= no
867MKGDB:= no 867MKGDB:= no
868MKGCC:= no 868MKGCC:= no
869.endif 869.endif
870 870
871# 871#
872# If we are using an external toolchain, we can still build the target's 872# If we are using an external toolchain, we can still build the target's
873# binutils, but we cannot build GCC's support libraries, since those are 873# binutils, but we cannot build GCC's support libraries, since those are
874# tightly-coupled to the version of GCC being used. 874# tightly-coupled to the version of GCC being used.
875# 875#
876.if defined(EXTERNAL_TOOLCHAIN) 876.if defined(EXTERNAL_TOOLCHAIN)
877MKGCC:= no 877MKGCC:= no
878.endif 878.endif
879 879
880MKGDB.or1k= no 880MKGDB.or1k= no
881 881
882# No kernel modules for or1k or riscv (yet) 882# No kernel modules for or1k or riscv (yet)
883MKKMOD.or1k= no 883MKKMOD.or1k= no
884 884
885# No profiling for or1k (yet) 885# No profiling for or1k (yet)
886MKPROFILE.or1k= no 886MKPROFILE.or1k= no
887MKPROFILE.riscv32=no 887MKPROFILE.riscv32=no
888MKPROFILE.riscv64=no 888MKPROFILE.riscv64=no
889 889
890# 890#
891# The m68000 port is incomplete. 891# The m68000 port is incomplete.
892# 892#
893.if ${MACHINE_ARCH} == "m68000" 893.if ${MACHINE_ARCH} == "m68000"
894NOPIC= # defined 894NOPIC= # defined
895MKISCSI= no 895MKISCSI= no
896# XXX GCC 4 outputs mcount() calling sequences that try to load values 896# XXX GCC 4 outputs mcount() calling sequences that try to load values
897# from over 64KB away and this fails to assemble. 897# from over 64KB away and this fails to assemble.
898.if defined(HAVE_GCC) 898.if defined(HAVE_GCC)
899NOPROFILE= # defined 899NOPROFILE= # defined
900.endif 900.endif
901.endif 901.endif
902 902
903# 903#
904# The ia64 port is incomplete. 904# The ia64 port is incomplete.
905# 905#
906MKGDB.ia64= no 906MKGDB.ia64= no
907 907
908# 908#
909# On VAX using ELF, all objects are PIC, not just shared libraries, 909# On VAX using ELF, all objects are PIC, not just shared libraries,
910# so don't build the _pic version. VAX has no native TLS support either, 910# so don't build the _pic version. VAX has no native TLS support either,
911# so differences between TLS models are not relevant. 911# so differences between TLS models are not relevant.
912# 912#
913MKPICLIB.vax= no 913MKPICLIB.vax= no
914 914
915# 915#
916# Location of the file that contains the major and minor numbers of the 916# Location of the file that contains the major and minor numbers of the
917# version of a shared library. If this file exists a shared library 917# version of a shared library. If this file exists a shared library
918# will be built by <bsd.lib.mk>. 918# will be built by <bsd.lib.mk>.
919# 919#
920SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 920SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
921 921
922# 922#
923# GNU sources and packages sometimes see architecture names differently. 923# GNU sources and packages sometimes see architecture names differently.
924# 924#
925GNU_ARCH.aarch64eb=aarch64_be 925GNU_ARCH.aarch64eb=aarch64_be
926GNU_ARCH.coldfire=m5407 926GNU_ARCH.coldfire=m5407
927GNU_ARCH.earm=arm 927GNU_ARCH.earm=arm
928GNU_ARCH.earmhf=arm 928GNU_ARCH.earmhf=arm
929GNU_ARCH.earmeb=armeb 929GNU_ARCH.earmeb=armeb
930GNU_ARCH.earmhfeb=armeb 930GNU_ARCH.earmhfeb=armeb
931GNU_ARCH.earmv4=armv4 931GNU_ARCH.earmv4=armv4
932GNU_ARCH.earmv4eb=armv4eb 932GNU_ARCH.earmv4eb=armv4eb
933GNU_ARCH.earmv5=arm 933GNU_ARCH.earmv5=arm
934GNU_ARCH.earmv5hf=arm 934GNU_ARCH.earmv5hf=arm
935GNU_ARCH.earmv5eb=armeb 935GNU_ARCH.earmv5eb=armeb
936GNU_ARCH.earmv5hfeb=armeb 936GNU_ARCH.earmv5hfeb=armeb
937GNU_ARCH.earmv6=armv6 937GNU_ARCH.earmv6=armv6
938GNU_ARCH.earmv6hf=armv6 938GNU_ARCH.earmv6hf=armv6
939GNU_ARCH.earmv6eb=armv6eb 939GNU_ARCH.earmv6eb=armv6eb
940GNU_ARCH.earmv6hfeb=armv6eb 940GNU_ARCH.earmv6hfeb=armv6eb
941GNU_ARCH.earmv7=armv7 941GNU_ARCH.earmv7=armv7
942GNU_ARCH.earmv7hf=armv7 942GNU_ARCH.earmv7hf=armv7
943GNU_ARCH.earmv7eb=armv7eb 943GNU_ARCH.earmv7eb=armv7eb
944GNU_ARCH.earmv7hfeb=armv7eb 944GNU_ARCH.earmv7hfeb=armv7eb
945GNU_ARCH.i386=i486 945GNU_ARCH.i386=i486
946GCC_CONFIG_ARCH.i386=i486 946GCC_CONFIG_ARCH.i386=i486
947GCC_CONFIG_TUNE.i386=nocona 947GCC_CONFIG_TUNE.i386=nocona
948GCC_CONFIG_TUNE.x86_64=nocona 948GCC_CONFIG_TUNE.x86_64=nocona
949GNU_ARCH.m68000=m68010 949GNU_ARCH.m68000=m68010
950GNU_ARCH.sh3eb=sh 950GNU_ARCH.sh3eb=sh
951GNU_ARCH.sh3el=shle 951GNU_ARCH.sh3el=shle
952GNU_ARCH.mips64eb=mips64 952GNU_ARCH.mips64eb=mips64
953MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 953MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
954 954
955# 955#
956# In order to identify NetBSD to GNU packages, we sometimes need 956# In order to identify NetBSD to GNU packages, we sometimes need
957# an "elf" tag for historically a.out platforms. 957# an "elf" tag for historically a.out platforms.
958# 958#
959.if (${MACHINE_ARCH:Mearm*}) 959.if (${MACHINE_ARCH:Mearm*})
960MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/} 960MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/}
961.elif (${MACHINE_GNU_ARCH} == "arm" || \ 961.elif (${MACHINE_GNU_ARCH} == "arm" || \
962 ${MACHINE_GNU_ARCH} == "armeb" || \ 962 ${MACHINE_GNU_ARCH} == "armeb" || \
963 ${MACHINE_ARCH} == "i386" || \ 963 ${MACHINE_ARCH} == "i386" || \
964 ${MACHINE_CPU} == "m68k" || \ 964 ${MACHINE_CPU} == "m68k" || \
965 ${MACHINE_GNU_ARCH} == "sh" || \ 965 ${MACHINE_GNU_ARCH} == "sh" || \
966 ${MACHINE_GNU_ARCH} == "shle" || \ 966 ${MACHINE_GNU_ARCH} == "shle" || \
967 ${MACHINE_ARCH} == "sparc" || \ 967 ${MACHINE_ARCH} == "sparc" || \
968 ${MACHINE_ARCH} == "vax") 968 ${MACHINE_ARCH} == "vax")
969MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 969MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
970.else 970.else
971MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 971MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
972.endif 972.endif
973 973
974.if ${MACHINE_ARCH:M*arm*} 974.if ${MACHINE_ARCH:M*arm*}
975# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. 975# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand.
976ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm 976ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft -marm
977ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :} 977ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :}
978ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} 978ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
979.endif 979.endif
980 980
981GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} 981GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :}
982 982
983TARGETS+= all clean cleandir depend dependall includes \ 983TARGETS+= all clean cleandir depend dependall includes \
984 install lint obj regress tags html analyze describe \ 984 install lint obj regress tags html analyze describe \
985 rumpdescribe 985 rumpdescribe
986PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 986PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
987 install lint obj regress beforedepend afterdepend \ 987 install lint obj regress beforedepend afterdepend \
988 beforeinstall afterinstall realinstall realdepend realall \ 988 beforeinstall afterinstall realinstall realdepend realall \
989 html subdir-all subdir-install subdir-depend analyze describe \ 989 html subdir-all subdir-install subdir-depend analyze describe \
990 rumpdescribe 990 rumpdescribe
991.PHONY: ${PHONY_NOTMAIN} 991.PHONY: ${PHONY_NOTMAIN}
992.NOTMAIN: ${PHONY_NOTMAIN} 992.NOTMAIN: ${PHONY_NOTMAIN}
993 993
994.if ${NEED_OWN_INSTALL_TARGET} != "no" 994.if ${NEED_OWN_INSTALL_TARGET} != "no"
995.if !target(install) 995.if !target(install)
996install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 996install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
997beforeinstall: 997beforeinstall:
998subdir-install: 998subdir-install:
999realinstall: 999realinstall:
1000afterinstall: 1000afterinstall:
1001.endif 1001.endif
1002all: realall subdir-all 1002all: realall subdir-all
1003subdir-all: 1003subdir-all:
1004realall: 1004realall:
1005depend: realdepend subdir-depend 1005depend: realdepend subdir-depend
1006subdir-depend: 1006subdir-depend:
1007realdepend: 1007realdepend:
1008distclean: cleandir 1008distclean: cleandir
1009cleandir: clean 1009cleandir: clean
1010 1010
1011dependall: .NOTMAIN realdepend .MAKE 1011dependall: .NOTMAIN realdepend .MAKE
1012 @cd "${.CURDIR}"; ${MAKE} realall 1012 @cd "${.CURDIR}"; ${MAKE} realall
1013.endif 1013.endif
1014 1014
1015# 1015#
1016# Define MKxxx variables (which are either yes or no) for users 1016# Define MKxxx variables (which are either yes or no) for users
1017# to set in /etc/mk.conf and override in the make environment. 1017# to set in /etc/mk.conf and override in the make environment.
1018# These should be tested with `== "no"' or `!= "no"'. 1018# These should be tested with `== "no"' or `!= "no"'.
1019# The NOxxx variables should only be set by Makefiles. 1019# The NOxxx variables should only be set by Makefiles.
1020# 1020#
1021# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync 1021# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
1022# with changes to the MK* variables here. 1022# with changes to the MK* variables here.
1023# 1023#
1024 1024
1025# 1025#
1026# Supported NO* options (if defined, MK* will be forced to "no", 1026# Supported NO* options (if defined, MK* will be forced to "no",
1027# regardless of user's mk.conf setting). 1027# regardless of user's mk.conf setting).
1028# 1028#
1029# Source makefiles should set NO*, and not MK*, and must do so before 1029# Source makefiles should set NO*, and not MK*, and must do so before
1030# including bsd.own.mk. 1030# including bsd.own.mk.
1031# Please keep alphabetically sorted with one entry per line. 1031# Please keep alphabetically sorted with one entry per line.
1032# 1032#
1033_NOVARS= \ 1033_NOVARS= \
1034 NOCOMPAT \ 1034 NOCOMPAT \
1035 NODEBUGLIB \ 1035 NODEBUGLIB \
1036 NODOC \ 1036 NODOC \
1037 NOHTML \ 1037 NOHTML \
1038 NOINFO \ 1038 NOINFO \
1039 NOLIBCSANITIZER \ 1039 NOLIBCSANITIZER \
1040 NOLINKLIB \ 1040 NOLINKLIB \
1041 NOLINT \ 1041 NOLINT \
1042 NOMAN \ 1042 NOMAN \
1043 NONLS \ 1043 NONLS \
1044 NOOBJ \ 1044 NOOBJ \
1045 NOPIC \ 1045 NOPIC \
1046 NOPICINSTALL \ 1046 NOPICINSTALL \
1047 NOPROFILE \ 1047 NOPROFILE \
1048 NORELRO \ 1048 NORELRO \
1049 NOSANITIZER \ 1049 NOSANITIZER \
1050 NOSHARE \ 1050 NOSHARE \
1051 NOSTATICLIB 1051 NOSTATICLIB
1052 1052
1053.for var in ${_NOVARS} 1053.for var in ${_NOVARS}
1054.if defined(${var}) 1054.if defined(${var})
1055MK${var:S/^NO//}:= no 1055MK${var:S/^NO//}:= no
1056.endif 1056.endif
1057.endfor 1057.endfor
1058 1058
1059# 1059#
1060# MK* options which have variable defaults. 1060# MK* options which have variable defaults.
1061# 1061#
1062 1062
1063# 1063#
1064# aarch64eb is not yet supported for MKCOMPAT. 1064# aarch64eb is not yet supported for MKCOMPAT.
1065# 1065#
1066.if ${MACHINE_ARCH} == "x86_64" || \ 1066.if ${MACHINE_ARCH} == "x86_64" || \
1067 ${MACHINE_ARCH} == "sparc64" || \ 1067 ${MACHINE_ARCH} == "sparc64" || \
1068 ${MACHINE_MIPS64} || \ 1068 ${MACHINE_MIPS64} || \
1069 ${MACHINE_ARCH} == "powerpc64" || \ 1069 ${MACHINE_ARCH} == "powerpc64" || \
1070 (${MACHINE_ARCH} == "aarch64" && ${HAVE_GCC:U0} == 0) || \ 1070 (${MACHINE_ARCH} == "aarch64" && ${HAVE_GCC:U0} == 0) || \
1071 ${MACHINE_ARCH} == "riscv64" || \ 1071 ${MACHINE_ARCH} == "riscv64" || \
1072 ${MACHINE_ARCH:Mearm*} 1072 ${MACHINE_ARCH:Mearm*}
1073MKCOMPAT?= yes 1073MKCOMPAT?= yes
1074.else 1074.else
1075# Don't let this build where it really isn't supported. 1075# Don't let this build where it really isn't supported.
1076MKCOMPAT:= no 1076MKCOMPAT:= no
1077.endif 1077.endif
1078 1078
1079.if ${MKCOMPAT} == "no" 1079.if ${MKCOMPAT} == "no"
1080MKCOMPATTESTS:= no 1080MKCOMPATTESTS:= no
1081MKCOMPATX11:= no 1081MKCOMPATX11:= no
1082.endif 1082.endif
1083 1083
1084.if ${MACHINE_MIPS64} \ 1084.if ${MACHINE_MIPS64} \
1085 || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc") 1085 || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc")
1086MKCOMPATMODULES?= yes 1086MKCOMPATMODULES?= yes
1087.else 1087.else
1088MKCOMPATMODULES:= no 1088MKCOMPATMODULES:= no
1089.endif 1089.endif
1090 1090
1091# 1091#
1092# These platforms use softfloat by default. 1092# These platforms use softfloat by default.
1093# 1093#
1094.if ${MACHINE_MIPS64} 1094.if ${MACHINE_MIPS64}
1095MKSOFTFLOAT?= yes 1095MKSOFTFLOAT?= yes
1096.endif 1096.endif
1097 1097
1098# 1098#
1099# These platforms always use softfloat. 1099# These platforms always use softfloat.
1100# 1100#
1101.if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \ 1101.if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
1102 ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \ 1102 ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \
1103 ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3" 1103 ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3"
1104MKSOFTFLOAT= yes 1104MKSOFTFLOAT= yes
1105.endif 1105.endif
1106 1106
1107.if ${MACHINE} == "emips" 1107.if ${MACHINE} == "emips"
1108SOFTFLOAT_BITS= 32 1108SOFTFLOAT_BITS= 32
1109.endif 1109.endif
1110 1110
1111# 1111#
1112# We want to build zfs only for amd64, aarch64 and sparc64 by default for now. 1112# We want to build zfs only for amd64, aarch64 and sparc64 by default for now.
1113# 1113#
1114.if ${MACHINE} == "amd64" || \ 1114.if ${MACHINE} == "amd64" || \
1115 ${MACHINE} == "sparc64" || \ 1115 ${MACHINE} == "sparc64" || \
1116 ${MACHINE_ARCH:Maarch64*} 1116 ${MACHINE_ARCH:Maarch64*}
1117MKZFS?= yes 1117MKZFS?= yes
1118.endif 1118.endif
1119 1119
1120# 1120#
1121# DTrace works on amd64, i386, aarch64, and earm* 1121# DTrace works on amd64, i386, aarch64, and earm*
1122# 1122#
1123.if ${MACHINE_ARCH} == "i386" || \ 1123.if ${MACHINE_ARCH} == "i386" || \
1124 ${MACHINE_ARCH} == "x86_64" || \ 1124 ${MACHINE_ARCH} == "x86_64" || \
1125 ${MACHINE_ARCH} == "aarch64" || \ 1125 ${MACHINE_ARCH} == "aarch64" || \
1126 ${MACHINE_ARCH:Mearm*} 1126 ${MACHINE_ARCH:Mearm*}
1127MKDTRACE?= yes 1127MKDTRACE?= yes
1128MKCTF?= yes 1128MKCTF?= yes
1129.endif 1129.endif
1130 1130
1131# 1131#
1132# PIE is enabled on many platforms by default. 1132# PIE is enabled on many platforms by default.
1133# 1133#
1134# Coverity does not like PIE 1134# Coverity does not like PIE
1135.if !defined(COVERITY_TOP_CONFIG) && \ 1135.if !defined(COVERITY_TOP_CONFIG) && \
1136 (${MACHINE_ARCH} == "i386" || \ 1136 (${MACHINE_ARCH} == "i386" || \
1137 ${MACHINE_ARCH} == "x86_64" || \ 1137 ${MACHINE_ARCH} == "x86_64" || \
1138 ${MACHINE_ARCH:Maarch64*} || \ 1138 ${MACHINE_ARCH:Maarch64*} || \
1139 ${MACHINE_CPU} == "arm" || \ 1139 ${MACHINE_CPU} == "arm" || \
1140 ${MACHINE_CPU} == "m68k" || \ 1140 ${MACHINE_CPU} == "m68k" || \
1141 ${MACHINE_CPU} == "mips" || \ 1141 ${MACHINE_CPU} == "mips" || \
1142 ${MACHINE_CPU} == "sh3" || \ 1142 ${MACHINE_CPU} == "sh3" || \
1143 ${MACHINE} == "sparc64") 1143 ${MACHINE} == "sparc64")
1144MKPIE?= yes 1144MKPIE?= yes
1145.else 1145.else
1146MKPIE?= no 1146MKPIE?= no
1147.endif 1147.endif
1148 1148
1149# 1149#
1150# RELRO is enabled on i386, amd64, and aarch64 by default 1150# RELRO is enabled on i386, amd64, and aarch64 by default
1151# 1151#
1152# sync with NORELRO in compat/*/*/bsd.*.mk for the relro-enabled 64-bit 1152# sync with NORELRO in compat/*/*/bsd.*.mk for the relro-enabled 64-bit
1153# platforms with relro-disabled 32-bit compat 1153# platforms with relro-disabled 32-bit compat
1154# 1154#
1155.if ${MACHINE} == "i386" || \ 1155.if ${MACHINE} == "i386" || \
1156 ${MACHINE} == "amd64" || \ 1156 ${MACHINE} == "amd64" || \
1157 ${MACHINE_ARCH:Maarch64*} 1157 ${MACHINE_ARCH:Maarch64*}
1158MKRELRO?= partial 1158MKRELRO?= partial
1159.else 1159.else
1160MKRELRO?= no 1160MKRELRO?= no
1161.endif 1161.endif
1162 1162
1163.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" 1163.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
1164MKSTATICPIE?= yes 1164MKSTATICPIE?= yes
1165.else 1165.else
1166MKSTATICPIE?= no 1166MKSTATICPIE?= no
1167.endif 1167.endif
1168 1168
1169# 1169#
1170# MK* options which default to "yes". 1170# MK* options which default to "yes".
1171# Please keep alphabetically sorted with one entry per line. 1171# Please keep alphabetically sorted with one entry per line.
1172# 1172#
1173_MKVARS.yes= \ 1173_MKVARS.yes= \
1174 MKARGON2 \ 1174 MKARGON2 \
1175 MKATF \ 1175 MKATF \
1176 MKBINUTILS \ 1176 MKBINUTILS \
1177 MKBSDTAR \ 1177 MKBSDTAR \
1178 MKCLEANSRC \ 1178 MKCLEANSRC \
1179 MKCLEANVERIFY \ 1179 MKCLEANVERIFY \
1180 MKCOMPLEX \ 1180 MKCOMPLEX \
1181 MKCVS \ 1181 MKCVS \
1182 MKCXX \ 1182 MKCXX \
1183 MKDOC \ 1183 MKDOC \
1184 MKDTC \ 1184 MKDTC \
1185 MKDYNAMICROOT \ 1185 MKDYNAMICROOT \
1186 MKGCC \ 1186 MKGCC \
1187 MKGDB \ 1187 MKGDB \
1188 MKGROFF \ 1188 MKGROFF \
1189 MKHESIOD \ 1189 MKHESIOD \
1190 MKHTML \ 1190 MKHTML \
1191 MKIEEEFP \ 1191 MKIEEEFP \
1192 MKINET6 \ 1192 MKINET6 \
1193 MKINFO \ 1193 MKINFO \
1194 MKIPFILTER \ 1194 MKIPFILTER \
1195 MKISCSI \ 1195 MKISCSI \
1196 MKKERBEROS \ 1196 MKKERBEROS \
1197 MKKMOD \ 1197 MKKMOD \
1198 MKLDAP \ 1198 MKLDAP \
1199 MKLIBSTDCXX \ 1199 MKLIBSTDCXX \
1200 MKLINKLIB \ 1200 MKLINKLIB \
1201 MKLVM \ 1201 MKLVM \
1202 MKMAKEMANDB \ 1202 MKMAKEMANDB \
1203 MKMAN \ 1203 MKMAN \
1204 MKMANDOC \ 1204 MKMANDOC \
1205 MKMDNS \ 1205 MKMDNS \
1206 MKNLS \ 1206 MKNLS \
1207 MKNPF \ 1207 MKNPF \
1208 MKOBJ \ 1208 MKOBJ \
1209 MKPAM \ 1209 MKPAM \
1210 MKPF \ 1210 MKPF \
1211 MKPIC \ 1211 MKPIC \
1212 MKPICLIB \ 1212 MKPICLIB \
1213 MKPOSTFIX \ 1213 MKPOSTFIX \
1214 MKPROFILE \ 1214 MKPROFILE \
1215 MKRUMP \ 1215 MKRUMP \
1216 MKSHARE \ 1216 MKSHARE \
1217 MKSKEY \ 1217 MKSKEY \
1218 MKSTATICLIB \ 1218 MKSTATICLIB \
1219 MKSTRIPSYM \ 1219 MKSTRIPSYM \
1220 MKUNBOUND \ 1220 MKUNBOUND \
1221 MKX11FONTS \ 1221 MKX11FONTS \
1222 MKYP 1222 MKYP
1223 1223
1224.for var in ${_MKVARS.yes} 1224.for var in ${_MKVARS.yes}
1225${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uyes}} 1225${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uyes}}
1226.endfor 1226.endfor
1227 1227
1228# 1228#
1229# MKGCCCMDS is only valid if we are building GCC so make it dependent on that. 1229# MKGCCCMDS is only valid if we are building GCC so make it dependent on that.
1230# 1230#
1231_MKVARS.yes += MKGCCCMDS 1231_MKVARS.yes += MKGCCCMDS
1232MKGCCCMDS?= ${MKGCC} 1232MKGCCCMDS?= ${MKGCC}
1233 1233
1234# 1234#
1235# Sanitizers, only "address" and "undefined" are supported by gcc 1235# Sanitizers, only "address" and "undefined" are supported by gcc
1236# 1236#
1237MKSANITIZER?= no 1237MKSANITIZER?= no
1238USE_SANITIZER?= address 1238USE_SANITIZER?= address
1239 1239
1240# 1240#
1241# Sanitizers implemented in libc, only "undefined" is supported 1241# Sanitizers implemented in libc, only "undefined" is supported
1242# 1242#
1243MKLIBCSANITIZER?= no 1243MKLIBCSANITIZER?= no
1244USE_LIBCSANITIZER?= undefined 1244USE_LIBCSANITIZER?= undefined
1245 1245
1246# 1246#
1247# Exceptions to the above: 1247# Exceptions to the above:
1248# 1248#
1249 1249
1250# RUMP uses -nostdinc which coverity does not like 1250# RUMP uses -nostdinc which coverity does not like
1251# It also does not use many new files, so disable it 1251# It also does not use many new files, so disable it
1252.if defined(COVERITY_TOP_CONFIG) 1252.if defined(COVERITY_TOP_CONFIG)
1253MKRUMP= no 1253MKRUMP= no
1254.endif 1254.endif
1255 1255
1256# 1256#
1257# Build a dynamically linked /bin and /sbin, with the necessary shared 1257# Build a dynamically linked /bin and /sbin, with the necessary shared
1258# libraries moved from /usr/lib to /lib and the shared linker moved 1258# libraries moved from /usr/lib to /lib and the shared linker moved
1259# from /usr/libexec to /lib 1259# from /usr/libexec to /lib
1260# 1260#
1261# Note that if the BINDIR is not /bin or /sbin, then we always use the 1261# Note that if the BINDIR is not /bin or /sbin, then we always use the
1262# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin 1262# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
1263# and /sbin). See <bsd.shlib.mk>. 1263# and /sbin). See <bsd.shlib.mk>.
1264# 1264#
1265# For ia64, ld.elf_so not yet implemented 1265# For ia64, ld.elf_so not yet implemented
1266.if ${MACHINE_ARCH} == "ia64" 1266.if ${MACHINE_ARCH} == "ia64"
1267MKDYNAMICROOT= no 1267MKDYNAMICROOT= no
1268.endif 1268.endif
1269 1269
1270.if defined(MKREPRO) 1270.if defined(MKREPRO)
1271MKARZERO ?= ${MKREPRO} 1271MKARZERO ?= ${MKREPRO}
1272GROFF_FLAGS ?= -dpaper=letter 1272GROFF_FLAGS ?= -dpaper=letter
1273ROFF_PAGESIZE ?= -P-pletter 1273ROFF_PAGESIZE ?= -P-pletter
1274.endif 1274.endif
1275 1275
1276# 1276#
1277# Install the kernel as /netbsd/kernel and the modules in /netbsd/modules 1277# Install the kernel as /netbsd/kernel and the modules in /netbsd/modules
1278# 1278#
1279KERNEL_DIR?= no 1279KERNEL_DIR?= no
1280 1280
1281# Only install the general firmware on some systems 1281# Only install the general firmware on some systems
1282MKFIRMWARE.amd64= yes 1282MKFIRMWARE.amd64= yes
1283MKFIRMWARE.cobalt= yes 1283MKFIRMWARE.cobalt= yes
1284MKFIRMWARE.evbarm= yes 1284MKFIRMWARE.evbarm= yes
1285MKFIRMWARE.evbmips= yes 1285MKFIRMWARE.evbmips= yes
1286MKFIRMWARE.evbppc= yes 1286MKFIRMWARE.evbppc= yes
1287MKFIRMWARE.hpcarm= yes 1287MKFIRMWARE.hpcarm= yes
1288MKFIRMWARE.hppa= yes 1288MKFIRMWARE.hppa= yes
1289MKFIRMWARE.i386= yes 1289MKFIRMWARE.i386= yes
1290MKFIRMWARE.mac68k= yes 1290MKFIRMWARE.mac68k= yes
1291MKFIRMWARE.macppc= yes 1291MKFIRMWARE.macppc= yes
1292MKFIRMWARE.riscv= yes 1292MKFIRMWARE.riscv= yes
1293MKFIRMWARE.sandpoint= yes 1293MKFIRMWARE.sandpoint= yes
1294MKFIRMWARE.sparc64= yes 1294MKFIRMWARE.sparc64= yes
1295 1295
1296# Only install the GPU firmware on DRM-happy systems. 1296# Only install the GPU firmware on DRM-happy systems.
1297MKNOUVEAUFIRMWARE.x86_64= yes 1297MKNOUVEAUFIRMWARE.x86_64= yes
1298MKNOUVEAUFIRMWARE.i386= yes 1298MKNOUVEAUFIRMWARE.i386= yes
1299MKNOUVEAUFIRMWARE.aarch64= yes 1299MKNOUVEAUFIRMWARE.aarch64= yes
1300MKRADEONFIRMWARE.x86_64= yes 1300MKRADEONFIRMWARE.x86_64= yes
1301MKRADEONFIRMWARE.i386= yes 1301MKRADEONFIRMWARE.i386= yes
1302MKRADEONFIRMWARE.aarch64= yes 1302MKRADEONFIRMWARE.aarch64= yes
1303MKAMDGPUFIRMWARE.x86_64= yes 1303MKAMDGPUFIRMWARE.x86_64= yes
1304MKAMDGPUFIRMWARE.i386= yes 1304MKAMDGPUFIRMWARE.i386= yes
1305 1305
1306# Only install the tegra firmware on evbarm. 1306# Only install the tegra firmware on evbarm.
1307MKTEGRAFIRMWARE.evbarm= yes 1307MKTEGRAFIRMWARE.evbarm= yes
1308 1308
1309# Only build devicetree (dtb) files on armv6, armv7, and aarch64. 1309# Only build devicetree (dtb) files on armv6, armv7, and aarch64.
1310MKDTB.aarch64= yes 1310MKDTB.aarch64= yes
1311MKDTB.aarch64eb= yes 1311MKDTB.aarch64eb= yes
1312MKDTB.earmv6= yes 1312MKDTB.earmv6= yes
1313MKDTB.earmv6hf= yes 1313MKDTB.earmv6hf= yes
1314MKDTB.earmv6eb= yes 1314MKDTB.earmv6eb= yes
1315MKDTB.earmv6hfeb= yes 1315MKDTB.earmv6hfeb= yes
1316MKDTB.earmv7= yes 1316MKDTB.earmv7= yes
1317MKDTB.earmv7hf= yes 1317MKDTB.earmv7hf= yes
1318MKDTB.earmv7eb= yes 1318MKDTB.earmv7eb= yes
1319MKDTB.earmv7hfeb= yes 1319MKDTB.earmv7hfeb= yes
1320MKDTB.riscv32= yes 1320MKDTB.riscv32= yes
1321MKDTB.riscv64= yes 1321MKDTB.riscv64= yes
1322 1322
 1323# alpha build fails due to missing X include files,
 1324# vax build triggers a gcc bug and dies with an internal compiler error.
 1325# XXX switch both to old Mesa for now.
 1326.if ${MACHINE} == "alpha" || ${MACHINE} == "vax"
 1327HAVE_MESA_VER=19
 1328.endif
 1329
1323HAVE_MESA_VER?= 21 1330HAVE_MESA_VER?= 21
1324.if ${HAVE_MESA_VER} == 19 1331.if ${HAVE_MESA_VER} == 19
1325EXTERNAL_MESALIB_DIR?= MesaLib.old 1332EXTERNAL_MESALIB_DIR?= MesaLib.old
1326.elif ${HAVE_MESA_VER} == 21 1333.elif ${HAVE_MESA_VER} == 21
1327EXTERNAL_MESALIB_DIR?= MesaLib 1334EXTERNAL_MESALIB_DIR?= MesaLib
1328.endif 1335.endif
1329 1336
1330# Default to LLVM run-time if x86 or aarch64 and X11 and Mesa 18 or newer 1337# Default to LLVM run-time if x86 or aarch64 and X11 and Mesa 18 or newer
1331# XXX This knows that MKX11=no is default below, but would 1338# XXX This knows that MKX11=no is default below, but would
1332# require splitting the below loop in two parts. 1339# require splitting the below loop in two parts.
1333.if ${MKX11:Uno} != "no" && ${HAVE_MESA_VER} >= 19 1340.if ${MKX11:Uno} != "no" && ${HAVE_MESA_VER} >= 19
1334MKLLVMRT.amd64= yes 1341MKLLVMRT.amd64= yes
1335MKLLVMRT.i386= yes 1342MKLLVMRT.i386= yes
1336MKLLVMRT.aarch64= yes 1343MKLLVMRT.aarch64= yes
1337.endif 1344.endif
1338 1345
1339# Just-in-time compiler for bpf, npf acceleration 1346# Just-in-time compiler for bpf, npf acceleration
1340MKSLJIT.aarch64= yes 1347MKSLJIT.aarch64= yes
1341MKSLJIT.i386= yes 1348MKSLJIT.i386= yes
1342MKSLJIT.sparc= yes 1349MKSLJIT.sparc= yes
1343#MKSLJIT.sparc64= yes # not suppored in sljit (yet?) 1350#MKSLJIT.sparc64= yes # not suppored in sljit (yet?)
1344MKSLJIT.x86_64= yes 1351MKSLJIT.x86_64= yes
1345#MKSLJIT.powerpc= yes # XXX 1352#MKSLJIT.powerpc= yes # XXX
1346#MKSLJIT.powerpc64= yes # XXX 1353#MKSLJIT.powerpc64= yes # XXX
1347#MKSLJIT.mipsel= yes # XXX 1354#MKSLJIT.mipsel= yes # XXX
1348#MKSLJIT.mipseb= yes # XXX 1355#MKSLJIT.mipseb= yes # XXX
1349#MKSLJIT.mips64el= yes # XXX 1356#MKSLJIT.mips64el= yes # XXX
1350#MKSLJIT.mips64eb= yes # XXX 1357#MKSLJIT.mips64eb= yes # XXX
1351#MKSLJIT.riscv32= yes # not until we update sljit 1358#MKSLJIT.riscv32= yes # not until we update sljit
1352#MKSLJIT.riscv64= yes # not until we update sljit 1359#MKSLJIT.riscv64= yes # not until we update sljit
1353 1360
1354# compat with old names 1361# compat with old names
1355MKDEBUGKERNEL?=${MKKDEBUG:Uno} 1362MKDEBUGKERNEL?=${MKKDEBUG:Uno}
1356MKDEBUGTOOLS?=${MKTOOLSDEBUG:Uno} 1363MKDEBUGTOOLS?=${MKTOOLSDEBUG:Uno}
1357 1364
1358# 1365#
1359# MK* options which default to "no". 1366# MK* options which default to "no".
1360# Note that MKZFS has a different default for some platforms, see above. 1367# Note that MKZFS has a different default for some platforms, see above.
1361# Please keep alphabetically sorted with one entry per line. 1368# Please keep alphabetically sorted with one entry per line.
1362# 1369#
1363_MKVARS.no= \ 1370_MKVARS.no= \
1364 MKAMDGPUFIRMWARE \ 1371 MKAMDGPUFIRMWARE \
1365 MKARZERO \ 1372 MKARZERO \
1366 MKBSDGREP \ 1373 MKBSDGREP \
1367 MKCATPAGES \ 1374 MKCATPAGES \
1368 MKCOMPATTESTS \ 1375 MKCOMPATTESTS \
1369 MKCOMPATX11 \ 1376 MKCOMPATX11 \
1370 MKCTF \ 1377 MKCTF \
1371 MKDEBUG \ 1378 MKDEBUG \
1372 MKDEBUGLIB \ 1379 MKDEBUGLIB \
1373 MKDEPINCLUDES \ 1380 MKDEPINCLUDES \
1374 MKDTB \ 1381 MKDTB \
1375 MKDTRACE \ 1382 MKDTRACE \
1376 MKFIRMWARE \ 1383 MKFIRMWARE \
1377 MKGROFFHTMLDOC \ 1384 MKGROFFHTMLDOC \
1378 MKHOSTOBJ \ 1385 MKHOSTOBJ \
1379 MKKYUA \ 1386 MKKYUA \
1380 MKLIBCXX \ 1387 MKLIBCXX \
1381 MKLINT \ 1388 MKLINT \
1382 MKLLVM \ 1389 MKLLVM \
1383 MKLLVMRT \ 1390 MKLLVMRT \
1384 MKMANZ \ 1391 MKMANZ \
1385 MKNOUVEAUFIRMWARE \ 1392 MKNOUVEAUFIRMWARE \
1386 MKNSD \ 1393 MKNSD \
1387 MKOBJDIRS \ 1394 MKOBJDIRS \
1388 MKPCC \ 1395 MKPCC \
1389 MKPICINSTALL \ 1396 MKPICINSTALL \
1390 MKPIGZGZIP \ 1397 MKPIGZGZIP \
1391 MKRADEONFIRMWARE \ 1398 MKRADEONFIRMWARE \
1392 MKREPRO \ 1399 MKREPRO \
1393 MKSLJIT \ 1400 MKSLJIT \
1394 MKSOFTFLOAT \ 1401 MKSOFTFLOAT \
1395 MKSTRIPIDENT \ 1402 MKSTRIPIDENT \
1396 MKTEGRAFIRMWARE \ 1403 MKTEGRAFIRMWARE \
1397 MKTPM \ 1404 MKTPM \
1398 MKUNPRIVED \ 1405 MKUNPRIVED \
1399 MKUPDATE \ 1406 MKUPDATE \
1400 MKX11 \ 1407 MKX11 \
1401 MKX11MOTIF \ 1408 MKX11MOTIF \
1402 MKXORG_SERVER \ 1409 MKXORG_SERVER \
1403 MKZFS 1410 MKZFS
1404 1411
1405.for var in ${_MKVARS.no} 1412.for var in ${_MKVARS.no}
1406${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}} 1413${var}?= ${${var}.${MACHINE_ARCH}:U${${var}.${MACHINE}:Uno}}
1407.endfor 1414.endfor
1408 1415
1409# 1416#
1410# Which platforms build the xorg-server drivers (as opposed 1417# Which platforms build the xorg-server drivers (as opposed
1411# to just Xnest and Xvfb.) 1418# to just Xnest and Xvfb.)
1412# 1419#
1413.if ${MACHINE} == "alpha" || \ 1420.if ${MACHINE} == "alpha" || \
1414 ${MACHINE} == "amd64" || \ 1421 ${MACHINE} == "amd64" || \
1415 ${MACHINE} == "amiga" || \ 1422 ${MACHINE} == "amiga" || \
1416 ${MACHINE} == "bebox" || \ 1423 ${MACHINE} == "bebox" || \
1417 ${MACHINE} == "cats" || \ 1424 ${MACHINE} == "cats" || \
1418 ${MACHINE} == "dreamcast" || \ 1425 ${MACHINE} == "dreamcast" || \
1419 ${MACHINE} == "ews4800mips" || \ 1426 ${MACHINE} == "ews4800mips" || \
1420 ${MACHINE} == "evbarm" || \ 1427 ${MACHINE} == "evbarm" || \
1421 ${MACHINE} == "evbmips" || \ 1428 ${MACHINE} == "evbmips" || \
1422 ${MACHINE} == "evbppc" || \ 1429 ${MACHINE} == "evbppc" || \
1423 ${MACHINE} == "hp300" || \ 1430 ${MACHINE} == "hp300" || \
1424 ${MACHINE} == "hpcarm" || \ 1431 ${MACHINE} == "hpcarm" || \
1425 ${MACHINE} == "hpcmips" || \ 1432 ${MACHINE} == "hpcmips" || \
1426 ${MACHINE} == "hpcsh" || \ 1433 ${MACHINE} == "hpcsh" || \
1427 ${MACHINE} == "hppa" || \ 1434 ${MACHINE} == "hppa" || \
1428 ${MACHINE} == "i386" || \ 1435 ${MACHINE} == "i386" || \
1429 ${MACHINE} == "ibmnws" || \ 1436 ${MACHINE} == "ibmnws" || \
1430 ${MACHINE} == "iyonix" || \ 1437 ${MACHINE} == "iyonix" || \
1431 ${MACHINE} == "luna68k" || \ 1438 ${MACHINE} == "luna68k" || \
1432 ${MACHINE} == "mac68k" || \ 1439 ${MACHINE} == "mac68k" || \
1433 ${MACHINE} == "macppc" || \ 1440 ${MACHINE} == "macppc" || \
1434 ${MACHINE} == "netwinder" || \ 1441 ${MACHINE} == "netwinder" || \
1435 ${MACHINE} == "newsmips" || \ 1442 ${MACHINE} == "newsmips" || \
1436 ${MACHINE} == "pmax" || \ 1443 ${MACHINE} == "pmax" || \
1437 ${MACHINE} == "prep" || \ 1444 ${MACHINE} == "prep" || \
1438 ${MACHINE} == "ofppc" || \ 1445 ${MACHINE} == "ofppc" || \
1439 ${MACHINE} == "sgimips" || \ 1446 ${MACHINE} == "sgimips" || \
1440 ${MACHINE} == "shark" || \ 1447 ${MACHINE} == "shark" || \
1441 ${MACHINE} == "sparc" || \ 1448 ${MACHINE} == "sparc" || \
1442 ${MACHINE} == "sparc64" || \ 1449 ${MACHINE} == "sparc64" || \
1443 ${MACHINE} == "vax" || \ 1450 ${MACHINE} == "vax" || \
1444 ${MACHINE} == "zaurus" 1451 ${MACHINE} == "zaurus"
1445MKXORG_SERVER=yes 1452MKXORG_SERVER=yes
1446.endif 1453.endif
1447 1454
1448# 1455#
1449# Force some options off if their dependencies are off. 1456# Force some options off if their dependencies are off.
1450# 1457#
1451 1458
1452.if ${MKCXX} == "no" 1459.if ${MKCXX} == "no"
1453MKATF:= no 1460MKATF:= no
1454MKGCCCMDS:= no 1461MKGCCCMDS:= no
1455MKGDB:= no 1462MKGDB:= no
1456MKGROFF:= no 1463MKGROFF:= no
1457MKKYUA:= no 1464MKKYUA:= no
1458.endif 1465.endif
1459 1466
1460.if ${MKMAN} == "no" 1467.if ${MKMAN} == "no"
1461MKCATPAGES:= no 1468MKCATPAGES:= no
1462MKHTML:= no 1469MKHTML:= no
1463.endif 1470.endif
1464 1471
1465_MANINSTALL= maninstall 1472_MANINSTALL= maninstall
1466.if ${MKCATPAGES} != "no" 1473.if ${MKCATPAGES} != "no"
1467_MANINSTALL+= catinstall 1474_MANINSTALL+= catinstall
1468.endif 1475.endif
1469.if ${MKHTML} != "no" 1476.if ${MKHTML} != "no"
1470_MANINSTALL+= htmlinstall 1477_MANINSTALL+= htmlinstall
1471.endif 1478.endif
1472 1479
1473.if ${MKLINKLIB} == "no" 1480.if ${MKLINKLIB} == "no"
1474MKLINT:= no 1481MKLINT:= no
1475MKPICINSTALL:= no 1482MKPICINSTALL:= no
1476MKPROFILE:= no 1483MKPROFILE:= no
1477.endif 1484.endif
1478 1485
1479.if ${MKPIC} == "no" 1486.if ${MKPIC} == "no"
1480MKPICLIB:= no 1487MKPICLIB:= no
1481.endif 1488.endif
1482 1489
1483.if ${MKOBJ} == "no" 1490.if ${MKOBJ} == "no"
1484MKOBJDIRS:= no 1491MKOBJDIRS:= no
1485.endif 1492.endif
1486 1493
1487.if ${MKSHARE} == "no" 1494.if ${MKSHARE} == "no"
1488MKCATPAGES:= no 1495MKCATPAGES:= no
1489MKDOC:= no 1496MKDOC:= no
1490MKINFO:= no 1497MKINFO:= no
1491MKHTML:= no 1498MKHTML:= no
1492MKMAN:= no 1499MKMAN:= no
1493MKNLS:= no 1500MKNLS:= no
1494.endif 1501.endif
1495 1502
1496.if ${MACHINE_ARCH:Mearm*} 1503.if ${MACHINE_ARCH:Mearm*}
1497_NEEDS_LIBCXX.${MACHINE_ARCH}= yes 1504_NEEDS_LIBCXX.${MACHINE_ARCH}= yes
1498.endif 1505.endif
1499_NEEDS_LIBCXX.aarch64= yes 1506_NEEDS_LIBCXX.aarch64= yes
1500_NEEDS_LIBCXX.aarch64eb= yes 1507_NEEDS_LIBCXX.aarch64eb= yes
1501_NEEDS_LIBCXX.i386= yes 1508_NEEDS_LIBCXX.i386= yes
1502_NEEDS_LIBCXX.powerpc= yes 1509_NEEDS_LIBCXX.powerpc= yes
1503_NEEDS_LIBCXX.powerpc64= yes 1510_NEEDS_LIBCXX.powerpc64= yes
1504_NEEDS_LIBCXX.sparc= yes 1511_NEEDS_LIBCXX.sparc= yes
1505_NEEDS_LIBCXX.sparc64= yes 1512_NEEDS_LIBCXX.sparc64= yes
1506_NEEDS_LIBCXX.x86_64= yes 1513_NEEDS_LIBCXX.x86_64= yes
1507 1514
1508.if ${MKLLVM} == "yes" && ${_NEEDS_LIBCXX.${MACHINE_ARCH}:Uno} == "yes" 1515.if ${MKLLVM} == "yes" && ${_NEEDS_LIBCXX.${MACHINE_ARCH}:Uno} == "yes"
1509MKLIBCXX:= yes 1516MKLIBCXX:= yes
1510.endif 1517.endif
1511 1518
1512# 1519#
1513# Disable MKSTRIPSYM if MKDEBUG is enabled. 1520# Disable MKSTRIPSYM if MKDEBUG is enabled.
1514# 1521#
1515.if ${MKDEBUG} != "no" 1522.if ${MKDEBUG} != "no"
1516MKSTRIPSYM:= no 1523MKSTRIPSYM:= no
1517.endif 1524.endif
1518 1525
1519# 1526#
1520# install(1) parameters. 1527# install(1) parameters.
1521# 1528#
1522COPY?= -c 1529COPY?= -c
1523.if ${MKUPDATE} == "no" 1530.if ${MKUPDATE} == "no"
1524PRESERVE?= 1531PRESERVE?=
1525.else 1532.else
1526PRESERVE?= -p 1533PRESERVE?= -p
1527.endif 1534.endif
1528RENAME?= -r 1535RENAME?= -r
1529HRDLINK?= -l h 1536HRDLINK?= -l h
1530SYMLINK?= -l s 1537SYMLINK?= -l s
1531 1538
1532METALOG?= ${DESTDIR}/METALOG 1539METALOG?= ${DESTDIR}/METALOG
1533METALOG.add?= ${TOOL_CAT} -l >> ${METALOG} 1540METALOG.add?= ${TOOL_CAT} -l >> ${METALOG}
1534.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR} 1541.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
1535.if ${MKUNPRIVED} != "no" 1542.if ${MKUNPRIVED} != "no"
1536INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256 1543INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256
1537.else 1544.else
1538INSTPRIV.unpriv= 1545INSTPRIV.unpriv=
1539.endif 1546.endif
1540INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc 1547INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
1541.endif 1548.endif
1542STRIPFLAG?= 1549STRIPFLAG?=
1543 1550
1544INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d 1551INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
1545INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME} 1552INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
1546INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME} 1553INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
1547INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME} 1554INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
1548 1555
1549# for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH 1556# for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH
1550# 1557#
1551OBJECT_FMTS= 1558OBJECT_FMTS=
1552.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64" 1559.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64"
1553OBJECT_FMTS+= elf32 1560OBJECT_FMTS+= elf32
1554.endif 1561.endif
1555.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != "" 1562.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != ""
1556. if !(${MKCOMPAT:Uyes} == "no" && ${MACHINE_CPU} == "mips") 1563. if !(${MKCOMPAT:Uyes} == "no" && ${MACHINE_CPU} == "mips")
1557OBJECT_FMTS+= elf64 1564OBJECT_FMTS+= elf64
1558. endif 1565. endif
1559.endif 1566.endif
1560 1567
1561# 1568#
1562# Set defaults for the USE_xxx variables. 1569# Set defaults for the USE_xxx variables.
1563# 1570#
1564 1571
1565# 1572#
1566# USE_* options which default to "no" and will be forced to "no" if their 1573# USE_* options which default to "no" and will be forced to "no" if their
1567# corresponding MK* variable is set to "no". 1574# corresponding MK* variable is set to "no".
1568# 1575#
1569.for var in USE_SKEY 1576.for var in USE_SKEY
1570.if (${${var:S/USE_/MK/}} == "no") 1577.if (${${var:S/USE_/MK/}} == "no")
1571${var}:= no 1578${var}:= no
1572.else 1579.else
1573${var}?= no 1580${var}?= no
1574.endif 1581.endif
1575.endfor 1582.endfor
1576 1583
1577# 1584#
1578# USE_* options which default to "yes" unless their corresponding MK* 1585# USE_* options which default to "yes" unless their corresponding MK*
1579# variable is set to "no". 1586# variable is set to "no".
1580# 1587#
1581.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP 1588.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1582.if (${${var:S/USE_/MK/}} == "no") 1589.if (${${var:S/USE_/MK/}} == "no")
1583${var}:= no 1590${var}:= no
1584.else 1591.else
1585${var}?= yes 1592${var}?= yes
1586.endif 1593.endif
1587.endfor 1594.endfor
1588 1595
1589# 1596#
1590# USE_* options which default to "yes". 1597# USE_* options which default to "yes".
1591# 1598#
1592.for var in USE_JEMALLOC 1599.for var in USE_JEMALLOC
1593${var}?= yes 1600${var}?= yes
1594.endfor 1601.endfor
1595 1602
1596# 1603#
1597# USE_* options which default to "no". 1604# USE_* options which default to "no".
1598# 1605#
1599# For now, disable pigz as compressor by default 1606# For now, disable pigz as compressor by default
1600.for var in USE_PIGZGZIP 1607.for var in USE_PIGZGZIP
1601${var}?= no 1608${var}?= no
1602.endfor 1609.endfor
1603 1610
1604# Default to USE_XZ_SETS on some 64bit architectures where decompressor 1611# Default to USE_XZ_SETS on some 64bit architectures where decompressor
1605# memory will likely not be in short supply. 1612# memory will likely not be in short supply.
1606# Since pigz can not create .xz format files currently, disable .xz 1613# Since pigz can not create .xz format files currently, disable .xz
1607# format if USE_PIGZGZIP is enabled. 1614# format if USE_PIGZGZIP is enabled.
1608.if ${USE_PIGZGZIP} == "no" && \ 1615.if ${USE_PIGZGZIP} == "no" && \
1609 (${MACHINE} == "amd64" || \ 1616 (${MACHINE} == "amd64" || \
1610 ${MACHINE_ARCH:Maarch64*}) 1617 ${MACHINE_ARCH:Maarch64*})
1611USE_XZ_SETS?= yes 1618USE_XZ_SETS?= yes
1612.else 1619.else
1613USE_XZ_SETS?= no 1620USE_XZ_SETS?= no
1614.endif 1621.endif
1615 1622
1616# 1623#
1617# TOOL_GZIP and friends. These might refer to TOOL_PIGZ or to the host gzip. 1624# TOOL_GZIP and friends. These might refer to TOOL_PIGZ or to the host gzip.
1618# 1625#
1619.if ${USE_PIGZGZIP} != "no" 1626.if ${USE_PIGZGZIP} != "no"
1620TOOL_GZIP= ${TOOL_PIGZ} 1627TOOL_GZIP= ${TOOL_PIGZ}
1621GZIP_N_FLAG?= -nT 1628GZIP_N_FLAG?= -nT
1622.else 1629.else
1623.if ${USETOOLS} == "yes" 1630.if ${USETOOLS} == "yes"
1624TOOL_GZIP= ${TOOLDIR}/bin/${_TOOL_PREFIX}gzip 1631TOOL_GZIP= ${TOOLDIR}/bin/${_TOOL_PREFIX}gzip
1625.else 1632.else
1626TOOL_GZIP= gzip 1633TOOL_GZIP= gzip
1627.endif 1634.endif
1628GZIP_N_FLAG?= -n 1635GZIP_N_FLAG?= -n
1629.endif 1636.endif
1630TOOL_GZIP_N= ${TOOL_GZIP} ${GZIP_N_FLAG} 1637TOOL_GZIP_N= ${TOOL_GZIP} ${GZIP_N_FLAG}
1631 1638
1632# 1639#
1633# Where X11 sources are and where it is installed to. 1640# Where X11 sources are and where it is installed to.
1634# 1641#
1635.if !defined(X11SRCDIR) 1642.if !defined(X11SRCDIR)
1636.if exists(${NETBSDSRCDIR}/../xsrc) 1643.if exists(${NETBSDSRCDIR}/../xsrc)
1637X11SRCDIR!= cd "${NETBSDSRCDIR}/../xsrc" && pwd 1644X11SRCDIR!= cd "${NETBSDSRCDIR}/../xsrc" && pwd
1638.else 1645.else
1639X11SRCDIR= /usr/xsrc 1646X11SRCDIR= /usr/xsrc
1640.endif 1647.endif
1641.endif # !defined(X11SRCDIR) 1648.endif # !defined(X11SRCDIR)
1642 1649
1643X11SRCDIR.local?= ${X11SRCDIR}/local 1650X11SRCDIR.local?= ${X11SRCDIR}/local
1644X11ROOTDIR?= /usr/X11R7 1651X11ROOTDIR?= /usr/X11R7
1645X11BINDIR?= ${X11ROOTDIR}/bin 1652X11BINDIR?= ${X11ROOTDIR}/bin
1646X11ETCDIR?= /etc/X11 1653X11ETCDIR?= /etc/X11
1647X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts 1654X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts
1648X11INCDIR?= ${X11ROOTDIR}/include 1655X11INCDIR?= ${X11ROOTDIR}/include
1649X11LIBDIR?= ${X11ROOTDIR}/lib/X11 1656X11LIBDIR?= ${X11ROOTDIR}/lib/X11
1650X11MANDIR?= ${X11ROOTDIR}/man 1657X11MANDIR?= ${X11ROOTDIR}/man
1651X11SHAREDIR?= ${X11ROOTDIR}/share 1658X11SHAREDIR?= ${X11ROOTDIR}/share
1652X11USRLIBDIR?= ${X11ROOTDIR}/lib${MLIBDIR:D/${MLIBDIR}} 1659X11USRLIBDIR?= ${X11ROOTDIR}/lib${MLIBDIR:D/${MLIBDIR}}
1653 1660
1654# 1661#
1655# New modular-xorg based builds 1662# New modular-xorg based builds
1656# 1663#
1657X11SRCDIRMIT?= ${X11SRCDIR}/external/mit 1664X11SRCDIRMIT?= ${X11SRCDIR}/external/mit
1658.for _lib in \ 1665.for _lib in \
1659 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \ 1666 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
1660 Xdmcp Xevie Xext Xfixes Xfont Xfont2 Xft Xi Xinerama Xmu Xpresent Xpm \ 1667 Xdmcp Xevie Xext Xfixes Xfont Xfont2 Xft Xi Xinerama Xmu Xpresent Xpm \
1661 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \ 1668 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
1662 epoxy fontenc vdpau xkbfile xkbui Xaw pciaccess xcb xshmfence \ 1669 epoxy fontenc vdpau xkbfile xkbui Xaw pciaccess xcb xshmfence \
1663 pthread-stubs xcvt 1670 pthread-stubs xcvt
1664X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist 1671X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist
1665.endfor 1672.endfor
1666 1673
1667.for _proto in \ 1674.for _proto in \
1668 xcb- xorg 1675 xcb- xorg
1669X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist 1676X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist
1670.endfor 1677.endfor
1671 1678
1672# During transition from xorg-server 1.10 to 1.20 1679# During transition from xorg-server 1.10 to 1.20
1673.if \ 1680.if \
1674 ${MACHINE} == "alpha" || \ 1681 ${MACHINE} == "alpha" || \
1675 ${MACHINE} == "netwinder" || \ 1682 ${MACHINE} == "netwinder" || \
1676 ${MACHINE} == "sgimips" 1683 ${MACHINE} == "sgimips"
1677HAVE_XORG_SERVER_VER?=110 1684HAVE_XORG_SERVER_VER?=110
1678.else 1685.else
1679HAVE_XORG_SERVER_VER?=120 1686HAVE_XORG_SERVER_VER?=120
1680.endif 1687.endif
1681 1688
1682.if ${HAVE_XORG_SERVER_VER} == "120" 1689.if ${HAVE_XORG_SERVER_VER} == "120"
1683XORG_SERVER_SUBDIR?=xorg-server 1690XORG_SERVER_SUBDIR?=xorg-server
1684. if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || ${MACHINE} == "evbarm" 1691. if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || ${MACHINE} == "evbarm"
1685HAVE_XORG_GLAMOR?= yes 1692HAVE_XORG_GLAMOR?= yes
1686. endif 1693. endif
1687.else 1694.else
1688XORG_SERVER_SUBDIR?=xorg-server.old 1695XORG_SERVER_SUBDIR?=xorg-server.old
1689.endif 1696.endif
1690 1697
1691X11SRCDIR.xorg-server?= ${X11SRCDIRMIT}/${XORG_SERVER_SUBDIR}/dist 1698X11SRCDIR.xorg-server?= ${X11SRCDIRMIT}/${XORG_SERVER_SUBDIR}/dist
1692HAVE_XORG_GLAMOR?= no 1699HAVE_XORG_GLAMOR?= no
1693 1700
1694# Build glamor extension? 1701# Build glamor extension?
1695 1702
1696.for _dir in \ 1703.for _dir in \
1697 xtrans fontconfig freetype evieext mkfontscale bdftopcf \ 1704 xtrans fontconfig freetype evieext mkfontscale bdftopcf \
1698 xorg-cf-files imake xbiff xkeyboard-config \ 1705 xorg-cf-files imake xbiff xkeyboard-config \
1699 xcompmgr xbitmaps appres xeyes xev xedit sessreg pixman \ 1706 xcompmgr xbitmaps appres xeyes xev xedit sessreg pixman \
1700 brotli \ 1707 brotli \
1701 beforelight bitmap editres makedepend fonttosfnt fslsfonts fstobdf \ 1708 beforelight bitmap editres makedepend fonttosfnt fslsfonts fstobdf \
1702 glu glw mesa-demos MesaGLUT MesaLib MesaLib.old MesaLib7 \ 1709 glu glw mesa-demos MesaGLUT MesaLib MesaLib.old MesaLib7 \
1703 ico iceauth listres lndir \ 1710 ico iceauth listres lndir \
1704 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \ 1711 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
1705 rstart setxkbmap showfont smproxy transset twm viewres \ 1712 rstart setxkbmap showfont smproxy transset twm viewres \
1706 util-macros \ 1713 util-macros \
1707 x11perf xauth xcalc xclipboard \ 1714 x11perf xauth xcalc xclipboard \
1708 xclock xcmsdb xconsole xditview xdpyinfo xdriinfo xdm \ 1715 xclock xcmsdb xconsole xditview xdpyinfo xdriinfo xdm \
1709 xfd xf86dga xfindproxy xfontsel xgamma xgc xhost xinit \ 1716 xfd xf86dga xfindproxy xfontsel xgamma xgc xhost xinit \
1710 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \ 1717 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
1711 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \ 1718 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
1712 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \ 1719 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
1713 xwininfo xwud xkbprint xkbevd \ 1720 xwininfo xwud xkbprint xkbevd \
1714 xterm xwd xfs xfsinfo xtrap xkbutils xkbcomp \ 1721 xterm xwd xfs xfsinfo xtrap xkbutils xkbcomp \
1715 xinput xcb-util xorg-docs \ 1722 xinput xcb-util xorg-docs \
1716 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \ 1723 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
1717 font-adobe-utopia-75dpi font-adobe-utopia-type1 \ 1724 font-adobe-utopia-75dpi font-adobe-utopia-type1 \
1718 font-alias \ 1725 font-alias \
1719 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \ 1726 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
1720 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \ 1727 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
1721 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \ 1728 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
1722 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \ 1729 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
1723 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \ 1730 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1724 font-sony-misc font-util ttf-bitstream-vera encodings 1731 font-sony-misc font-util ttf-bitstream-vera encodings
1725X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist 1732X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist
1726.endfor 1733.endfor
1727 1734
1728# X11SRCDIR.Mesa points to the currently used Mesa sources 1735# X11SRCDIR.Mesa points to the currently used Mesa sources
1729X11SRCDIR.Mesa?= ${X11SRCDIRMIT}/${EXTERNAL_MESALIB_DIR}/dist 1736X11SRCDIR.Mesa?= ${X11SRCDIRMIT}/${EXTERNAL_MESALIB_DIR}/dist
1730 1737
1731.for _i in \ 1738.for _i in \
1732 elographics keyboard mouse synaptics vmmouse void ws 1739 elographics keyboard mouse synaptics vmmouse void ws
1733X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist 1740X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist
1734.endfor 1741.endfor
1735 1742
1736# xf86-video-modesetting move into the server build. 1743# xf86-video-modesetting move into the server build.
1737EXTRA_DRIVERS= 1744EXTRA_DRIVERS=
1738.if ${HAVE_XORG_SERVER_VER} == "120" 1745.if ${HAVE_XORG_SERVER_VER} == "120"
1739X11SRCDIR.xf86-video-modesetting=${X11SRCDIR.xorg-server}/hw/xfree86/drivers/modesetting 1746X11SRCDIR.xf86-video-modesetting=${X11SRCDIR.xorg-server}/hw/xfree86/drivers/modesetting
1740.else 1747.else
1741EXTRA_DRIVERS= modesetting 1748EXTRA_DRIVERS= modesetting
1742.endif 1749.endif
1743 1750
1744.for _v in \ 1751.for _v in \
1745 ag10e amdgpu apm ark ast ati ati-kms chips cirrus crime \ 1752 ag10e amdgpu apm ark ast ati ati-kms chips cirrus crime \
1746 geode glint i128 i740 igs imstt intel intel-old intel-2014 \ 1753 geode glint i128 i740 igs imstt intel intel-old intel-2014 \
1747 ${EXTRA_DRIVERS} mach64 mga \ 1754 ${EXTRA_DRIVERS} mach64 mga \
1748 neomagic newport nouveau nsc nv openchrome pnozz \ 1755 neomagic newport nouveau nsc nv openchrome pnozz \
1749 r128 rendition \ 1756 r128 rendition \
1750 s3 s3virge savage siliconmotion sis suncg14 \ 1757 s3 s3virge savage siliconmotion sis suncg14 \
1751 suncg6 sunffb sunleo suntcx \ 1758 suncg6 sunffb sunleo suntcx \
1752 tdfx tga trident tseng vboxvideo vesa vga vmware wsfb xgi 1759 tdfx tga trident tseng vboxvideo vesa vga vmware wsfb xgi
1753X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist 1760X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist
1754.endfor 1761.endfor
1755 1762
1756 1763
1757X11DRI?= yes 1764X11DRI?= yes
1758X11LOADABLE?= yes 1765X11LOADABLE?= yes
1759 1766
1760 1767
1761# 1768#
1762# MAKEDIRTARGET dir target [extra make(1) params] 1769# MAKEDIRTARGET dir target [extra make(1) params]
1763# run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message 1770# run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message
1764# 1771#
1765MAKEDIRTARGETENV?= 1772MAKEDIRTARGETENV?=
1766MAKEDIRTARGET=\ 1773MAKEDIRTARGET=\
1767 @_makedirtarget() { \ 1774 @_makedirtarget() { \
1768 dir="$$1"; shift; \ 1775 dir="$$1"; shift; \
1769 target="$$1"; shift; \ 1776 target="$$1"; shift; \
1770 case "$${dir}" in \ 1777 case "$${dir}" in \
1771 /*) this="$${dir}/"; \ 1778 /*) this="$${dir}/"; \
1772 real="$${dir}" ;; \ 1779 real="$${dir}" ;; \
1773 .) this="${_THISDIR_}"; \ 1780 .) this="${_THISDIR_}"; \
1774 real="${.CURDIR}" ;; \ 1781 real="${.CURDIR}" ;; \
1775 *) this="${_THISDIR_}$${dir}/"; \ 1782 *) this="${_THISDIR_}$${dir}/"; \
1776 real="${.CURDIR}/$${dir}" ;; \ 1783 real="${.CURDIR}/$${dir}" ;; \
1777 esac; \ 1784 esac; \
1778 show=$${this:-.}; \ 1785 show=$${this:-.}; \
1779 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \ 1786 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
1780 cd "$${real}" \ 1787 cd "$${real}" \
1781 && ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \ 1788 && ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
1782 }; \ 1789 }; \
1783 _makedirtarget 1790 _makedirtarget
1784 1791
1785# 1792#
1786# MAKEVERBOSE support. Levels are: 1793# MAKEVERBOSE support. Levels are:
1787# 0 Minimal output ("quiet") 1794# 0 Minimal output ("quiet")
1788# 1 Describe what is occurring 1795# 1 Describe what is occurring
1789# 2 Describe what is occurring and echo the actual command 1796# 2 Describe what is occurring and echo the actual command
1790# 3 Ignore the effect of the "@" prefix in make commands 1797# 3 Ignore the effect of the "@" prefix in make commands
1791# 4 Trace shell commands using the shell's -x flag 1798# 4 Trace shell commands using the shell's -x flag
1792# 1799#
1793MAKEVERBOSE?= 2 1800MAKEVERBOSE?= 2
1794 1801
1795.if ${MAKEVERBOSE} == 0 1802.if ${MAKEVERBOSE} == 0
1796_MKMSG?= @\# 1803_MKMSG?= @\#
1797_MKSHMSG?= : echo 1804_MKSHMSG?= : echo
1798_MKSHECHO?= : echo 1805_MKSHECHO?= : echo
1799.SILENT: 1806.SILENT:
1800.elif ${MAKEVERBOSE} == 1 1807.elif ${MAKEVERBOSE} == 1
1801_MKMSG?= @echo ' ' 1808_MKMSG?= @echo ' '
1802_MKSHMSG?= echo ' ' 1809_MKSHMSG?= echo ' '
1803_MKSHECHO?= : echo 1810_MKSHECHO?= : echo
1804.SILENT: 1811.SILENT:
1805.else # MAKEVERBOSE >= 2 1812.else # MAKEVERBOSE >= 2
1806_MKMSG?= @echo '\# ' 1813_MKMSG?= @echo '\# '
1807_MKSHMSG?= echo '\# ' 1814_MKSHMSG?= echo '\# '
1808_MKSHECHO?= echo 1815_MKSHECHO?= echo
1809.SILENT: __makeverbose_dummy_target__ 1816.SILENT: __makeverbose_dummy_target__
1810.endif # MAKEVERBOSE >= 2 1817.endif # MAKEVERBOSE >= 2
1811.if ${MAKEVERBOSE} >= 3 1818.if ${MAKEVERBOSE} >= 3
1812.MAKEFLAGS: -dl 1819.MAKEFLAGS: -dl
1813.endif # ${MAKEVERBOSE} >= 3 1820.endif # ${MAKEVERBOSE} >= 3
1814.if ${MAKEVERBOSE} >= 4 1821.if ${MAKEVERBOSE} >= 4
1815.MAKEFLAGS: -dx 1822.MAKEFLAGS: -dx
1816.endif # ${MAKEVERBOSE} >= 4 1823.endif # ${MAKEVERBOSE} >= 4
1817 1824
1818_MKMSG_BUILD?= ${_MKMSG} " build " 1825_MKMSG_BUILD?= ${_MKMSG} " build "
1819_MKMSG_CREATE?= ${_MKMSG} " create " 1826_MKMSG_CREATE?= ${_MKMSG} " create "
1820_MKMSG_COMPILE?= ${_MKMSG} "compile " 1827_MKMSG_COMPILE?= ${_MKMSG} "compile "
1821_MKMSG_EXECUTE?= ${_MKMSG} "execute " 1828_MKMSG_EXECUTE?= ${_MKMSG} "execute "
1822_MKMSG_FORMAT?= ${_MKMSG} " format " 1829_MKMSG_FORMAT?= ${_MKMSG} " format "
1823_MKMSG_INSTALL?= ${_MKMSG} "install " 1830_MKMSG_INSTALL?= ${_MKMSG} "install "
1824_MKMSG_LINK?= ${_MKMSG} " link " 1831_MKMSG_LINK?= ${_MKMSG} " link "
1825_MKMSG_LEX?= ${_MKMSG} " lex " 1832_MKMSG_LEX?= ${_MKMSG} " lex "
1826_MKMSG_REMOVE?= ${_MKMSG} " remove " 1833_MKMSG_REMOVE?= ${_MKMSG} " remove "
1827_MKMSG_REGEN?= ${_MKMSG} " regen " 1834_MKMSG_REGEN?= ${_MKMSG} " regen "
1828_MKMSG_YACC?= ${_MKMSG} " yacc " 1835_MKMSG_YACC?= ${_MKMSG} " yacc "
1829 1836
1830_MKSHMSG_CREATE?= ${_MKSHMSG} " create " 1837_MKSHMSG_CREATE?= ${_MKSHMSG} " create "
1831_MKSHMSG_FORMAT?= ${_MKSHMSG} " format " 1838_MKSHMSG_FORMAT?= ${_MKSHMSG} " format "
1832_MKSHMSG_INSTALL?= ${_MKSHMSG} "install " 1839_MKSHMSG_INSTALL?= ${_MKSHMSG} "install "
1833 1840
1834_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET} 1841_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
1835_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET} 1842_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
1836_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET} 1843_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
1837_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET} 1844_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
1838_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET} 1845_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET}
1839_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET} 1846_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
1840_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET} 1847_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
1841_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET} 1848_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET}
1842_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET} 1849_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
1843 1850
1844.if ${MKMANDOC} == "yes" 1851.if ${MKMANDOC} == "yes"
1845TARGETS+= lintmanpages 1852TARGETS+= lintmanpages
1846.endif 1853.endif
1847 1854
1848TESTSBASE= /usr/tests${MLIBDIR:D/${MLIBDIR}} 1855TESTSBASE= /usr/tests${MLIBDIR:D/${MLIBDIR}}
1849 1856
1850# Override with tools versions if needed 1857# Override with tools versions if needed
1851.if ${MKCTF:Uno} != "no" && !defined(NOCTF) && \ 1858.if ${MKCTF:Uno} != "no" && !defined(NOCTF) && \
1852 (exists(${TOOL_CTFCONVERT}) || exists(/usr/bin/${TOOL_CTFCONVERT})) 1859 (exists(${TOOL_CTFCONVERT}) || exists(/usr/bin/${TOOL_CTFCONVERT}))
1853CTFCONVERT= ${TOOL_CTFCONVERT} 1860CTFCONVERT= ${TOOL_CTFCONVERT}
1854CTFMERGE= ${TOOL_CTFMERGE} 1861CTFMERGE= ${TOOL_CTFMERGE}
1855.endif 1862.endif
1856 1863
1857.endif # !defined(_BSD_OWN_MK_) 1864.endif # !defined(_BSD_OWN_MK_)