Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux-2.6.git] / arch / metag / Makefile
blob9739857bdedcb89fe6847d26fdef70041a70228d
2 # metag/Makefile
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" cleaning up for this architecture.
8 # This file is subject to the terms and conditions of the GNU General Public
9 # License. See the file "COPYING" in the main directory of this archive
10 # for more details.
12 # Copyright (C) 1994 by Linus Torvalds
13 # 2007,2008,2012 by Imagination Technologies Ltd.
16 LDFLAGS :=
17 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
19 checkflags-$(CONFIG_METAG_META12) += -DMETAC_1_2
20 checkflags-$(CONFIG_METAG_META21) += -DMETAC_2_1
21 CHECKFLAGS += -D__metag__ $(checkflags-y)
23 KBUILD_DEFCONFIG := tz1090_defconfig
25 sflags-$(CONFIG_METAG_META12) += -mmetac=1.2
26 ifeq ($(CONFIG_METAG_META12),y)
27 # Only use TBI API 1.4 if DSP is enabled for META12 cores
28 sflags-$(CONFIG_METAG_DSP) += -DTBI_1_4
29 endif
30 sflags-$(CONFIG_METAG_META21) += -mmetac=2.1 -DTBI_1_4
32 cflags-$(CONFIG_METAG_FUNCTION_TRACE) += -mhwtrace-leaf -mhwtrace-retpc
33 cflags-$(CONFIG_METAG_META21) += -mextensions=bex
35 KBUILD_CFLAGS += -pipe
36 KBUILD_CFLAGS += -ffunction-sections
38 KBUILD_CFLAGS += $(sflags-y) $(cflags-y)
39 KBUILD_AFLAGS += $(sflags-y)
41 LDFLAGS_vmlinux := $(ldflags-y)
43 head-y := arch/metag/kernel/head.o
45 core-y += arch/metag/boot/dts/
46 core-y += arch/metag/kernel/
47 core-y += arch/metag/mm/
49 libs-y += arch/metag/lib/
50 libs-y += arch/metag/tbx/
52 drivers-$(CONFIG_OPROFILE) += arch/metag/oprofile/
54 boot := arch/metag/boot
56 boot_targets += uImage
57 boot_targets += uImage.gz
58 boot_targets += uImage.bz2
59 boot_targets += uImage.xz
60 boot_targets += uImage.lzo
61 boot_targets += uImage.bin
62 boot_targets += vmlinux.bin
64 PHONY += $(boot_targets)
66 all: vmlinux.bin
68 $(boot_targets): vmlinux
69 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
71 %.dtb %.dtb.S %.dtb.o: scripts
72 $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
74 dtbs: scripts
75 $(Q)$(MAKE) $(build)=$(boot)/dts dtbs
77 archclean:
78 $(Q)$(MAKE) $(clean)=$(boot)
80 define archhelp
81 echo '* vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
82 @echo ' uImage - Alias to bootable U-Boot image'
83 @echo ' uImage.bin - Kernel-only image for U-Boot (bin)'
84 @echo ' uImage.gz - Kernel-only image for U-Boot (gzip)'
85 @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
86 @echo ' uImage.xz - Kernel-only image for U-Boot (xz)'
87 @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'
88 @echo ' dtbs - Build device tree blobs for enabled boards'
89 endef