Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # SPDX-License-Identifier: GPL-2.0+
  3. #
  4. head-y := arch/mips/cpu/start.o
  5. ifeq ($(CONFIG_SPL_BUILD),y)
  6. ifneq ($(CONFIG_SPL_START_S_PATH),)
  7. head-y := $(CONFIG_SPL_START_S_PATH:"%"=%)/start.o
  8. endif
  9. endif
  10. libs-y += arch/mips/cpu/
  11. libs-y += arch/mips/lib/
  12. machine-$(CONFIG_SOC_AU1X00) += au1x00
  13. machine-$(CONFIG_ARCH_ATH79) += ath79
  14. machine-$(CONFIG_MACH_PIC32) += pic32
  15. machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
  16. libs-y += $(machdirs)
  17. PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
  18. # Optimize for MIPS architectures
  19. arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32
  20. arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2
  21. arch-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,-mips32r6
  22. arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64
  23. arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2
  24. arch-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,-mips64r6
  25. # Allow extra optimization for specific CPUs/SoCs
  26. tune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc
  27. tune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc
  28. tune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc
  29. tune-$(CONFIG_MIPS_TUNE_34KC) += -mtune=34kc
  30. tune-$(CONFIG_MIPS_TUNE_74KC) += -mtune=74kc
  31. # Include default header files
  32. cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
  33. PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y)