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