makes build more configurable by CLI

This commit is contained in:
Eyck Jentzsch 2023-11-27 10:13:22 +01:00
parent d20582d7aa
commit 1b8f78fe78
1 changed files with 6 additions and 5 deletions

View File

@ -2,18 +2,19 @@
TARGET = hello
C_SRCS = $(wildcard *.c)
HEADERS = $(wildcard *.h)
CFLAGS += -O2 -g
OPT ?= -O2
CFLAGS += $(OPT) -g
BOARD=iss
LINK_TARGET=link
RISCV_ARCH:=rv32i
RISCV_ABI:=ilp32
RISCV_ARCH:=rv32e
RISCV_ABI:=ilp32e
LDFLAGS += -g -Wl,--wrap=printf
compiler := $(shell which riscv32-unknown-elf-gcc)
compiler := $(shell which riscv64-unknown-elf-gcc)
TOOL_DIR=$(dir $(compiler))
TRIPLET=riscv32-unknown-elf
TRIPLET=riscv64-unknown-elf
BSP_BASE = ../bare-metal-bsp
include $(BSP_BASE)/env/common-gcc.mk