Sat Apr 11 05:36:13 2015 UTC ()
Pull up following revision(s) (requested by mrg in ticket #674):
	share/mk/bsd.own.mk: revision 1.845
remove support to look for GCC 4.5 in gcc.old.


(snj)
diff -r1.829.2.5 -r1.829.2.6 src/share/mk/bsd.own.mk

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

--- src/share/mk/bsd.own.mk 2015/03/09 08:45:26 1.829.2.5
+++ src/share/mk/bsd.own.mk 2015/04/11 05:36:13 1.829.2.6
@@ -1,1076 +1,1074 @@ @@ -1,1076 +1,1074 @@
1# $NetBSD: bsd.own.mk,v 1.829.2.5 2015/03/09 08:45:26 snj Exp $ 1# $NetBSD: bsd.own.mk,v 1.829.2.6 2015/04/11 05:36:13 snj 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/} 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/}
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" && ${MKLLVM:Uyes} != "no" 53.if ${MACHINE_CPU} == "aarch64" && ${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# We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is 72# We import the old gcc as "gcc.old" when upgrading. EXTERNAL_GCC_SUBDIR is
73# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. 73# set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC.
74# 74#
75.if ${HAVE_GCC} == 45 75.if ${HAVE_GCC} == 48
76EXTERNAL_GCC_SUBDIR= gcc.old 
77.elif ${HAVE_GCC} == 48 
78EXTERNAL_GCC_SUBDIR= gcc 76EXTERNAL_GCC_SUBDIR= gcc
79.else 77.else
80EXTERNAL_GCC_SUBDIR= /does/not/exist 78EXTERNAL_GCC_SUBDIR= /does/not/exist
81.endif 79.endif
82 80
83.endif 81.endif
84 82
85.if !empty(MACHINE_ARCH:Mearm*) 83.if !empty(MACHINE_ARCH:Mearm*)
86_LIBC_COMPILER_RT.${MACHINE_ARCH}= yes 84_LIBC_COMPILER_RT.${MACHINE_ARCH}= yes
87.endif 85.endif
88 86
89_LIBC_COMPILER_RT.aarch64= yes 87_LIBC_COMPILER_RT.aarch64= yes
90_LIBC_COMPILER_RT.i386= yes 88_LIBC_COMPILER_RT.i386= yes
91_LIBC_COMPILER_RT.powerpc= yes 89_LIBC_COMPILER_RT.powerpc= yes
92_LIBC_COMPILER_RT.x86_64= yes 90_LIBC_COMPILER_RT.x86_64= yes
93 91
94.if ${MKLLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes" 92.if ${MKLLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes"
95HAVE_LIBGCC?= no 93HAVE_LIBGCC?= no
96.else 94.else
97HAVE_LIBGCC?= yes 95HAVE_LIBGCC?= yes
98.endif 96.endif
99 97
100 98
101# ia64 is not support 99# ia64 is not support
102.if ${MKLLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*) 100.if ${MKLLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*)
103HAVE_LIBGCC_EH?= no 101HAVE_LIBGCC_EH?= no
104.else 102.else
105HAVE_LIBGCC_EH?= yes 103HAVE_LIBGCC_EH?= yes
106.endif 104.endif
107 105
108HAVE_GDB?= 7 106HAVE_GDB?= 7
109 107
110.if (${MACHINE_ARCH} == "alpha") || \ 108.if (${MACHINE_ARCH} == "alpha") || \
111 (${MACHINE_ARCH} == "hppa") || \ 109 (${MACHINE_ARCH} == "hppa") || \
112 (${MACHINE_ARCH} == "ia64") || \ 110 (${MACHINE_ARCH} == "ia64") || \
113 (${MACHINE_CPU} == "mips") 111 (${MACHINE_CPU} == "mips")
114HAVE_SSP?= no 112HAVE_SSP?= no
115.else 113.else
116HAVE_SSP?= yes 114HAVE_SSP?= yes
117.if ${USE_FORT:Uno} != "no" 115.if ${USE_FORT:Uno} != "no"
118USE_SSP?= yes 116USE_SSP?= yes
119.endif 117.endif
120.endif 118.endif
121 119
122.if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*) 120.if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*)
123.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 121.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
124PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 122PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
125.else 123.else
126PRINTOBJDIR= ${MAKE} -V .OBJDIR 124PRINTOBJDIR= ${MAKE} -V .OBJDIR
127.endif 125.endif
128.else 126.else
129PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion 127PRINTOBJDIR= echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion
130.endif 128.endif
131 129
132# 130#
133# Determine if running in the NetBSD source tree by checking for the 131# Determine if running in the NetBSD source tree by checking for the
134# existence of build.sh and tools/ in the current or a parent directory, 132# existence of build.sh and tools/ in the current or a parent directory,
135# and setting _SRC_TOP_ to the result. 133# and setting _SRC_TOP_ to the result.
136# 134#
137.if !defined(_SRC_TOP_) # { 135.if !defined(_SRC_TOP_) # {
138_SRC_TOP_!= cd "${.CURDIR}"; while :; do \ 136_SRC_TOP_!= cd "${.CURDIR}"; while :; do \
139 here=`pwd`; \ 137 here=`pwd`; \
140 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ 138 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
141 case $$here in /) echo ""; break;; esac; \ 139 case $$here in /) echo ""; break;; esac; \
142 cd ..; done 140 cd ..; done
143 141
144.MAKEOVERRIDES+= _SRC_TOP_ 142.MAKEOVERRIDES+= _SRC_TOP_
145 143
146.endif # } 144.endif # }
147 145
148# 146#
149# If _SRC_TOP_ != "", we're within the NetBSD source tree. 147# If _SRC_TOP_ != "", we're within the NetBSD source tree.
150# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. 148# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
151# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the 149# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the
152# NetBSD version, or on variables defined at build time, can 150# NetBSD version, or on variables defined at build time, can
153# declare a dependency on ${_NETBSD_VERSION_DEPENDS}. 151# declare a dependency on ${_NETBSD_VERSION_DEPENDS}.
154# 152#
155.if (${_SRC_TOP_} != "") # { 153.if (${_SRC_TOP_} != "") # {
156 154
157NETBSDSRCDIR?= ${_SRC_TOP_} 155NETBSDSRCDIR?= ${_SRC_TOP_}
158 156
159.if !defined(_SRC_TOP_OBJ_) 157.if !defined(_SRC_TOP_OBJ_)
160_SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR} 158_SRC_TOP_OBJ_!= cd "${_SRC_TOP_}" && ${PRINTOBJDIR}
161.MAKEOVERRIDES+= _SRC_TOP_OBJ_ 159.MAKEOVERRIDES+= _SRC_TOP_OBJ_
162.endif 160.endif
163 161
164_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params 162_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params
165_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h 163_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h
166_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh 164_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh
167_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh 165_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh
168${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build" 166${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build"
169 167
170.endif # _SRC_TOP_ != "" # } 168.endif # _SRC_TOP_ != "" # }
171 169
172 170
173.if (${_SRC_TOP_} != "") && \ 171.if (${_SRC_TOP_} != "") && \
174 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) 172 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
175USETOOLS?= yes 173USETOOLS?= yes
176.endif 174.endif
177USETOOLS?= no 175USETOOLS?= no
178 176
179 177
180.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ 178.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
181 ${MACHINE_ARCH} == "sh3" 179 ${MACHINE_ARCH} == "sh3"
182.BEGIN: 180.BEGIN:
183 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" 181 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
184 @false 182 @false
185.elif defined(REQUIRETOOLS) && \ 183.elif defined(REQUIRETOOLS) && \
186 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ 184 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
187 ${USETOOLS} == "no" 185 ${USETOOLS} == "no"
188.BEGIN: 186.BEGIN:
189 @echo "USETOOLS=no, but this component requires a version-specific host toolchain" 187 @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
190 @false 188 @false
191.endif 189.endif
192 190
193# 191#
194# Host platform information; may be overridden 192# Host platform information; may be overridden
195# 193#
196.include <bsd.host.mk> 194.include <bsd.host.mk>
197 195
198.if ${USETOOLS} == "yes" # { 196.if ${USETOOLS} == "yes" # {
199 197
200# 198#
201# Provide a default for TOOLDIR. 199# Provide a default for TOOLDIR.
202# 200#
203.if !defined(TOOLDIR) 201.if !defined(TOOLDIR)
204TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 202TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
205.MAKEOVERRIDES+= TOOLDIR 203.MAKEOVERRIDES+= TOOLDIR
206.endif 204.endif
207 205
208# 206#
209# This is the prefix used for the NetBSD-sourced tools. 207# This is the prefix used for the NetBSD-sourced tools.
210# 208#
211_TOOL_PREFIX?= nb 209_TOOL_PREFIX?= nb
212 210
213# 211#
214# If an external toolchain base is specified, use it. 212# If an external toolchain base is specified, use it.
215# 213#
216.if defined(EXTERNAL_TOOLCHAIN) # { 214.if defined(EXTERNAL_TOOLCHAIN) # {
217AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 215AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
218AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 216AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
219LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 217LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
220NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 218NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
221OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 219OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
222OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 220OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
223RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 221RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
224SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 222SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
225STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 223STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
226 224
227TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 225TOOL_CC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
228TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 226TOOL_CPP.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
229TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 227TOOL_CXX.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
230TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77 228TOOL_FC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
231TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 229TOOL_OBJC.gcc= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
232 230
233TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 231TOOL_CC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
234TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 232TOOL_CPP.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
235TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++ 233TOOL_CXX.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++
236TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang 234TOOL_OBJC.clang= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
237.else # } { 235.else # } {
238# Define default locations for common tools. 236# Define default locations for common tools.
239.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { 237.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
240AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 238AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
241AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 239AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
242LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 240LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
243NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 241NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
244OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 242OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
245OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 243OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
246RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 244RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
247SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 245SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
248STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 246STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
249 247
250# GCC supports C, C++, Fortran and Objective C 248# GCC supports C, C++, Fortran and Objective C
251TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 249TOOL_CC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
252TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 250TOOL_CPP.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
253TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 251TOOL_CXX.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
254TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 252TOOL_FC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
255TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 253TOOL_OBJC.gcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
256.endif # } 254.endif # }
257 255
258# Clang supports C, C++ and Objective C 256# Clang supports C, C++ and Objective C
259TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 257TOOL_CC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
260TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp 258TOOL_CPP.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
261TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++ 259TOOL_CXX.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
262TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang 260TOOL_OBJC.clang= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
263 261
264# PCC supports C and Fortran 262# PCC supports C and Fortran
265TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 263TOOL_CC.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
266TOOL_CPP.pcc= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp 264TOOL_CPP.pcc= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
267TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++ 265TOOL_CXX.pcc= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++
268 266
269# 267#
270# Make sure DESTDIR is set, so that builds with these tools always 268# Make sure DESTDIR is set, so that builds with these tools always
271# get appropriate -nostdinc, -nostdlib, etc. handling. The default is 269# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
272# <empty string>, meaning start from /, the root directory. 270# <empty string>, meaning start from /, the root directory.
273# 271#
274DESTDIR?= 272DESTDIR?=
275 273
276.if !defined(HOSTPROG) && !defined(HOSTLIB) 274.if !defined(HOSTPROG) && !defined(HOSTLIB)
277. if ${DESTDIR} != "" 275. if ${DESTDIR} != ""
278CPPFLAGS+= --sysroot=${DESTDIR} 276CPPFLAGS+= --sysroot=${DESTDIR}
279LDFLAGS+= --sysroot=${DESTDIR} 277LDFLAGS+= --sysroot=${DESTDIR}
280. else 278. else
281CPPFLAGS+= --sysroot=/ 279CPPFLAGS+= --sysroot=/
282LDFLAGS+= --sysroot=/ 280LDFLAGS+= --sysroot=/
283. endif 281. endif
284.endif 282.endif
285.endif # EXTERNAL_TOOLCHAIN # } 283.endif # EXTERNAL_TOOLCHAIN # }
286 284
287DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 285DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
288ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 286ELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
289ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 287ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
290INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 288INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
291LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 289LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
292LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 290LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
293LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 291LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
294MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 292MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
295MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 293MKDEPCXX= CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
296PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 294PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
297TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 295TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
298YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 296YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
299 297
300TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 298TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
301TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 299TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
302TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 300TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
303TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 301TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
304TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 302TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
305TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 303TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
306TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 304TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
307TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 305TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
308TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen 306TOOL_CLANG_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen
309TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 307TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
310TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 308TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
311TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 309TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
312TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 310TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
313TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert 311TOOL_CTFCONVERT= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
314TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge 312TOOL_CTFMERGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
315TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 313TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
316TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel 314TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel
317TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 315TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
318TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 316TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
319TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 317TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
320TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 318TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
321TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 319TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
322TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 320TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
323TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep 321TOOL_GREP= ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
324TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff 322TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
325TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 323TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
326TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 324TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
327TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot 325TOOL_HPPAMKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot
328TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 326TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
329TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 327TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
330TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 328TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
331TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 329TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
332TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen 330TOOL_LLVM_TBLGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
333TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 331TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
334TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 332TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
335TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 333TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
336TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 334TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
337TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 335TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
338TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii 336TOOL_MANDOC_ASCII= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
339TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml 337TOOL_MANDOC_HTML= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
340TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint 338TOOL_MANDOC_LINT= ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
341TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 339TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
342TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 340TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
343TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout 341TOOL_M68KELF2AOUT= ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
344TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 342TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
345TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 343TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
346TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 344TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
347TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 345TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
348TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 346TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
349TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod 347TOOL_MKNOD= ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod
350TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 348TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
351TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage 349TOOL_MKUBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
352TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb 350TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb
353TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 351TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
354TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 352TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
355TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf 353TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf
356TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs 354TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs
357TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 355TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
358TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 356TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
359TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz 357TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz
360TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create 358TOOL_PKG_CREATE= ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
361TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 359TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
362TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 360TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
363TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 361TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
364TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 362TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
365TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 363TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
366TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 364TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
367TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 365TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
368TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 366TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
369TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 367TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
370TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 368TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
371TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 369TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
372TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 370TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
373TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc 371TOOL_SLC= ${TOOLDIR}/bin/${_TOOL_PREFIX}slc
374TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 372TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
375TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 373TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
376TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 374TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
377TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 375TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
378TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 376TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
379TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 377TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
380TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic 378TOOL_TIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}tic
381TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 379TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
382TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 380TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
383TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr 381TOOL_VFONTEDPR= ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr
384TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 382TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
385 383
386.else # USETOOLS != yes # } { 384.else # USETOOLS != yes # } {
387 385
388# Clang supports C, C++ and Objective C 386# Clang supports C, C++ and Objective C
389TOOL_CC.clang= clang 387TOOL_CC.clang= clang
390TOOL_CPP.clang= clang-cpp 388TOOL_CPP.clang= clang-cpp
391TOOL_CXX.clang= clang++ 389TOOL_CXX.clang= clang++
392TOOL_OBJC.clang= clang 390TOOL_OBJC.clang= clang
393 391
394# GCC supports C, C++, Fortran and Objective C 392# GCC supports C, C++, Fortran and Objective C
395TOOL_CC.gcc= gcc 393TOOL_CC.gcc= gcc
396TOOL_CPP.gcc= cpp 394TOOL_CPP.gcc= cpp
397TOOL_CXX.gcc= c++ 395TOOL_CXX.gcc= c++
398TOOL_FC.gcc= g77 396TOOL_FC.gcc= g77
399TOOL_OBJC.gcc= gcc 397TOOL_OBJC.gcc= gcc
400 398
401# PCC supports C and Fortran 399# PCC supports C and Fortran
402TOOL_CC.pcc= pcc 400TOOL_CC.pcc= pcc
403TOOL_CPP.pcc= /usr/libexec/pcpp 401TOOL_CPP.pcc= /usr/libexec/pcpp
404TOOL_CXX.pcc= p++ 402TOOL_CXX.pcc= p++
405 403
406TOOL_AMIGAAOUT2BB= amiga-aout2bb 404TOOL_AMIGAAOUT2BB= amiga-aout2bb
407TOOL_AMIGAELF2BB= amiga-elf2bb 405TOOL_AMIGAELF2BB= amiga-elf2bb
408TOOL_AMIGATXLT= amiga-txlt 406TOOL_AMIGATXLT= amiga-txlt
409TOOL_ASN1_COMPILE= asn1_compile 407TOOL_ASN1_COMPILE= asn1_compile
410TOOL_AWK= awk 408TOOL_AWK= awk
411TOOL_CAP_MKDB= cap_mkdb 409TOOL_CAP_MKDB= cap_mkdb
412TOOL_CAT= cat 410TOOL_CAT= cat
413TOOL_CKSUM= cksum 411TOOL_CKSUM= cksum
414TOOL_CLANG_TBLGEN= clang-tblgen 412TOOL_CLANG_TBLGEN= clang-tblgen
415TOOL_COMPILE_ET= compile_et 413TOOL_COMPILE_ET= compile_et
416TOOL_CONFIG= config 414TOOL_CONFIG= config
417TOOL_CRUNCHGEN= crunchgen 415TOOL_CRUNCHGEN= crunchgen
418TOOL_CTAGS= ctags 416TOOL_CTAGS= ctags
419TOOL_CTFCONVERT= ctfconvert 417TOOL_CTFCONVERT= ctfconvert
420TOOL_CTFMERGE= ctfmerge 418TOOL_CTFMERGE= ctfmerge
421TOOL_DB= db 419TOOL_DB= db
422TOOL_DISKLABEL= disklabel 420TOOL_DISKLABEL= disklabel
423TOOL_EQN= eqn 421TOOL_EQN= eqn
424TOOL_FDISK= fdisk 422TOOL_FDISK= fdisk
425TOOL_FGEN= fgen 423TOOL_FGEN= fgen
426TOOL_GENASSYM= genassym 424TOOL_GENASSYM= genassym
427TOOL_GENCAT= gencat 425TOOL_GENCAT= gencat
428TOOL_GMAKE= gmake 426TOOL_GMAKE= gmake
429TOOL_GREP= grep 427TOOL_GREP= grep
430TOOL_GROFF= groff 428TOOL_GROFF= groff
431TOOL_HEXDUMP= hexdump 429TOOL_HEXDUMP= hexdump
432TOOL_HP300MKBOOT= hp300-mkboot 430TOOL_HP300MKBOOT= hp300-mkboot
433TOOL_HPPAMKBOOT= hppa-mkboot 431TOOL_HPPAMKBOOT= hppa-mkboot
434TOOL_INDXBIB= indxbib 432TOOL_INDXBIB= indxbib
435TOOL_INSTALLBOOT= installboot 433TOOL_INSTALLBOOT= installboot
436TOOL_INSTALL_INFO= install-info 434TOOL_INSTALL_INFO= install-info
437TOOL_JOIN= join 435TOOL_JOIN= join
438TOOL_LLVM_TBLGEN= llvm-tblgen 436TOOL_LLVM_TBLGEN= llvm-tblgen
439TOOL_M4= m4 437TOOL_M4= m4
440TOOL_MACPPCFIXCOFF= macppc-fixcoff 438TOOL_MACPPCFIXCOFF= macppc-fixcoff
441TOOL_MAKEFS= makefs 439TOOL_MAKEFS= makefs
442TOOL_MAKEINFO= makeinfo 440TOOL_MAKEINFO= makeinfo
443TOOL_MAKEWHATIS= /usr/libexec/makewhatis 441TOOL_MAKEWHATIS= /usr/libexec/makewhatis
444TOOL_MANDOC_ASCII= mandoc -Tascii 442TOOL_MANDOC_ASCII= mandoc -Tascii
445TOOL_MANDOC_HTML= mandoc -Thtml 443TOOL_MANDOC_HTML= mandoc -Thtml
446TOOL_MANDOC_LINT= mandoc -Tlint 444TOOL_MANDOC_LINT= mandoc -Tlint
447TOOL_MDSETIMAGE= mdsetimage 445TOOL_MDSETIMAGE= mdsetimage
448TOOL_MENUC= menuc 446TOOL_MENUC= menuc
449TOOL_M68KELF2AOUT= m68k-elf2aout 447TOOL_M68KELF2AOUT= m68k-elf2aout
450TOOL_MIPSELF2ECOFF= mips-elf2ecoff 448TOOL_MIPSELF2ECOFF= mips-elf2ecoff
451TOOL_MKCSMAPPER= mkcsmapper 449TOOL_MKCSMAPPER= mkcsmapper
452TOOL_MKESDB= mkesdb 450TOOL_MKESDB= mkesdb
453TOOL_MKLOCALE= mklocale 451TOOL_MKLOCALE= mklocale
454TOOL_MKMAGIC= file 452TOOL_MKMAGIC= file
455TOOL_MKNOD= mknod 453TOOL_MKNOD= mknod
456TOOL_MKTEMP= mktemp 454TOOL_MKTEMP= mktemp
457TOOL_MKUBOOTIMAGE= mkubootimage 455TOOL_MKUBOOTIMAGE= mkubootimage
458TOOL_ELFTOSB= elftosb 456TOOL_ELFTOSB= elftosb
459TOOL_MSGC= msgc 457TOOL_MSGC= msgc
460TOOL_MTREE= mtree 458TOOL_MTREE= mtree
461TOOL_NBPERF= nbperf 459TOOL_NBPERF= nbperf
462TOOL_NCDCS= ncdcs 460TOOL_NCDCS= ncdcs
463TOOL_PAX= pax 461TOOL_PAX= pax
464TOOL_PIC= pic 462TOOL_PIC= pic
465TOOL_PIGZ= pigz 463TOOL_PIGZ= pigz
466TOOL_PKG_CREATE= pkg_create 464TOOL_PKG_CREATE= pkg_create
467TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage 465TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage
468TOOL_PWD_MKDB= pwd_mkdb 466TOOL_PWD_MKDB= pwd_mkdb
469TOOL_REFER= refer 467TOOL_REFER= refer
470TOOL_ROFF_ASCII= nroff 468TOOL_ROFF_ASCII= nroff
471TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii 469TOOL_ROFF_DOCASCII= ${TOOL_GROFF} -Tascii
472TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml 470TOOL_ROFF_DOCHTML= ${TOOL_GROFF} -Thtml
473TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 471TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
474TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 472TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
475TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 473TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
476TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 474TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
477TOOL_RPCGEN= rpcgen 475TOOL_RPCGEN= rpcgen
478TOOL_SED= sed 476TOOL_SED= sed
479TOOL_SOELIM= soelim 477TOOL_SOELIM= soelim
480TOOL_SPARKCRC= sparkcrc 478TOOL_SPARKCRC= sparkcrc
481TOOL_STAT= stat 479TOOL_STAT= stat
482TOOL_STRFILE= strfile 480TOOL_STRFILE= strfile
483TOOL_SUNLABEL= sunlabel 481TOOL_SUNLABEL= sunlabel
484TOOL_TBL= tbl 482TOOL_TBL= tbl
485TOOL_TIC= tic 483TOOL_TIC= tic
486TOOL_UUDECODE= uudecode 484TOOL_UUDECODE= uudecode
487TOOL_VGRIND= vgrind -f 485TOOL_VGRIND= vgrind -f
488TOOL_VFONTEDPR= /usr/libexec/vfontedpr 486TOOL_VFONTEDPR= /usr/libexec/vfontedpr
489TOOL_ZIC= zic 487TOOL_ZIC= zic
490 488
491.endif # USETOOLS != yes # } 489.endif # USETOOLS != yes # }
492 490
493# Fallback to ensure that all variables are defined to something 491# Fallback to ensure that all variables are defined to something
494TOOL_CC.false= false 492TOOL_CC.false= false
495TOOL_CPP.false= false 493TOOL_CPP.false= false
496TOOL_CXX.false= false 494TOOL_CXX.false= false
497TOOL_FC.false= false 495TOOL_FC.false= false
498TOOL_OBJC.false= false 496TOOL_OBJC.false= false
499 497
500AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} ${EXTERNAL_TOOLCHAIN:Dgcc} false 498AVAILABLE_COMPILER?= ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} ${EXTERNAL_TOOLCHAIN:Dgcc} false
501 499
502.for _t in CC CPP CXX FC OBJC 500.for _t in CC CPP CXX FC OBJC
503ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]} 501ACTIVE_${_t}= ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]}
504SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@} 502SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@}
505.endfor 503.endfor
506# make bugs prevent moving this into the .for loop 504# make bugs prevent moving this into the .for loop
507CC= ${TOOL_CC.${ACTIVE_CC}} 505CC= ${TOOL_CC.${ACTIVE_CC}}
508CPP= ${TOOL_CPP.${ACTIVE_CPP}} 506CPP= ${TOOL_CPP.${ACTIVE_CPP}}
509CXX= ${TOOL_CXX.${ACTIVE_CXX}} 507CXX= ${TOOL_CXX.${ACTIVE_CXX}}
510FC= ${TOOL_FC.${ACTIVE_FC}} 508FC= ${TOOL_FC.${ACTIVE_FC}}
511OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}} 509OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}}
512 510
513# Override with tools versions if needed 511# Override with tools versions if needed
514.if ${MKCTF:Uno} != "no" && !defined(NOCTF) 512.if ${MKCTF:Uno} != "no" && !defined(NOCTF)
515CTFCONVERT= ${TOOL_CTFCONVERT} 513CTFCONVERT= ${TOOL_CTFCONVERT}
516CTFMERGE= ${TOOL_CTFMERGE} 514CTFMERGE= ${TOOL_CTFMERGE}
517.endif 515.endif
518 516
519# For each ${MACHINE_CPU}, list the ports that use it. 517# For each ${MACHINE_CPU}, list the ports that use it.
520MACHINES.aarch64= evbarm64 518MACHINES.aarch64= evbarm64
521MACHINES.alpha= alpha 519MACHINES.alpha= alpha
522MACHINES.arm= acorn26 acorn32 cats epoc32 evbarm hpcarm \ 520MACHINES.arm= acorn26 acorn32 cats epoc32 evbarm hpcarm \
523 iyonix netwinder shark zaurus 521 iyonix netwinder shark zaurus
524MACHINES.coldfire= evbcf 522MACHINES.coldfire= evbcf
525MACHINES.i386= i386 523MACHINES.i386= i386
526MACHINES.ia64= ia64 524MACHINES.ia64= ia64
527MACHINES.hppa= hppa 525MACHINES.hppa= hppa
528MACHINES.m68000= sun2 526MACHINES.m68000= sun2
529MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ 527MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \
530 news68k next68k sun3 x68k 528 news68k next68k sun3 x68k
531MACHINES.mips= arc cobalt algor cobalt emips evbmips ews4800mips \ 529MACHINES.mips= arc cobalt algor cobalt emips evbmips ews4800mips \
532 hpcmips mipsco newsmips pmax sbmips sgimips 530 hpcmips mipsco newsmips pmax sbmips sgimips
533MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \ 531MACHINES.powerpc= amigappc bebox evbppc ibmnws macppc mvmeppc \
534 ofppc prep rs6000 sandpoint 532 ofppc prep rs6000 sandpoint
535MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye 533MACHINES.sh3= dreamcast evbsh3 hpcsh landisk mmeye
536MACHINES.sparc= sparc sparc64 534MACHINES.sparc= sparc sparc64
537MACHINES.sparc64= sparc64 535MACHINES.sparc64= sparc64
538MACHINES.vax= vax 536MACHINES.vax= vax
539MACHINES.x86_64= amd64 537MACHINES.x86_64= amd64
540 538
541# for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH 539# for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH
542# 540#
543OBJECT_FMTS= 541OBJECT_FMTS=
544.if ${MACHINE_ARCH} != "alpha"  542.if ${MACHINE_ARCH} != "alpha"
545OBJECT_FMTS+= elf32 543OBJECT_FMTS+= elf32
546.endif 544.endif
547.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != "" 545.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != ""
548OBJECT_FMTS+= elf64 546OBJECT_FMTS+= elf64
549.endif 547.endif
550 548
551# OBJCOPY flags to create a.out binaries for old firmware 549# OBJCOPY flags to create a.out binaries for old firmware
552# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc 550# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
553.if ${MACHINE_CPU} == "arm" 551.if ${MACHINE_CPU} == "arm"
554OBJCOPY_ELF2AOUT_FLAGS?= \ 552OBJCOPY_ELF2AOUT_FLAGS?= \
555 -O a.out-arm-netbsd \ 553 -O a.out-arm-netbsd \
556 -R .ident \ 554 -R .ident \
557 -R .ARM.attributes \ 555 -R .ARM.attributes \
558 -R .ARM.exidx \ 556 -R .ARM.exidx \
559 -R .ARM.extab \ 557 -R .ARM.extab \
560 -R .arm.atpcs \ 558 -R .arm.atpcs \
561 -R .comment \ 559 -R .comment \
562 -R .debug_abbrev \ 560 -R .debug_abbrev \
563 -R .debug_aranges \ 561 -R .debug_aranges \
564 -R .debug_info \ 562 -R .debug_info \
565 -R .debug_line \ 563 -R .debug_line \
566 -R .debug_frame \ 564 -R .debug_frame \
567 -R .debug_loc \ 565 -R .debug_loc \
568 -R .debug_pubnames \ 566 -R .debug_pubnames \
569 -R .debug_pubtypes \ 567 -R .debug_pubtypes \
570 -R .debug_str \ 568 -R .debug_str \
571 -R .eh_frame \ 569 -R .eh_frame \
572 -R .note.netbsd.ident 570 -R .note.netbsd.ident
573.endif 571.endif
574 572
575# 573#
576# Targets to check if DESTDIR or RELEASEDIR is provided 574# Targets to check if DESTDIR or RELEASEDIR is provided
577# 575#
578.if !target(check_DESTDIR) 576.if !target(check_DESTDIR)
579check_DESTDIR: .PHONY .NOTMAIN 577check_DESTDIR: .PHONY .NOTMAIN
580.if !defined(DESTDIR) 578.if !defined(DESTDIR)
581 @echo "setenv DESTDIR before doing that!" 579 @echo "setenv DESTDIR before doing that!"
582 @false 580 @false
583.else 581.else
584 @true 582 @true
585.endif 583.endif
586.endif 584.endif
587 585
588.if !target(check_RELEASEDIR) 586.if !target(check_RELEASEDIR)
589check_RELEASEDIR: .PHONY .NOTMAIN 587check_RELEASEDIR: .PHONY .NOTMAIN
590.if !defined(RELEASEDIR) 588.if !defined(RELEASEDIR)
591 @echo "setenv RELEASEDIR before doing that!" 589 @echo "setenv RELEASEDIR before doing that!"
592 @false 590 @false
593.else 591.else
594 @true 592 @true
595.endif 593.endif
596.endif 594.endif
597 595
598# 596#
599# Build a dynamically linked /bin and /sbin, with the necessary shared 597# Build a dynamically linked /bin and /sbin, with the necessary shared
600# libraries moved from /usr/lib to /lib and the shared linker moved 598# libraries moved from /usr/lib to /lib and the shared linker moved
601# from /usr/libexec to /lib 599# from /usr/libexec to /lib
602# 600#
603# Note that if the BINDIR is not /bin or /sbin, then we always use the 601# Note that if the BINDIR is not /bin or /sbin, then we always use the
604# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin 602# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
605# and /sbin). See <bsd.shlib.mk>. 603# and /sbin). See <bsd.shlib.mk>.
606# 604#
607MKDYNAMICROOT?= yes 605MKDYNAMICROOT?= yes
608 606
609# 607#
610# Where the system object and source trees are kept; can be configurable 608# Where the system object and source trees are kept; can be configurable
611# by the user in case they want them in ~/foosrc and ~/fooobj (for example). 609# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
612# 610#
613BSDSRCDIR?= /usr/src 611BSDSRCDIR?= /usr/src
614BSDOBJDIR?= /usr/obj 612BSDOBJDIR?= /usr/obj
615NETBSDSRCDIR?= ${BSDSRCDIR} 613NETBSDSRCDIR?= ${BSDSRCDIR}
616 614
617BINGRP?= wheel 615BINGRP?= wheel
618BINOWN?= root 616BINOWN?= root
619BINMODE?= 555 617BINMODE?= 555
620NONBINMODE?= 444 618NONBINMODE?= 444
621 619
622# These are here mainly because we don't want suid root in case 620# These are here mainly because we don't want suid root in case
623# a Makefile defines BINMODE. 621# a Makefile defines BINMODE.
624RUMPBINGRP?= wheel 622RUMPBINGRP?= wheel
625RUMPBINOWN?= root 623RUMPBINOWN?= root
626RUMPBINMODE?= 555 624RUMPBINMODE?= 555
627RUMPNONBINMODE?=444 625RUMPNONBINMODE?=444
628 626
629MANDIR?= /usr/share/man 627MANDIR?= /usr/share/man
630MANGRP?= wheel 628MANGRP?= wheel
631MANOWN?= root 629MANOWN?= root
632MANMODE?= ${NONBINMODE} 630MANMODE?= ${NONBINMODE}
633MANINSTALL?= ${_MANINSTALL} 631MANINSTALL?= ${_MANINSTALL}
634 632
635INFODIR?= /usr/share/info 633INFODIR?= /usr/share/info
636INFOGRP?= wheel 634INFOGRP?= wheel
637INFOOWN?= root 635INFOOWN?= root
638INFOMODE?= ${NONBINMODE} 636INFOMODE?= ${NONBINMODE}
639 637
640LIBDIR?= /usr/lib 638LIBDIR?= /usr/lib
641 639
642LINTLIBDIR?= /usr/libdata/lint 640LINTLIBDIR?= /usr/libdata/lint
643LIBGRP?= ${BINGRP} 641LIBGRP?= ${BINGRP}
644LIBOWN?= ${BINOWN} 642LIBOWN?= ${BINOWN}
645LIBMODE?= ${NONBINMODE} 643LIBMODE?= ${NONBINMODE}
646 644
647DOCDIR?= /usr/share/doc 645DOCDIR?= /usr/share/doc
648DOCGRP?= wheel 646DOCGRP?= wheel
649DOCOWN?= root 647DOCOWN?= root
650DOCMODE?= ${NONBINMODE} 648DOCMODE?= ${NONBINMODE}
651 649
652NLSDIR?= /usr/share/nls 650NLSDIR?= /usr/share/nls
653NLSGRP?= wheel 651NLSGRP?= wheel
654NLSOWN?= root 652NLSOWN?= root
655NLSMODE?= ${NONBINMODE} 653NLSMODE?= ${NONBINMODE}
656 654
657KMODULEGRP?= wheel 655KMODULEGRP?= wheel
658KMODULEOWN?= root 656KMODULEOWN?= root
659KMODULEMODE?= ${NONBINMODE} 657KMODULEMODE?= ${NONBINMODE}
660 658
661LOCALEDIR?= /usr/share/locale 659LOCALEDIR?= /usr/share/locale
662LOCALEGRP?= wheel 660LOCALEGRP?= wheel
663LOCALEOWN?= root 661LOCALEOWN?= root
664LOCALEMODE?= ${NONBINMODE} 662LOCALEMODE?= ${NONBINMODE}
665 663
666FIRMWAREDIR?= /libdata/firmware 664FIRMWAREDIR?= /libdata/firmware
667FIRMWAREGRP?= wheel 665FIRMWAREGRP?= wheel
668FIRMWAREOWN?= root 666FIRMWAREOWN?= root
669FIRMWAREMODE?= ${NONBINMODE} 667FIRMWAREMODE?= ${NONBINMODE}
670 668
671DEBUGDIR?= /usr/libdata/debug 669DEBUGDIR?= /usr/libdata/debug
672DEBUGGRP?= wheel 670DEBUGGRP?= wheel
673DEBUGOWN?= root 671DEBUGOWN?= root
674DEBUGMODE?= ${NONBINMODE} 672DEBUGMODE?= ${NONBINMODE}
675 673
676# 674#
677# Data-driven table using make variables to control how 675# Data-driven table using make variables to control how
678# toolchain-dependent targets and shared libraries are built 676# toolchain-dependent targets and shared libraries are built
679# for different platforms and object formats. 677# for different platforms and object formats.
680# 678#
681# OBJECT_FMT: currently either "ELF" or "a.out". 679# OBJECT_FMT: currently either "ELF" or "a.out".
682# 680#
683# All platforms are ELF. 681# All platforms are ELF.
684# 682#
685OBJECT_FMT= ELF 683OBJECT_FMT= ELF
686 684
687# 685#
688# If this platform's toolchain is missing, we obviously cannot build it. 686# If this platform's toolchain is missing, we obviously cannot build it.
689# 687#
690.if ${TOOLCHAIN_MISSING} != "no" 688.if ${TOOLCHAIN_MISSING} != "no"
691MKBINUTILS:= no 689MKBINUTILS:= no
692MKGDB:= no 690MKGDB:= no
693MKGCC:= no 691MKGCC:= no
694.endif 692.endif
695 693
696# 694#
697# If we are using an external toolchain, we can still build the target's 695# If we are using an external toolchain, we can still build the target's
698# binutils, but we cannot build GCC's support libraries, since those are 696# binutils, but we cannot build GCC's support libraries, since those are
699# tightly-coupled to the version of GCC being used. 697# tightly-coupled to the version of GCC being used.
700# 698#
701.if defined(EXTERNAL_TOOLCHAIN) 699.if defined(EXTERNAL_TOOLCHAIN)
702MKGCC:= no 700MKGCC:= no
703.endif 701.endif
704 702
705# 703#
706# The m68000 port is incomplete. 704# The m68000 port is incomplete.
707# 705#
708.if ${MACHINE_ARCH} == "m68000" 706.if ${MACHINE_ARCH} == "m68000"
709NOPIC= # defined 707NOPIC= # defined
710MKISCSI= no 708MKISCSI= no
711# XXX GCC 4 outputs mcount() calling sequences that try to load values 709# XXX GCC 4 outputs mcount() calling sequences that try to load values
712# from over 64KB away and this fails to assemble. 710# from over 64KB away and this fails to assemble.
713.if defined(HAVE_GCC) 711.if defined(HAVE_GCC)
714NOPROFILE= # defined 712NOPROFILE= # defined
715.endif 713.endif
716.endif 714.endif
717 715
718# 716#
719# The ia64 port is incomplete. 717# The ia64 port is incomplete.
720# 718#
721.if ${MACHINE_ARCH} == "ia64" 719.if ${MACHINE_ARCH} == "ia64"
722MKLINT= no 720MKLINT= no
723MKGDB= no 721MKGDB= no
724.endif 722.endif
725 723
726# 724#
727# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC), 725# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
728# not just shared libraries, so don't build the _pic version. 726# not just shared libraries, so don't build the _pic version.
729# 727#
730.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ 728.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
731 ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb" 729 ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
732MKPICLIB:= no 730MKPICLIB:= no
733.endif 731.endif
734 732
735# 733#
736# On VAX using ELF, all objects are PIC, not just shared libraries, 734# On VAX using ELF, all objects are PIC, not just shared libraries,
737# so don't build the _pic version. 735# so don't build the _pic version.
738# 736#
739.if ${MACHINE_ARCH} == "vax" 737.if ${MACHINE_ARCH} == "vax"
740MKPICLIB= no 738MKPICLIB= no
741.endif 739.endif
742 740
743# 741#
744# Location of the file that contains the major and minor numbers of the 742# Location of the file that contains the major and minor numbers of the
745# version of a shared library. If this file exists a shared library 743# version of a shared library. If this file exists a shared library
746# will be built by <bsd.lib.mk>. 744# will be built by <bsd.lib.mk>.
747# 745#
748SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 746SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
749 747
750# 748#
751# GNU sources and packages sometimes see architecture names differently. 749# GNU sources and packages sometimes see architecture names differently.
752# 750#
753GNU_ARCH.aarch64eb=aarch64_be 751GNU_ARCH.aarch64eb=aarch64_be
754GNU_ARCH.coldfire=m5407 752GNU_ARCH.coldfire=m5407
755GNU_ARCH.earm=arm 753GNU_ARCH.earm=arm
756GNU_ARCH.earmhf=arm 754GNU_ARCH.earmhf=arm
757GNU_ARCH.earmeb=armeb 755GNU_ARCH.earmeb=armeb
758GNU_ARCH.earmhfeb=armeb 756GNU_ARCH.earmhfeb=armeb
759GNU_ARCH.earmv4=armv4 757GNU_ARCH.earmv4=armv4
760GNU_ARCH.earmv4eb=armv4eb 758GNU_ARCH.earmv4eb=armv4eb
761GNU_ARCH.earmv5=arm 759GNU_ARCH.earmv5=arm
762GNU_ARCH.earmv5eb=armeb 760GNU_ARCH.earmv5eb=armeb
763GNU_ARCH.earmv6=armv6 761GNU_ARCH.earmv6=armv6
764GNU_ARCH.earmv6hf=armv6 762GNU_ARCH.earmv6hf=armv6
765GNU_ARCH.earmv6eb=armv6eb 763GNU_ARCH.earmv6eb=armv6eb
766GNU_ARCH.earmv6hfeb=armv6eb 764GNU_ARCH.earmv6hfeb=armv6eb
767GNU_ARCH.earmv7=armv7 765GNU_ARCH.earmv7=armv7
768GNU_ARCH.earmv7hf=armv7 766GNU_ARCH.earmv7hf=armv7
769GNU_ARCH.earmv7eb=armv7eb 767GNU_ARCH.earmv7eb=armv7eb
770GNU_ARCH.earmv7hfeb=armv7eb 768GNU_ARCH.earmv7hfeb=armv7eb
771GNU_ARCH.i386=i486 769GNU_ARCH.i386=i486
772GCC_CONFIG_ARCH.i386=i486 770GCC_CONFIG_ARCH.i386=i486
773GCC_CONFIG_TUNE.i386=nocona 771GCC_CONFIG_TUNE.i386=nocona
774GCC_CONFIG_TUNE.x86_64=nocona 772GCC_CONFIG_TUNE.x86_64=nocona
775GNU_ARCH.m68000=m68010 773GNU_ARCH.m68000=m68010
776GNU_ARCH.sh3eb=sh 774GNU_ARCH.sh3eb=sh
777GNU_ARCH.sh3el=shle 775GNU_ARCH.sh3el=shle
778GNU_ARCH.mips64eb=mips64 776GNU_ARCH.mips64eb=mips64
779MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 777MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
780 778
781# 779#
782# In order to identify NetBSD to GNU packages, we sometimes need 780# In order to identify NetBSD to GNU packages, we sometimes need
783# an "elf" tag for historically a.out platforms. 781# an "elf" tag for historically a.out platforms.
784# 782#
785.if (!empty(MACHINE_ARCH:Mearm*)) 783.if (!empty(MACHINE_ARCH:Mearm*))
786MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/} 784MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/}
787.elif (${MACHINE_GNU_ARCH} == "arm" || \ 785.elif (${MACHINE_GNU_ARCH} == "arm" || \
788 ${MACHINE_GNU_ARCH} == "armeb" || \ 786 ${MACHINE_GNU_ARCH} == "armeb" || \
789 ${MACHINE_ARCH} == "i386" || \ 787 ${MACHINE_ARCH} == "i386" || \
790 ${MACHINE_CPU} == "m68k" || \ 788 ${MACHINE_CPU} == "m68k" || \
791 ${MACHINE_GNU_ARCH} == "sh" || \ 789 ${MACHINE_GNU_ARCH} == "sh" || \
792 ${MACHINE_GNU_ARCH} == "shle" || \ 790 ${MACHINE_GNU_ARCH} == "shle" || \
793 ${MACHINE_ARCH} == "sparc" || \ 791 ${MACHINE_ARCH} == "sparc" || \
794 ${MACHINE_ARCH} == "vax") 792 ${MACHINE_ARCH} == "vax")
795MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 793MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
796.else 794.else
797MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 795MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
798.endif 796.endif
799 797
800.if !empty(MACHINE_ARCH:M*arm*) 798.if !empty(MACHINE_ARCH:M*arm*)
801# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. 799# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand.
802ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft 800ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft
803ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} 801ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
804.endif 802.endif
805 803
806GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :} 804GENASSYM_CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -no-integrated-as :}
807 805
808TARGETS+= all clean cleandir depend dependall includes \ 806TARGETS+= all clean cleandir depend dependall includes \
809 install lint obj regress tags html analyze 807 install lint obj regress tags html analyze
810PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 808PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
811 install lint obj regress beforedepend afterdepend \ 809 install lint obj regress beforedepend afterdepend \
812 beforeinstall afterinstall realinstall realdepend realall \ 810 beforeinstall afterinstall realinstall realdepend realall \
813 html subdir-all subdir-install subdir-depend analyze 811 html subdir-all subdir-install subdir-depend analyze
814.PHONY: ${PHONY_NOTMAIN} 812.PHONY: ${PHONY_NOTMAIN}
815.NOTMAIN: ${PHONY_NOTMAIN} 813.NOTMAIN: ${PHONY_NOTMAIN}
816 814
817.if ${NEED_OWN_INSTALL_TARGET} != "no" 815.if ${NEED_OWN_INSTALL_TARGET} != "no"
818.if !target(install) 816.if !target(install)
819install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 817install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
820beforeinstall: 818beforeinstall:
821subdir-install: 819subdir-install:
822realinstall: 820realinstall:
823afterinstall: 821afterinstall:
824.endif 822.endif
825all: realall subdir-all 823all: realall subdir-all
826subdir-all: 824subdir-all:
827realall: 825realall:
828depend: realdepend subdir-depend 826depend: realdepend subdir-depend
829subdir-depend: 827subdir-depend:
830realdepend: 828realdepend:
831distclean: cleandir 829distclean: cleandir
832cleandir: clean 830cleandir: clean
833 831
834dependall: .NOTMAIN realdepend .MAKE 832dependall: .NOTMAIN realdepend .MAKE
835 @cd "${.CURDIR}"; ${MAKE} realall 833 @cd "${.CURDIR}"; ${MAKE} realall
836.endif 834.endif
837 835
838# 836#
839# Define MKxxx variables (which are either yes or no) for users 837# Define MKxxx variables (which are either yes or no) for users
840# to set in /etc/mk.conf and override in the make environment. 838# to set in /etc/mk.conf and override in the make environment.
841# These should be tested with `== "no"' or `!= "no"'. 839# These should be tested with `== "no"' or `!= "no"'.
842# The NOxxx variables should only be set by Makefiles. 840# The NOxxx variables should only be set by Makefiles.
843# 841#
844# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync 842# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
845# with changes to the MK* variables here. 843# with changes to the MK* variables here.
846# 844#
847 845
848# 846#
849# Supported NO* options (if defined, MK* will be forced to "no", 847# Supported NO* options (if defined, MK* will be forced to "no",
850# regardless of user's mk.conf setting). 848# regardless of user's mk.conf setting).
851# 849#
852# Source makefiles should set NO*, and not MK*, and must do so before 850# Source makefiles should set NO*, and not MK*, and must do so before
853# including bsd.own.mk. 851# including bsd.own.mk.
854# 852#
855.for var in \ 853.for var in \
856 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \ 854 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
857 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB 855 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
858.if defined(${var}) 856.if defined(${var})
859MK${var:S/^NO//}:= no 857MK${var:S/^NO//}:= no
860.endif 858.endif
861.endfor 859.endfor
862 860
863# 861#
864# Older-style variables that enabled behaviour when set. 862# Older-style variables that enabled behaviour when set.
865# 863#
866.for var in MANZ UNPRIVED UPDATE 864.for var in MANZ UNPRIVED UPDATE
867.if defined(${var}) 865.if defined(${var})
868MK${var}:= yes 866MK${var}:= yes
869.endif 867.endif
870.endfor 868.endfor
871 869
872# 870#
873# MK* options which have variable defaults. 871# MK* options which have variable defaults.
874# 872#
875.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \ 873.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \
876 || ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \ 874 || ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \
877 || ${MACHINE_ARCH} == "powerpc64" 875 || ${MACHINE_ARCH} == "powerpc64"
878MKCOMPAT?= yes 876MKCOMPAT?= yes
879.elif !empty(MACHINE_ARCH:Mearm*) || ${MACHINE_CPU} == "aarch64" 877.elif !empty(MACHINE_ARCH:Mearm*) || ${MACHINE_CPU} == "aarch64"
880MKCOMPAT?= no 878MKCOMPAT?= no
881.else 879.else
882# Don't let this build where it really isn't supported. 880# Don't let this build where it really isn't supported.
883MKCOMPAT:= no 881MKCOMPAT:= no
884.endif 882.endif
885 883
886.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" || \ 884.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" || \
887 ${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc" 885 ${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc"
888MKCOMPATMODULES?= yes 886MKCOMPATMODULES?= yes
889.else 887.else
890MKCOMPATMODULES:= no 888MKCOMPATMODULES:= no
891.endif 889.endif
892 890
893# 891#
894# Default mips64 to softfloat now. 892# Default mips64 to softfloat now.
895# arm is always softfloat unless it isn't 893# arm is always softfloat unless it isn't
896# emips is always softfloat. 894# emips is always softfloat.
897# coldfire is always softfloat 895# coldfire is always softfloat
898# 896#
899.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" || \ 897.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" || \
900 (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \ 898 (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
901 ${MACHINE_ARCH} == "coldfire" || \ 899 ${MACHINE_ARCH} == "coldfire" || \
902 ${MACHINE} == "emips" 900 ${MACHINE} == "emips"
903MKSOFTFLOAT?= yes 901MKSOFTFLOAT?= yes
904.endif 902.endif
905 903
906.if ${MACHINE} == "emips" 904.if ${MACHINE} == "emips"
907SOFTFLOAT_BITS= 32 905SOFTFLOAT_BITS= 32
908.endif 906.endif
909 907
910.if ${MACHINE_ARCH} == "i386" || \ 908.if ${MACHINE_ARCH} == "i386" || \
911 ${MACHINE_ARCH} == "x86_64" || \ 909 ${MACHINE_ARCH} == "x86_64" || \
912 ${MACHINE_ARCH} == "sparc"  910 ${MACHINE_ARCH} == "sparc"
913MKSLJIT?= yes 911MKSLJIT?= yes
914.else 912.else
915MKSLJIT?= no 913MKSLJIT?= no
916.endif 914.endif
917 915
918# 916#
919# MK* backward compatibility. 917# MK* backward compatibility.
920# 918#
921.if defined(MKBFD) 919.if defined(MKBFD)
922MKBINUTILS?= ${MKBFD} 920MKBINUTILS?= ${MKBFD}
923.endif 921.endif
924 922
925# 923#
926# We want to build zfs only for i386 and amd64 by default for now. 924# We want to build zfs only for i386 and amd64 by default for now.
927# 925#
928.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" 926.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
929MKZFS?= yes 927MKZFS?= yes
930.endif 928.endif
931 929
932# 930#
933# MK* options which default to "yes". 931# MK* options which default to "yes".
934# 932#
935_MKVARS.yes= \ 933_MKVARS.yes= \
936 MKATF \ 934 MKATF \
937 MKBINUTILS \ 935 MKBINUTILS \
938 MKCRYPTO MKCOMPLEX MKCVS MKCXX \ 936 MKCRYPTO MKCOMPLEX MKCVS MKCXX \
939 MKDOC \ 937 MKDOC \
940 MKGCC MKGDB MKGROFF \ 938 MKGCC MKGDB MKGROFF \
941 MKHESIOD MKHTML \ 939 MKHESIOD MKHTML \
942 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \ 940 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
943 MKKERBEROS \ 941 MKKERBEROS \
944 MKKMOD \ 942 MKKMOD \
945 MKLDAP MKLIBSTDCXX MKLINKLIB MKLVM \ 943 MKLDAP MKLIBSTDCXX MKLINKLIB MKLVM \
946 MKMAN MKMANDOC \ 944 MKMAN MKMANDOC \
947 MKMDNS \ 945 MKMDNS \
948 MKMAKEMANDB \ 946 MKMAKEMANDB \
949 MKNLS \ 947 MKNLS \
950 MKNPF \ 948 MKNPF \
951 MKOBJ \ 949 MKOBJ \
952 MKPAM MKPERFUSE \ 950 MKPAM MKPERFUSE \
953 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \ 951 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
954 MKRUMP \ 952 MKRUMP \
955 MKSHARE MKSKEY MKSTATICLIB \ 953 MKSHARE MKSKEY MKSTATICLIB \
956 MKX11FONTS \ 954 MKX11FONTS \
957 MKYP 955 MKYP
958.for var in ${_MKVARS.yes} 956.for var in ${_MKVARS.yes}
959${var}?= yes 957${var}?= yes
960.endfor 958.endfor
961 959
962# 960#
963# MKGCCCMDS is only valid if we are building GCC so make it dependent on that. 961# MKGCCCMDS is only valid if we are building GCC so make it dependent on that.
964# 962#
965_MKVARS.yes += MKGCCCMDS 963_MKVARS.yes += MKGCCCMDS
966MKGCCCMDS?= ${MKGCC} 964MKGCCCMDS?= ${MKGCC}
967 965
968# 966#
969# Exceptions to the above: 967# Exceptions to the above:
970# 968#
971#.if ${MACHINE} == "evbppc" 969#.if ${MACHINE} == "evbppc"
972#MKKMOD= no 970#MKKMOD= no
973#.endif 971#.endif
974 972
975# 973#
976# MK* options which default to "no". Note that MKZFS has a different 974# MK* options which default to "no". Note that MKZFS has a different
977# default for some platforms, see above. 975# default for some platforms, see above.
978# 976#
979_MKVARS.no= \ 977_MKVARS.no= \
980 MKBSDGREP MKBSDTAR \ 978 MKBSDGREP MKBSDTAR \
981 MKCATPAGES MKCRYPTO_RC5 MKCTF MKDEBUG \ 979 MKCATPAGES MKCRYPTO_RC5 MKCTF MKDEBUG \
982 MKDEBUGLIB MKDTRACE MKEXTSRC MKGROFFHTMLDOC \ 980 MKDEBUGLIB MKDTRACE MKEXTSRC MKGROFFHTMLDOC \
983 MKKYUA MKLLD MKLLDB MKLINT \ 981 MKKYUA MKLLD MKLLDB MKLINT \
984 MKMANZ MKMCLINKER MKOBJDIRS \ 982 MKMANZ MKMCLINKER MKOBJDIRS \
985 MKLIBCXX MKLLVM MKPCC \ 983 MKLIBCXX MKLLVM MKPCC \
986 MKPIGZGZIP \ 984 MKPIGZGZIP \
987 MKREPRO \ 985 MKREPRO \
988 MKSOFTFLOAT MKSTRIPIDENT MKTPM \ 986 MKSOFTFLOAT MKSTRIPIDENT MKTPM \
989 MKUNPRIVED MKUPDATE MKX11 MKX11MOTIF MKZFS 987 MKUNPRIVED MKUPDATE MKX11 MKX11MOTIF MKZFS
990.for var in ${_MKVARS.no} 988.for var in ${_MKVARS.no}
991${var}?=no 989${var}?=no
992.endfor 990.endfor
993 991
994# 992#
995# Do we default to XFree86 or Xorg for this platform? 993# Do we default to XFree86 or Xorg for this platform?
996# 994#
997.if \ 995.if \
998 ${MACHINE} == "acorn32" || \ 996 ${MACHINE} == "acorn32" || \
999 ${MACHINE} == "alpha" || \ 997 ${MACHINE} == "alpha" || \
1000 ${MACHINE} == "amiga" || \ 998 ${MACHINE} == "amiga" || \
1001 ${MACHINE} == "mac68k" || \ 999 ${MACHINE} == "mac68k" || \
1002 ${MACHINE} == "pmax" || \ 1000 ${MACHINE} == "pmax" || \
1003 ${MACHINE} == "sun3" 1001 ${MACHINE} == "sun3"
1004X11FLAVOUR?= XFree86 1002X11FLAVOUR?= XFree86
1005.else 1003.else
1006X11FLAVOUR?= Xorg 1004X11FLAVOUR?= Xorg
1007.endif 1005.endif
1008 1006
1009# 1007#
1010# Which platforms build the xorg-server drivers (as opposed 1008# Which platforms build the xorg-server drivers (as opposed
1011# to just Xnest and Xvfb.) 1009# to just Xnest and Xvfb.)
1012# 1010#
1013.if ${X11FLAVOUR} == "Xorg" && ( \ 1011.if ${X11FLAVOUR} == "Xorg" && ( \
1014 ${MACHINE} == "alpha" || \ 1012 ${MACHINE} == "alpha" || \
1015 ${MACHINE} == "amd64" || \ 1013 ${MACHINE} == "amd64" || \
1016 ${MACHINE} == "bebox" || \ 1014 ${MACHINE} == "bebox" || \
1017 ${MACHINE} == "cats" || \ 1015 ${MACHINE} == "cats" || \
1018 ${MACHINE} == "dreamcast" || \ 1016 ${MACHINE} == "dreamcast" || \
1019 ${MACHINE} == "ews4800mips" || \ 1017 ${MACHINE} == "ews4800mips" || \
1020 ${MACHINE} == "evbarm" || \ 1018 ${MACHINE} == "evbarm" || \
1021 ${MACHINE} == "evbmips" || \ 1019 ${MACHINE} == "evbmips" || \
1022 ${MACHINE} == "hp300" || \ 1020 ${MACHINE} == "hp300" || \
1023 ${MACHINE} == "hpcarm" || \ 1021 ${MACHINE} == "hpcarm" || \
1024 ${MACHINE} == "hpcmips" || \ 1022 ${MACHINE} == "hpcmips" || \
1025 ${MACHINE} == "hpcsh" || \ 1023 ${MACHINE} == "hpcsh" || \
1026 ${MACHINE} == "i386" || \ 1024 ${MACHINE} == "i386" || \
1027 ${MACHINE} == "luna68k" || \ 1025 ${MACHINE} == "luna68k" || \
1028 ${MACHINE} == "macppc" || \ 1026 ${MACHINE} == "macppc" || \
1029 ${MACHINE} == "netwinder" || \ 1027 ${MACHINE} == "netwinder" || \
1030 ${MACHINE} == "newsmips" || \ 1028 ${MACHINE} == "newsmips" || \
1031 ${MACHINE} == "prep" || \ 1029 ${MACHINE} == "prep" || \
1032 ${MACHINE} == "ofppc" || \ 1030 ${MACHINE} == "ofppc" || \
1033 ${MACHINE} == "sgimips" || \ 1031 ${MACHINE} == "sgimips" || \
1034 ${MACHINE} == "shark" || \ 1032 ${MACHINE} == "shark" || \
1035 ${MACHINE} == "sparc" || \ 1033 ${MACHINE} == "sparc" || \
1036 ${MACHINE} == "sparc64" || \ 1034 ${MACHINE} == "sparc64" || \
1037 ${MACHINE} == "vax" || \ 1035 ${MACHINE} == "vax" || \
1038 ${MACHINE} == "zaurus" ) 1036 ${MACHINE} == "zaurus" )
1039MKXORG_SERVER?=yes 1037MKXORG_SERVER?=yes
1040.else 1038.else
1041MKXORG_SERVER?=no 1039MKXORG_SERVER?=no
1042.endif 1040.endif
1043 1041
1044# 1042#
1045# Force some options off if their dependencies are off. 1043# Force some options off if their dependencies are off.
1046# 1044#
1047 1045
1048.if ${MKCXX} == "no" 1046.if ${MKCXX} == "no"
1049MKATF:= no 1047MKATF:= no
1050MKGROFF:= no 1048MKGROFF:= no
1051MKKYUA:= no 1049MKKYUA:= no
1052.endif 1050.endif
1053 1051
1054.if ${MKCRYPTO} == "no" 1052.if ${MKCRYPTO} == "no"
1055MKKERBEROS:= no 1053MKKERBEROS:= no
1056MKLDAP:= no 1054MKLDAP:= no
1057.endif 1055.endif
1058 1056
1059.if ${MKMAN} == "no" 1057.if ${MKMAN} == "no"
1060MKCATPAGES:= no 1058MKCATPAGES:= no
1061MKHTML:= no 1059MKHTML:= no
1062.endif 1060.endif
1063 1061
1064_MANINSTALL= maninstall 1062_MANINSTALL= maninstall
1065.if ${MKCATPAGES} != "no" 1063.if ${MKCATPAGES} != "no"
1066_MANINSTALL+= catinstall 1064_MANINSTALL+= catinstall
1067.endif 1065.endif
1068.if ${MKHTML} != "no" 1066.if ${MKHTML} != "no"
1069_MANINSTALL+= htmlinstall 1067_MANINSTALL+= htmlinstall
1070.endif 1068.endif
1071 1069
1072.if ${MKLINKLIB} == "no" 1070.if ${MKLINKLIB} == "no"
1073MKLINT:= no 1071MKLINT:= no
1074MKPICINSTALL:= no 1072MKPICINSTALL:= no
1075MKPROFILE:= no 1073MKPROFILE:= no
1076.endif 1074.endif