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