forked from Firmware/Firmwares
26 lines
682 B
Makefile
26 lines
682 B
Makefile
TARGET := dhrystone
|
|
|
|
ASM_SRCS :=
|
|
C_SRCS := dhry_stubs.c dhry_printf.c
|
|
HEADERS := dhry.h
|
|
|
|
DHRY_SRCS := dhry_1.c dhry_2.c
|
|
DHRY_CFLAGS := -O2 -DTIME -DNO_INIT -fno-inline -fno-builtin-printf -Wno-implicit -march=rv32ima
|
|
|
|
XLEN ?= 32
|
|
CFLAGS := -g -Og -fno-common
|
|
LDFLAGS := -g -Wl,--wrap=scanf -Wl,--wrap=printf -Wl,--wrap=exit
|
|
|
|
DHRY_OBJS := $(patsubst %.c,%.o,$(DHRY_SRCS))
|
|
LINK_OBJS := $(DHRY_OBJS)
|
|
|
|
#BOARD = iss
|
|
BOARD=freedom-e300-hifive1
|
|
TOOL_DIR=/opt/shared/riscv/FreedomStudio/20180122/SiFive/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6/bin
|
|
|
|
BSP_BASE = bsp
|
|
include $(BSP_BASE)/env/common.mk
|
|
|
|
$(DHRY_OBJS): %.o: %.c $(HEADERS)
|
|
$(CC) $(CFLAGS) $(DHRY_CFLAGS) -c -o $@ $<
|