Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. LDFLAGS :=
  16. OBJCOPYFLAGS := -O binary -R .note -R .comment -S
  17. checkflags-$(CONFIG_METAG_META12) += -DMETAC_1_2
  18. checkflags-$(CONFIG_METAG_META21) += -DMETAC_2_1
  19. CHECKFLAGS += -D__metag__ $(checkflags-y)
  20. KBUILD_DEFCONFIG := tz1090_defconfig
  21. sflags-$(CONFIG_METAG_META12) += -mmetac=1.2
  22. ifeq ($(CONFIG_METAG_META12),y)
  23. # Only use TBI API 1.4 if DSP is enabled for META12 cores
  24. sflags-$(CONFIG_METAG_DSP) += -DTBI_1_4
  25. endif
  26. sflags-$(CONFIG_METAG_META21) += -mmetac=2.1 -DTBI_1_4
  27. cflags-$(CONFIG_METAG_FUNCTION_TRACE) += -mhwtrace-leaf -mhwtrace-retpc
  28. cflags-$(CONFIG_METAG_META21) += -mextensions=bex
  29. KBUILD_CFLAGS += -pipe
  30. KBUILD_CFLAGS += -ffunction-sections
  31. KBUILD_CFLAGS += $(sflags-y) $(cflags-y)
  32. KBUILD_AFLAGS += $(sflags-y)
  33. LDFLAGS_vmlinux := $(ldflags-y)
  34. head-y := arch/metag/kernel/head.o
  35. core-y += arch/metag/boot/dts/
  36. core-y += arch/metag/kernel/
  37. core-y += arch/metag/mm/
  38. libs-y += arch/metag/lib/
  39. libs-y += arch/metag/tbx/
  40. drivers-$(CONFIG_OPROFILE) += arch/metag/oprofile/
  41. boot := arch/metag/boot
  42. boot_targets += uImage
  43. boot_targets += uImage.gz
  44. boot_targets += uImage.bz2
  45. boot_targets += uImage.xz
  46. boot_targets += uImage.lzo
  47. boot_targets += uImage.bin
  48. boot_targets += vmlinux.bin
  49. PHONY += $(boot_targets)
  50. all: vmlinux.bin
  51. $(boot_targets): vmlinux
  52. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  53. %.dtb %.dtb.S %.dtb.o: scripts
  54. $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
  55. dtbs: scripts
  56. $(Q)$(MAKE) $(build)=$(boot)/dts
  57. archclean:
  58. $(Q)$(MAKE) $(clean)=$(boot)
  59. define archhelp
  60. echo '* vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
  61. @echo ' uImage - Alias to bootable U-Boot image'
  62. @echo ' uImage.bin - Kernel-only image for U-Boot (bin)'
  63. @echo ' uImage.gz - Kernel-only image for U-Boot (gzip)'
  64. @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
  65. @echo ' uImage.xz - Kernel-only image for U-Boot (xz)'
  66. @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)'
  67. @echo ' dtbs - Build device tree blobs for enabled boards'
  68. endef