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