2 # arch/blackfin/Makefile
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
10 CROSS_COMPILE ?= bfin-uclinux-
12 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
15 CFLAGS_MODULE += -mlong-calls
16 KALLSYMS += --symbol-prefix=_
18 KBUILD_DEFCONFIG := BF537-STAMP_defconfig
20 # setup the machine name and the machine dependent settings
21 machine-$(CONFIG_BF522) := bf527
22 machine-$(CONFIG_BF525) := bf527
23 machine-$(CONFIG_BF527) := bf527
24 machine-$(CONFIG_BF531) := bf533
25 machine-$(CONFIG_BF532) := bf533
26 machine-$(CONFIG_BF533) := bf533
27 machine-$(CONFIG_BF534) := bf537
28 machine-$(CONFIG_BF536) := bf537
29 machine-$(CONFIG_BF537) := bf537
30 machine-$(CONFIG_BF542) := bf548
31 machine-$(CONFIG_BF544) := bf548
32 machine-$(CONFIG_BF548) := bf548
33 machine-$(CONFIG_BF549) := bf548
34 machine-$(CONFIG_BF561) := bf561
35 MACHINE := $(machine-y)
38 cpu-$(CONFIG_BF522) := bf522
39 cpu-$(CONFIG_BF525) := bf525
40 cpu-$(CONFIG_BF527) := bf527
41 cpu-$(CONFIG_BF531) := bf531
42 cpu-$(CONFIG_BF532) := bf532
43 cpu-$(CONFIG_BF533) := bf533
44 cpu-$(CONFIG_BF534) := bf534
45 cpu-$(CONFIG_BF536) := bf536
46 cpu-$(CONFIG_BF537) := bf537
47 cpu-$(CONFIG_BF542) := bf542
48 cpu-$(CONFIG_BF544) := bf544
49 cpu-$(CONFIG_BF548) := bf548
50 cpu-$(CONFIG_BF549) := bf549
51 cpu-$(CONFIG_BF561) := bf561
53 rev-$(CONFIG_BF_REV_0_0) := 0.0
54 rev-$(CONFIG_BF_REV_0_1) := 0.1
55 rev-$(CONFIG_BF_REV_0_2) := 0.2
56 rev-$(CONFIG_BF_REV_0_3) := 0.3
57 rev-$(CONFIG_BF_REV_0_4) := 0.4
58 rev-$(CONFIG_BF_REV_0_5) := 0.5
59 rev-$(CONFIG_BF_REV_NONE) := none
60 rev-$(CONFIG_BF_REV_ANY) := any
62 KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
63 KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
65 head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
67 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
69 # If we have a machine-specific directory, then include it in the build.
71 core-y += arch/$(ARCH)/mach-$(MACHINE)/
72 core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
75 libs-y += arch/$(ARCH)/lib/
77 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
81 # Update machine arch symlinks if something which affects
82 # them changed. We use .mach to indicate when they were updated
83 # last, otherwise make uses the target directory mtime.
85 include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
86 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
87 ifneq ($(KBUILD_SRC),)
88 $(Q)mkdir -p include/asm-$(ARCH)
89 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
91 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
96 include/asm-$(ARCH)/asm-offsets.h \
97 arch/$(ARCH)/kernel/asm-offsets.s \
98 include/asm-$(ARCH)/mach \
99 include/asm-$(ARCH)/.mach
101 archprepare: include/asm-blackfin/.mach
103 $(Q)$(MAKE) $(clean)=$(boot)
107 boot := arch/$(ARCH)/boot
108 BOOT_TARGETS = vmImage
109 .PHONY: $(BOOT_TARGETS)
110 $(BOOT_TARGETS): vmlinux
111 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
113 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'