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=_
19 # setup the machine name and the machine dependent settings
20 machine-$(CONFIG_BF531) := bf533
21 machine-$(CONFIG_BF532) := bf533
22 machine-$(CONFIG_BF533) := bf533
23 machine-$(CONFIG_BF534) := bf537
24 machine-$(CONFIG_BF536) := bf537
25 machine-$(CONFIG_BF537) := bf537
26 machine-$(CONFIG_BF561) := bf561
27 MACHINE := $(machine-y)
31 head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
33 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
35 # If we have a machine-specific directory, then include it in the build.
37 core-y += arch/$(ARCH)/mach-$(MACHINE)/
38 core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
41 libs-y += arch/$(ARCH)/lib/
43 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
47 # Update machine arch symlinks if something which affects
48 # them changed. We use .mach to indicate when they were updated
49 # last, otherwise make uses the target directory mtime.
51 include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
52 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
53 ifneq ($(KBUILD_SRC),)
54 $(Q)mkdir -p include/asm-$(ARCH)
55 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
57 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
62 include/asm-$(ARCH)/asm-offsets.h \
63 arch/$(ARCH)/kernel/asm-offsets.s \
64 include/asm-$(ARCH)/mach \
65 include/asm-$(ARCH)/.mach
67 archprepare: include/asm-blackfin/.mach
69 $(Q)$(MAKE) $(clean)=$(boot)
73 boot := arch/$(ARCH)/boot
74 BOOT_TARGETS = vmImage
75 .PHONY: $(BOOT_TARGETS)
76 $(BOOT_TARGETS): vmlinux
77 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
79 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'