Back to home page

LXR

 
 

    


0001 #
0002 # metag/Makefile
0003 #
0004 # This file is included by the global makefile so that you can add your own
0005 # architecture-specific flags and dependencies. Remember to do have actions
0006 # for "archclean" cleaning up for this architecture.
0007 #
0008 # This file is subject to the terms and conditions of the GNU General Public
0009 # License.  See the file "COPYING" in the main directory of this archive
0010 # for more details.
0011 #
0012 # Copyright (C) 1994 by Linus Torvalds
0013 #               2007,2008,2012 by Imagination Technologies Ltd.
0014 #
0015 
0016 LDFLAGS                                 :=
0017 OBJCOPYFLAGS                            := -O binary -R .note -R .comment -S
0018 
0019 checkflags-$(CONFIG_METAG_META12)       += -DMETAC_1_2
0020 checkflags-$(CONFIG_METAG_META21)       += -DMETAC_2_1
0021 CHECKFLAGS                              += -D__metag__ $(checkflags-y)
0022 
0023 KBUILD_DEFCONFIG                        := tz1090_defconfig
0024 
0025 sflags-$(CONFIG_METAG_META12)           += -mmetac=1.2
0026 ifeq ($(CONFIG_METAG_META12),y)
0027 # Only use TBI API 1.4 if DSP is enabled for META12 cores
0028 sflags-$(CONFIG_METAG_DSP)              += -DTBI_1_4
0029 endif
0030 sflags-$(CONFIG_METAG_META21)           += -mmetac=2.1 -DTBI_1_4
0031 
0032 cflags-$(CONFIG_METAG_FUNCTION_TRACE)   += -mhwtrace-leaf -mhwtrace-retpc
0033 cflags-$(CONFIG_METAG_META21)           += -mextensions=bex
0034 
0035 KBUILD_CFLAGS                           += -pipe
0036 KBUILD_CFLAGS                           += -ffunction-sections
0037 
0038 KBUILD_CFLAGS                           += $(sflags-y) $(cflags-y)
0039 KBUILD_AFLAGS                           += $(sflags-y)
0040 
0041 LDFLAGS_vmlinux                         := $(ldflags-y)
0042 
0043 head-y                                  := arch/metag/kernel/head.o
0044 
0045 core-y                                  += arch/metag/boot/dts/
0046 core-y                                  += arch/metag/kernel/
0047 core-y                                  += arch/metag/mm/
0048 
0049 libs-y                                  += arch/metag/lib/
0050 libs-y                                  += arch/metag/tbx/
0051 
0052 drivers-$(CONFIG_OPROFILE)              += arch/metag/oprofile/
0053 
0054 boot                                    := arch/metag/boot
0055 
0056 boot_targets                            += uImage
0057 boot_targets                            += uImage.gz
0058 boot_targets                            += uImage.bz2
0059 boot_targets                            += uImage.xz
0060 boot_targets                            += uImage.lzo
0061 boot_targets                            += uImage.bin
0062 boot_targets                            += vmlinux.bin
0063 
0064 PHONY                                   += $(boot_targets)
0065 
0066 all: vmlinux.bin
0067 
0068 $(boot_targets): vmlinux
0069         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
0070 
0071 %.dtb %.dtb.S %.dtb.o: scripts
0072         $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
0073 
0074 dtbs: scripts
0075         $(Q)$(MAKE) $(build)=$(boot)/dts
0076 
0077 archclean:
0078         $(Q)$(MAKE) $(clean)=$(boot)
0079 
0080 define archhelp
0081   echo  '* vmlinux.bin  - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
0082   @echo '  uImage       - Alias to bootable U-Boot image'
0083   @echo '  uImage.bin   - Kernel-only image for U-Boot (bin)'
0084   @echo '  uImage.gz    - Kernel-only image for U-Boot (gzip)'
0085   @echo '  uImage.bz2   - Kernel-only image for U-Boot (bzip2)'
0086   @echo '  uImage.xz    - Kernel-only image for U-Boot (xz)'
0087   @echo '  uImage.lzo   - Kernel-only image for U-Boot (lzo)'
0088   @echo '  dtbs         - Build device tree blobs for enabled boards'
0089 endef