blob: 1b75672dfc8f8800484463b326f623d6b8bde412 [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
Roy Huang24a07a12007-07-12 22:41:45 +080027machine-$(CONFIG_BF548) := bf548
28machine-$(CONFIG_BF549) := bf548
Bryan Wu1394f032007-05-06 14:50:22 -070029machine-$(CONFIG_BF561) := bf561
30MACHINE := $(machine-y)
31export MACHINE
32
Jie Zhangde3025f2007-06-25 18:04:12 +080033cpu-$(CONFIG_BF531) := bf531
34cpu-$(CONFIG_BF532) := bf532
35cpu-$(CONFIG_BF533) := bf533
36cpu-$(CONFIG_BF534) := bf534
37cpu-$(CONFIG_BF536) := bf536
38cpu-$(CONFIG_BF537) := bf537
39cpu-$(CONFIG_BF548) := bf548
40cpu-$(CONFIG_BF549) := bf549
41cpu-$(CONFIG_BF561) := bf561
42
43rev-$(CONFIG_BF_REV_0_0) := 0.0
44rev-$(CONFIG_BF_REV_0_1) := 0.1
45rev-$(CONFIG_BF_REV_0_2) := 0.2
46rev-$(CONFIG_BF_REV_0_3) := 0.3
47rev-$(CONFIG_BF_REV_0_4) := 0.4
48rev-$(CONFIG_BF_REV_0_5) := 0.5
49rev-$(CONFIG_BF_REV_NONE) := none
50rev-$(CONFIG_BF_REV_ANY) := any
51
52CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
53AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
Bryan Wu1394f032007-05-06 14:50:22 -070054
55head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
56
57core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
58
59# If we have a machine-specific directory, then include it in the build.
60ifneq ($(machine-y),)
61core-y += arch/$(ARCH)/mach-$(MACHINE)/
62core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
63endif
64
65libs-y += arch/$(ARCH)/lib/
66
67drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
68
69
70
71# Update machine arch symlinks if something which affects
72# them changed. We use .mach to indicate when they were updated
73# last, otherwise make uses the target directory mtime.
74
75include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
76 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
77ifneq ($(KBUILD_SRC),)
78 $(Q)mkdir -p include/asm-$(ARCH)
79 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
80else
81 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
82endif
83 @touch $@
84
85CLEAN_FILES += \
86 include/asm-$(ARCH)/asm-offsets.h \
87 arch/$(ARCH)/kernel/asm-offsets.s \
88 include/asm-$(ARCH)/mach \
89 include/asm-$(ARCH)/.mach
90
91archprepare: include/asm-blackfin/.mach
92archclean:
93 $(Q)$(MAKE) $(clean)=$(boot)
94
95
96all: vmImage
97boot := arch/$(ARCH)/boot
98BOOT_TARGETS = vmImage
99.PHONY: $(BOOT_TARGETS)
100$(BOOT_TARGETS): vmlinux
101 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
102define archhelp
103 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
104endef