Tue Oct 13 03:14:16 2015 UTC ()
add xf86-video-nouveau


(mrg)
diff -r1.874 -r1.875 src/share/mk/bsd.own.mk

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

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