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_BF561) := bf561
28 MACHINE := $(machine-y)
32 head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
34 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
36 # If we have a machine-specific directory, then include it in the build.
38 core-y += arch/$(ARCH)/mach-$(MACHINE)/
39 core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
42 libs-y += arch/$(ARCH)/lib/
44 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
48 # Update machine arch symlinks if something which affects
49 # them changed. We use .mach to indicate when they were updated
50 # last, otherwise make uses the target directory mtime.
52 include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
53 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
54 ifneq ($(KBUILD_SRC),)
55 $(Q)mkdir -p include/asm-$(ARCH)
56 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
58 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
63 include/asm-$(ARCH)/asm-offsets.h \
64 arch/$(ARCH)/kernel/asm-offsets.s \
65 include/asm-$(ARCH)/mach \
66 include/asm-$(ARCH)/.mach
68 archprepare: include/asm-blackfin/.mach
70 $(Q)$(MAKE) $(clean)=$(boot)
74 boot := arch/$(ARCH)/boot
75 BOOT_TARGETS = vmImage
76 .PHONY: $(BOOT_TARGETS)
77 $(BOOT_TARGETS): vmlinux
78 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
80 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'