]> err.no Git - linux-2.6/blob - arch/blackfin/Makefile
Blackfin arch: Add proper -mcpu option according to the cpu and silicon revision...
[linux-2.6] / arch / blackfin / Makefile
1 #
2 # arch/blackfin/Makefile
3 #
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License.  See the file "COPYING" in the main directory of this archive
6 # for more details.
7 #
8
9
10 CROSS_COMPILE    ?= bfin-uclinux-
11 LDFLAGS_vmlinux  := -X
12 OBJCOPYFLAGS     := -O binary -R .note -R .comment -S
13 GZFLAGS          := -9
14
15 CFLAGS_MODULE    += -mlong-calls
16 KALLSYMS         += --symbol-prefix=_
17
18 KBUILD_DEFCONFIG := BF537-STAMP_defconfig
19
20 # setup the machine name and the machine dependent settings
21 machine-$(CONFIG_BF531) := bf533
22 machine-$(CONFIG_BF532) := bf533
23 machine-$(CONFIG_BF533) := bf533
24 machine-$(CONFIG_BF534) := bf537
25 machine-$(CONFIG_BF536) := bf537
26 machine-$(CONFIG_BF537) := bf537
27 machine-$(CONFIG_BF561) := bf561
28 MACHINE := $(machine-y)
29 export MACHINE
30
31 cpu-$(CONFIG_BF531) := bf531
32 cpu-$(CONFIG_BF532) := bf532
33 cpu-$(CONFIG_BF533) := bf533
34 cpu-$(CONFIG_BF534) := bf534
35 cpu-$(CONFIG_BF536) := bf536
36 cpu-$(CONFIG_BF537) := bf537
37 cpu-$(CONFIG_BF548) := bf548
38 cpu-$(CONFIG_BF549) := bf549
39 cpu-$(CONFIG_BF561) := bf561
40
41 rev-$(CONFIG_BF_REV_0_0)  := 0.0
42 rev-$(CONFIG_BF_REV_0_1)  := 0.1
43 rev-$(CONFIG_BF_REV_0_2)  := 0.2
44 rev-$(CONFIG_BF_REV_0_3)  := 0.3
45 rev-$(CONFIG_BF_REV_0_4)  := 0.4
46 rev-$(CONFIG_BF_REV_0_5)  := 0.5
47 rev-$(CONFIG_BF_REV_NONE) := none
48 rev-$(CONFIG_BF_REV_ANY)  := any
49
50 CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
51 AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
52
53 head-y   := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
54
55 core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
56
57 # If we have a machine-specific directory, then include it in the build.
58 ifneq ($(machine-y),)
59 core-y   += arch/$(ARCH)/mach-$(MACHINE)/
60 core-y   += arch/$(ARCH)/mach-$(MACHINE)/boards/
61 endif
62
63 libs-y   += arch/$(ARCH)/lib/
64
65 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
66
67
68
69 #       Update machine arch symlinks if something which affects
70 #       them changed.  We use .mach to indicate when they were updated
71 #       last, otherwise make uses the target directory mtime.
72
73 include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
74         @echo '  SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
75 ifneq ($(KBUILD_SRC),)
76         $(Q)mkdir -p include/asm-$(ARCH)
77         $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
78 else
79         $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
80 endif
81         @touch $@
82
83 CLEAN_FILES += \
84         include/asm-$(ARCH)/asm-offsets.h \
85         arch/$(ARCH)/kernel/asm-offsets.s \
86         include/asm-$(ARCH)/mach \
87         include/asm-$(ARCH)/.mach
88
89 archprepare: include/asm-blackfin/.mach
90 archclean:
91         $(Q)$(MAKE) $(clean)=$(boot)
92
93
94 all: vmImage
95 boot := arch/$(ARCH)/boot
96 BOOT_TARGETS = vmImage
97 .PHONY: $(BOOT_TARGETS)
98 $(BOOT_TARGETS): vmlinux
99         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
100 define archhelp
101   echo  '* vmImage         - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
102 endef