-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 711 Bytes
/
Makefile
File metadata and controls
45 lines (33 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# RV64GC
TARGET ?=riscv64
ARCH ?=rv64gc
ABI ?=lp64
#RV32GC
#TARGET ?=riscv32
#ARCH ?=rv32gc
#ABI ?=ilp32d
#CH32V003 - RV32E
#TARGET ?=riscv32
#ARCH ?=rv32ec_zicsr
#ABI ?=ilp32e
CC := clang
LD := ld.lld
CFLAGS := --target=$(TARGET) -march=$(ARCH) -mabi=$(ABI)
LDFLAGS :=
SRCS := bloom.s
OBJS := $(SRCS:.s=.o)
EXES := bloom-tests.x
LIB := librvbloom.a
RVINT := ../rvint/src/librvint.a
BLOOM_TESTS_OBJS := bloom-tests.o bloom.o
.PHONY: all clean
all: $(EXES) $(LIB)
%.o: %.s
$(CC) $(CFLAGS) -c $< -o $@
bloom.o: bloom.s config.s
bloom-tests.x: bloom-tests.o $(LIB) $(RVINT)
$(LD) $(LDFLAGS) $^ $(RVINT) -o $@
$(LIB): $(OBJS)
$(AR) $(ARFLAGS) $(LIB) $(OBJS)
clean:
rm -f *.o $(OBJS) $(EXES) $(LIB)