Sun Sep 1 10:40:00 2019 UTC ()
Pull up following revision(s) (requested by gson in ticket #124):

	share/mk/bsd.own.mk: revision 1.1150

Don't install PIC libraries by default because they are too big since they
contain debug symbols. I supplied a patch in PR/54449 to remove the debugging
symbols but folks preferred to not install them at all.


(martin)
diff -r1.1149 -r1.1149.2.1 src/share/mk/bsd.own.mk

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

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