Remove trailing whitespace where it's not in madwifi-dfs branch
[madwifi/.git] / scripts / get_arch.mk
1 # Calculate ARCH based on the included Linux .config file.  This should
2 # cover all architectures supported by Linux 2.4 and 2.6 whether they
3 # are supported by MadWifi or not.  Note that more specific entries must
4 # follow less specific ones, e.g. CONFIG_X86_64 overrides CONFIG_X86.
5
6 ARCH-$(CONFIG_ALPHA) = alpha
7 ARCH-$(CONFIG_ARM) = arm
8 ARCH-$(CONFIG_ARM26) = arm26
9 ARCH-$(CONFIG_CRIS) = cris
10 ARCH-$(CONFIG_FRV) = frv
11 ARCH-$(CONFIG_H8300) = h8300
12 ARCH-$(CONFIG_X86) = i386
13 ARCH-$(CONFIG_IA64) = ia64
14 ARCH-$(CONFIG_M32R) = m32r
15 ARCH-$(CONFIG_M68K) = m68k
16 ARCH-$(CONFIG_M68KNOMMU) = m68knommu
17 ARCH-$(CONFIG_MIPS) = mips
18 ARCH-$(CONFIG_MIPS64) = mips64
19 ARCH-$(CONFIG_PARISC) = parisc
20 ARCH-$(CONFIG_PPC) = ppc
21 ARCH-$(CONFIG_PPC64) = ppc64
22 ARCH-$(CONFIG_PPC_MERGE) = powerpc
23 ARCH-$(CONFIG_ARCH-S390) = s390
24 ARCH-$(CONFIG_ARCH-S390X) = s390x
25 ARCH-$(CONFIG_SUPERH) = sh
26 ARCH-$(CONFIG_CPU_SH5) = sh64
27 ARCH-$(CONFIG_SUPERH64) = sh64
28 ARCH-$(CONFIG_SPARC32) = sparc
29 ARCH-$(CONFIG_SPARC64) = sparc64
30 ARCH-$(CONFIG_UML) = um
31 ARCH-$(CONFIG_V850) = v850
32 ARCH-$(CONFIG_X86_64) = x86_64
33 ARCH-$(CONFIG_XTENSA) = xtensa
34
35 ifeq (,$(ARCH-y))
36 $(Cannot determine ARCH)
37 endif
38
39 # Allow ARCH to be x86
40 ifneq (,$(CONFIG_X86))
41 ifeq (x86,$(ARCH))
42 ARCH-y = $(ARCH)
43 endif
44 endif
45
46 # Don't allow ARCH to be overridden by a different value.
47 ifeq (,$(ARCH))
48 ARCH = $(ARCH-y)
49 else
50 ifneq ($(ARCH),$(ARCH-y))
51 $(error ARCH mismatch: supplied "$(ARCH)", determined "$(ARCH-y)")
52 endif
53 endif