2014-11-21 22:51:33 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#
|
|
|
|
|
2015-01-29 13:56:20 +00:00
|
|
|
head-y := arch/mips/cpu/start.o
|
2014-11-21 22:51:33 +00:00
|
|
|
|
2015-01-29 13:56:20 +00:00
|
|
|
libs-y += arch/mips/cpu/
|
2014-11-21 22:51:33 +00:00
|
|
|
libs-y += arch/mips/lib/
|
2015-01-29 13:47:01 +00:00
|
|
|
|
2015-12-21 15:35:13 +00:00
|
|
|
machine-$(CONFIG_SOC_AU1X00) += au1x00
|
2016-01-28 10:00:10 +00:00
|
|
|
machine-$(CONFIG_MACH_PIC32) += pic32
|
2015-12-21 15:35:13 +00:00
|
|
|
|
|
|
|
machdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
|
|
|
|
libs-y += $(machdirs)
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
2015-12-26 18:55:37 +00:00
|
|
|
|
|
|
|
# Optimize for MIPS architectures
|
|
|
|
arch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32
|
|
|
|
arch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2
|
|
|
|
arch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64
|
|
|
|
arch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2
|
|
|
|
|
|
|
|
# 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-01-12 20:48:25 +00:00
|
|
|
# Include default header files
|
|
|
|
cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y)
|