Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[sfrench/cifs-2.6.git] / arch / blackfin / Makefile
1 #
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
10 CROSS_COMPILE    ?= bfin-uclinux-
11 LDFLAGS_vmlinux  := -X
12 OBJCOPYFLAGS     := -O binary -R .note -R .comment -S
13 GZFLAGS          := -9
14
15 CFLAGS_MODULE    += -mlong-calls
16 KALLSYMS         += --symbol-prefix=_
17
18 KBUILD_DEFCONFIG := BF537-STAMP_defconfig
19
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)
29 export MACHINE
30
31
32 head-y   := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
33
34 core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
35
36 # If we have a machine-specific directory, then include it in the build.
37 ifneq ($(machine-y),)
38 core-y   += arch/$(ARCH)/mach-$(MACHINE)/
39 core-y   += arch/$(ARCH)/mach-$(MACHINE)/boards/
40 endif
41
42 libs-y   += arch/$(ARCH)/lib/
43
44 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
45
46
47
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.
51
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
57 else
58         $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
59 endif
60         @touch $@
61
62 CLEAN_FILES += \
63         include/asm-$(ARCH)/asm-offsets.h \
64         arch/$(ARCH)/kernel/asm-offsets.s \
65         include/asm-$(ARCH)/mach \
66         include/asm-$(ARCH)/.mach
67
68 archprepare: include/asm-blackfin/.mach
69 archclean:
70         $(Q)$(MAKE) $(clean)=$(boot)
71
72
73 all: vmImage
74 boot := arch/$(ARCH)/boot
75 BOOT_TARGETS = vmImage
76 .PHONY: $(BOOT_TARGETS)
77 $(BOOT_TARGETS): vmlinux
78         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
79 define archhelp
80   echo  '* vmImage         - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
81 endef