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