Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[deliverable/linux.git] / arch / metag / Makefile
1 #
2 # metag/Makefile
3 #
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.
7 #
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.
11 #
12 # Copyright (C) 1994 by Linus Torvalds
13 # 2007,2008,2012 by Imagination Technologies Ltd.
14 #
15
16 LDFLAGS :=
17 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
18
19 checkflags-$(CONFIG_METAG_META12) += -DMETAC_1_2
20 checkflags-$(CONFIG_METAG_META21) += -DMETAC_2_1
21 CHECKFLAGS += -D__metag__ $(checkflags-y)
22
23 KBUILD_DEFCONFIG := meta2_defconfig
24
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
31
32 cflags-$(CONFIG_METAG_FUNCTION_TRACE) += -mhwtrace-leaf -mhwtrace-retpc
33 cflags-$(CONFIG_METAG_META21) += -mextensions=bex
34
35 KBUILD_CFLAGS += -pipe
36 KBUILD_CFLAGS += -ffunction-sections
37
38 KBUILD_CFLAGS += $(sflags-y) $(cflags-y)
39 KBUILD_AFLAGS += $(sflags-y)
40
41 LDFLAGS_vmlinux := $(ldflags-y)
42
43 head-y := arch/metag/kernel/head.o
44
45 core-y += arch/metag/boot/dts/
46 core-y += arch/metag/kernel/
47 core-y += arch/metag/mm/
48
49 libs-y += arch/metag/lib/
50 libs-y += arch/metag/tbx/
51
52 boot := arch/metag/boot
53
54 boot_targets += uImage
55 boot_targets += uImage.gz
56 boot_targets += uImage.bz2
57 boot_targets += uImage.xz
58 boot_targets += uImage.lzo
59 boot_targets += uImage.bin
60 boot_targets += vmlinux.bin
61
62 PHONY += $(boot_targets)
63
64 all: vmlinux.bin
65
66 $(boot_targets): vmlinux
67 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
68
69 %.dtb %.dtb.S %.dtb.o: scripts
70 $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
71
72 dtbs: scripts
73 $(Q)$(MAKE) $(build)=$(boot)/dts dtbs
74
75 archclean:
76 $(Q)$(MAKE) $(clean)=$(boot)
77
78 define archhelp
79 echo '* vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
80 @echo ' uImage - Alias to bootable U-Boot image'
81 @echo ' uImage.bin - Kernel-only image for U-Boot (bin)'
82 @echo ' uImage.gz - Kernel-only image for U-Boot (gzip)'
83 @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
84 @echo ' uImage.xz - Kernel-only image for U-Boot (xz)'
85 @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'
86 @echo ' dtbs - Build device tree blobs for enabled boards'
87 endef
This page took 0.032116 seconds and 6 git commands to generate.