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