blob: 52d4dbdb2b1aeb4c843d4f2b5c8e33d081902c55 [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
18
19# setup the machine name and the machine dependent settings
20machine-$(CONFIG_BF531) := bf533
21machine-$(CONFIG_BF532) := bf533
22machine-$(CONFIG_BF533) := bf533
23machine-$(CONFIG_BF534) := bf537
24machine-$(CONFIG_BF536) := bf537
25machine-$(CONFIG_BF537) := bf537
26machine-$(CONFIG_BF561) := bf561
27MACHINE := $(machine-y)
28export MACHINE
29
30
31head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
32
33core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
34
35# If we have a machine-specific directory, then include it in the build.
36ifneq ($(machine-y),)
37core-y += arch/$(ARCH)/mach-$(MACHINE)/
38core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
39endif
40
41libs-y += arch/$(ARCH)/lib/
42
43drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
44
45
46
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.
50
51include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
52 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
53ifneq ($(KBUILD_SRC),)
54 $(Q)mkdir -p include/asm-$(ARCH)
55 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
56else
57 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
58endif
59 @touch $@
60
61CLEAN_FILES += \
62 include/asm-$(ARCH)/asm-offsets.h \
63 arch/$(ARCH)/kernel/asm-offsets.s \
64 include/asm-$(ARCH)/mach \
65 include/asm-$(ARCH)/.mach
66
67archprepare: include/asm-blackfin/.mach
68archclean:
69 $(Q)$(MAKE) $(clean)=$(boot)
70
71
72all: vmImage
73boot := arch/$(ARCH)/boot
74BOOT_TARGETS = vmImage
75.PHONY: $(BOOT_TARGETS)
76$(BOOT_TARGETS): vmlinux
77 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
78define archhelp
79 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
80endef