blob: 6971a4418dfe5886083427c07031fc1e554d5f28 [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001#
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
10CROSS_COMPILE ?= bfin-uclinux-
11LDFLAGS_vmlinux := -X
12OBJCOPYFLAGS := -O binary -R .note -R .comment -S
13GZFLAGS := -9
14
15CFLAGS_MODULE += -mlong-calls
16KALLSYMS += --symbol-prefix=_
17
Mike Frysingerca9cb6f2007-05-21 18:09:35 +080018KBUILD_DEFCONFIG := BF537-STAMP_defconfig
Bryan Wu1394f032007-05-06 14:50:22 -070019
20# setup the machine name and the machine dependent settings
21machine-$(CONFIG_BF531) := bf533
22machine-$(CONFIG_BF532) := bf533
23machine-$(CONFIG_BF533) := bf533
24machine-$(CONFIG_BF534) := bf537
25machine-$(CONFIG_BF536) := bf537
26machine-$(CONFIG_BF537) := bf537
27machine-$(CONFIG_BF561) := bf561
28MACHINE := $(machine-y)
29export MACHINE
30
Jie Zhangde3025f2007-06-25 18:04:12 +080031cpu-$(CONFIG_BF531) := bf531
32cpu-$(CONFIG_BF532) := bf532
33cpu-$(CONFIG_BF533) := bf533
34cpu-$(CONFIG_BF534) := bf534
35cpu-$(CONFIG_BF536) := bf536
36cpu-$(CONFIG_BF537) := bf537
37cpu-$(CONFIG_BF548) := bf548
38cpu-$(CONFIG_BF549) := bf549
39cpu-$(CONFIG_BF561) := bf561
40
41rev-$(CONFIG_BF_REV_0_0) := 0.0
42rev-$(CONFIG_BF_REV_0_1) := 0.1
43rev-$(CONFIG_BF_REV_0_2) := 0.2
44rev-$(CONFIG_BF_REV_0_3) := 0.3
45rev-$(CONFIG_BF_REV_0_4) := 0.4
46rev-$(CONFIG_BF_REV_0_5) := 0.5
47rev-$(CONFIG_BF_REV_NONE) := none
48rev-$(CONFIG_BF_REV_ANY) := any
49
50CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
51AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
Bryan Wu1394f032007-05-06 14:50:22 -070052
53head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
54
55core-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.
58ifneq ($(machine-y),)
59core-y += arch/$(ARCH)/mach-$(MACHINE)/
60core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
61endif
62
63libs-y += arch/$(ARCH)/lib/
64
65drivers-$(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
73include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
74 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
75ifneq ($(KBUILD_SRC),)
76 $(Q)mkdir -p include/asm-$(ARCH)
77 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
78else
79 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
80endif
81 @touch $@
82
83CLEAN_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
89archprepare: include/asm-blackfin/.mach
90archclean:
91 $(Q)$(MAKE) $(clean)=$(boot)
92
93
94all: vmImage
95boot := arch/$(ARCH)/boot
96BOOT_TARGETS = vmImage
97.PHONY: $(BOOT_TARGETS)
98$(BOOT_TARGETS): vmlinux
99 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
100define archhelp
101 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
102endef