229 # Windows builds default to the appropriate for the underlaying |
229 # Windows builds default to the appropriate for the underlaying |
230 # architecture. |
230 # architecture. |
231 # Temporary disk area |
231 # Temporary disk area |
232 TEMP_DISK=C:/temp |
232 TEMP_DISK=C:/temp |
233 # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
233 # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always |
234 # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
234 # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead. |
235 PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
235 # And sometimes PROCESSOR_IDENTIFIER is not defined at all |
236 PROC_ARCH:=$(subst x86,X86,$(PROC_ARCH)) |
236 # (in some restricted shells), so we use uname if we have to. |
237 PROC_ARCH:=$(subst Intel64,X64,$(PROC_ARCH)) |
237 ifeq ($(PROCESSOR_IDENTIFIER),) |
238 PROC_ARCH:=$(subst em64t,X64,$(PROC_ARCH)) |
238 PROC_ARCH:=$(shell uname -m) |
239 PROC_ARCH:=$(subst EM64T,X64,$(PROC_ARCH)) |
239 else |
240 PROC_ARCH:=$(subst amd64,X64,$(PROC_ARCH)) |
240 PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER)) |
241 PROC_ARCH:=$(subst AMD64,X64,$(PROC_ARCH)) |
241 endif |
242 PROC_ARCH:=$(subst ia64,IA64,$(PROC_ARCH)) |
242 # Cover all the possibilities, MKS uname, CYGWIN uname, PROCESSOR_IDENTIFIER |
|
243 # Get: X86, X64, or IA64 |
|
244 PROC_ARCH:=$(patsubst 386,X86,$(PROC_ARCH)) |
|
245 PROC_ARCH:=$(patsubst 486,X86,$(PROC_ARCH)) |
|
246 PROC_ARCH:=$(patsubst 586,X86,$(PROC_ARCH)) |
|
247 PROC_ARCH:=$(patsubst 686,X86,$(PROC_ARCH)) |
|
248 PROC_ARCH:=$(patsubst i386,X86,$(PROC_ARCH)) |
|
249 PROC_ARCH:=$(patsubst i486,X86,$(PROC_ARCH)) |
|
250 PROC_ARCH:=$(patsubst i586,X86,$(PROC_ARCH)) |
|
251 PROC_ARCH:=$(patsubst i686,X86,$(PROC_ARCH)) |
|
252 PROC_ARCH:=$(patsubst x86,X86,$(PROC_ARCH)) |
|
253 PROC_ARCH:=$(patsubst intel64,X64,$(PROC_ARCH)) |
|
254 PROC_ARCH:=$(patsubst Intel64,X64,$(PROC_ARCH)) |
|
255 PROC_ARCH:=$(patsubst INTEL64,X64,$(PROC_ARCH)) |
|
256 PROC_ARCH:=$(patsubst em64t,X64,$(PROC_ARCH)) |
|
257 PROC_ARCH:=$(patsubst EM64T,X64,$(PROC_ARCH)) |
|
258 PROC_ARCH:=$(patsubst amd64,X64,$(PROC_ARCH)) |
|
259 PROC_ARCH:=$(patsubst AMD64,X64,$(PROC_ARCH)) |
|
260 PROC_ARCH:=$(patsubst 8664,X64,$(PROC_ARCH)) |
|
261 PROC_ARCH:=$(patsubst x86_64,X64,$(PROC_ARCH)) |
|
262 PROC_ARCH:=$(patsubst ia64,IA64,$(PROC_ARCH)) |
243 ifndef ARCH_DATA_MODEL |
263 ifndef ARCH_DATA_MODEL |
244 ifeq ($(PROC_ARCH),IA64) |
264 ifeq ($(PROC_ARCH),IA64) |
245 ARCH_DATA_MODEL=64 |
265 ARCH_DATA_MODEL=64 |
246 else |
266 else |
247 ifeq ($(PROC_ARCH),X64) |
267 ifeq ($(PROC_ARCH),X64) |