2014-11-22 07:51:33 +09:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#
|
|
|
|
|
2015-01-29 22:56:20 +09:00
|
|
|
head-y := arch/mips/cpu/start.o
|
2014-11-22 07:51:33 +09:00
|
|
|
|
2015-01-29 22:56:20 +09:00
|
|
|
libs-y += arch/mips/cpu/
|
2014-11-22 07:51:33 +09:00
|
|
|
libs-y += arch/mips/lib/
|
2015-01-29 22:47:01 +09:00
|
|
|
|
2015-12-22 00:35:13 +09:00
|
|
|
machine-$(CONFIG_SOC_AU1X00) += au1x00
|
2016-03-16 17:59:52 +09:00
|
|
|
machine-$(CONFIG_ARCH_ATH79) += ath79
|
2016-01-28 19:00:10 +09:00
|
|
|
machine-$(CONFIG_MACH_PIC32) += pic32
|
2015-12-22 00:35:13 +09:00
|
|
|
|
|
|
|
machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
|
|
|
|
libs-y += $(machdirs)
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
2015-12-27 03:55:37 +09:00
|
|
|
|
|
|
|
# Optimize for MIPS architectures
|
|
|
|
arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32
|
|
|
|
arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2
|
2016-05-16 18:52:12 +09:00
|
|
|
arch-$(CONFIG_CPU_MIPS32_R6) += -march=mips32r6 -Wa,-mips32r6
|
2015-12-27 03:55:37 +09:00
|
|
|
arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64
|
|
|
|
arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2
|
2016-05-16 18:52:12 +09:00
|
|
|
arch-$(CONFIG_CPU_MIPS64_R6) += -march=mips64r6 -Wa,-mips64r6
|
2015-12-27 03:55:37 +09:00
|
|
|
|
|
|
|
# Allow extra optimization for specific CPUs/SoCs
|
|
|
|
tune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc
|
|
|
|
tune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc
|
|
|
|
tune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc
|
2016-05-07 03:10:33 +09:00
|
|
|
tune-$(CONFIG_MIPS_TUNE_74KC) += -mtune=74kc
|
2015-12-27 03:55:37 +09:00
|
|
|
|
2016-01-13 05:48:25 +09:00
|
|
|
# Include default header files
|
|
|
|
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y)
|