xref: /rk3399_rockchip-uboot/arch/mips/Makefile (revision 1d3d0f1f1cd8bac8ea0135c92a2bcd5020abfb1d)
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
11*1d3d0f1fSWills Wangmachine-$(CONFIG_ARCH_ATH79) += ath79
1232c1a6eeSPurna Chandra Mandalmachine-$(CONFIG_MACH_PIC32) += pic32
136479b691SDaniel Schwierzeck
146479b691SDaniel Schwierzeckmachdirs := $(patsubst %,arch/mips/mach-%/,$(machine-y))
156479b691SDaniel Schwierzecklibs-y += $(machdirs)
166479b691SDaniel Schwierzeck
176479b691SDaniel SchwierzeckPLATFORM_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
180315a289SDaniel Schwierzeck
190315a289SDaniel Schwierzeck# Optimize for MIPS architectures
200315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS32_R1) += -march=mips32 -Wa,-mips32
210315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS32_R2) += -march=mips32r2 -Wa,-mips32r2
220315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS64_R1) += -march=mips64 -Wa,-mips64
230315a289SDaniel Schwierzeckarch-$(CONFIG_CPU_MIPS64_R2) += -march=mips64r2 -Wa,-mips64r2
240315a289SDaniel Schwierzeck
250315a289SDaniel Schwierzeck# Allow extra optimization for specific CPUs/SoCs
260315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_4KC) += -mtune=4kc
270315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_14KC) += -mtune=14kc
280315a289SDaniel Schwierzecktune-$(CONFIG_MIPS_TUNE_24KC) += -mtune=24kc
290315a289SDaniel Schwierzeck
3023ff8633SDaniel Schwierzeck# Include default header files
3123ff8633SDaniel Schwierzeckcflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
3223ff8633SDaniel Schwierzeck
3323ff8633SDaniel SchwierzeckPLATFORM_CPPFLAGS += $(arch-y) $(tune-y) $(cflags-y)
34