1e19db555SDaniel Schwierzeck# 2e19db555SDaniel Schwierzeck# SPDX-License-Identifier: GPL-2.0+ 3e19db555SDaniel Schwierzeck# 4e19db555SDaniel Schwierzeck 5eef88dfbSDaniel Schwierzeckhead-y := arch/mips/cpu/start.o 6e19db555SDaniel Schwierzeck 7eef88dfbSDaniel Schwierzecklibs-y += arch/mips/cpu/ 8e19db555SDaniel Schwierzecklibs-y += arch/mips/lib/ 9d9a4a622SDaniel Schwierzeck 106479b691SDaniel Schwierzeckmachine-$(CONFIG_SOC_AU1X00) += au1x00 116479b691SDaniel Schwierzeck 126479b691SDaniel Schwierzeckmachdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y)) 136479b691SDaniel Schwierzecklibs-y += $(machdirs) 146479b691SDaniel Schwierzeck 156479b691SDaniel SchwierzeckPLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs)) 160315a289SDaniel Schwierzeck 170315a289SDaniel Schwierzeck# Optimize for MIPS architectures 180315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32 190315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2 200315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64 210315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2 220315a289SDaniel Schwierzeck 230315a289SDaniel Schwierzeck# Allow extra optimization for specific CPUs/SoCs 240315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc 250315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc 260315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc 270315a289SDaniel Schwierzeck 28*23ff8633SDaniel Schwierzeck# Include default header files 29*23ff8633SDaniel Schwierzeckcflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 30*23ff8633SDaniel Schwierzeck 31*23ff8633SDaniel SchwierzeckPLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y) 32