xref: /openbmc/u-boot/arch/riscv/Makefile (revision 0c074845)
183d290c5STom Rini# SPDX-License-Identifier: GPL-2.0+
2f94c44e5SRick Chen#
3f94c44e5SRick Chen# Copyright (C) 2017 Andes Technology Corporation.
4f94c44e5SRick Chen# Rick Chen, Andes Technology Corporation <rick@andestech.com>
5f94c44e5SRick Chen
6*0c074845SLukas Auerifeq ($(CONFIG_ARCH_RV64I),y)
7*0c074845SLukas Auer	ARCH_BASE = rv64im
8*0c074845SLukas Auer	ABI = lp64
9*0c074845SLukas Auerendif
10*0c074845SLukas Auerifeq ($(CONFIG_ARCH_RV32I),y)
11*0c074845SLukas Auer	ARCH_BASE = rv32im
12*0c074845SLukas Auer	ABI = ilp32
13*0c074845SLukas Auerendif
14*0c074845SLukas Auerifeq ($(CONFIG_RISCV_ISA_A),y)
15*0c074845SLukas Auer	ARCH_A = a
16*0c074845SLukas Auerendif
17*0c074845SLukas Auerifeq ($(CONFIG_RISCV_ISA_C),y)
18*0c074845SLukas Auer	ARCH_C = c
19*0c074845SLukas Auerendif
20*0c074845SLukas Auer
21*0c074845SLukas AuerARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI)
22*0c074845SLukas Auer
23*0c074845SLukas AuerPLATFORM_CPPFLAGS	+= $(ARCH_FLAGS)
24*0c074845SLukas AuerCFLAGS_EFI		+= $(ARCH_FLAGS)
25*0c074845SLukas Auer
26b5369c58SBin Menghead-y := arch/riscv/cpu/start.o
27f94c44e5SRick Chen
282fab2e9cSBin Menglibs-y += arch/riscv/cpu/
29f94c44e5SRick Chenlibs-y += arch/riscv/cpu/$(CPU)/
30f94c44e5SRick Chenlibs-y += arch/riscv/lib/
31