2022-09-21 17:35:08 +00:00
|
|
|
# Makefile
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -O3
|
|
|
|
LIBS = -lm
|
2024-09-15 07:34:18 +00:00
|
|
|
LFLAGS = -L.
|
2022-09-21 17:35:08 +00:00
|
|
|
# Link against the riscv-isa-sim version of SoftFloat rather than
|
|
|
|
# the regular version to get RISC-V NaN behavior
|
|
|
|
IFLAGS = -I$(RISCV)/riscv-isa-sim/softfloat
|
|
|
|
LIBS = $(RISCV)/riscv-isa-sim/build/libsoftfloat.a
|
2024-09-15 07:34:18 +00:00
|
|
|
#IFLAGS = -I../../../addins/berkeley-softfloat-3/source/include/
|
|
|
|
#LIBS = ../../../addins/berkeley-softfloat-3/build/Linux-x86_64-GCC/softfloat.a
|
2022-09-21 17:35:08 +00:00
|
|
|
SRCS = $(wildcard *.c)
|
|
|
|
|
|
|
|
PROGS = $(patsubst %.c,%,$(SRCS))
|
|
|
|
|
|
|
|
all: $(PROGS)
|
|
|
|
|
|
|
|
%: %.c
|
|
|
|
$(CC) $(CFLAGS) $(IFLAGS) $(LFLAGS) -o $@ $< $(LIBS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(PROGS)
|