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_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_BF548) := bf548
28 machine-$(CONFIG_BF549) := bf548
29 machine-$(CONFIG_BF561) := bf561
30 MACHINE := $(machine-y)
33 cpu-$(CONFIG_BF531) := bf531
34 cpu-$(CONFIG_BF532) := bf532
35 cpu-$(CONFIG_BF533) := bf533
36 cpu-$(CONFIG_BF534) := bf534
37 cpu-$(CONFIG_BF536) := bf536
38 cpu-$(CONFIG_BF537) := bf537
39 cpu-$(CONFIG_BF548) := bf548
40 cpu-$(CONFIG_BF549) := bf549
41 cpu-$(CONFIG_BF561) := bf561
43 rev-$(CONFIG_BF_REV_0_0) := 0.0
44 rev-$(CONFIG_BF_REV_0_1) := 0.1
45 rev-$(CONFIG_BF_REV_0_2) := 0.2
46 rev-$(CONFIG_BF_REV_0_3) := 0.3
47 rev-$(CONFIG_BF_REV_0_4) := 0.4
48 rev-$(CONFIG_BF_REV_0_5) := 0.5
49 rev-$(CONFIG_BF_REV_NONE) := none
50 rev-$(CONFIG_BF_REV_ANY) := any
52 CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
53 AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
55 head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
57 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
59 # If we have a machine-specific directory, then include it in the build.
61 core-y += arch/$(ARCH)/mach-$(MACHINE)/
62 core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
65 libs-y += arch/$(ARCH)/lib/
67 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
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.
75 include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
76 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
77 ifneq ($(KBUILD_SRC),)
78 $(Q)mkdir -p include/asm-$(ARCH)
79 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
81 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
86 include/asm-$(ARCH)/asm-offsets.h \
87 arch/$(ARCH)/kernel/asm-offsets.s \
88 include/asm-$(ARCH)/mach \
89 include/asm-$(ARCH)/.mach
91 archprepare: include/asm-blackfin/.mach
93 $(Q)$(MAKE) $(clean)=$(boot)
97 boot := arch/$(ARCH)/boot
98 BOOT_TARGETS = vmImage
99 .PHONY: $(BOOT_TARGETS)
100 $(BOOT_TARGETS): vmlinux
101 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
103 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'