-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·41 lines (33 loc) · 1.21 KB
/
Makefile
File metadata and controls
executable file
·41 lines (33 loc) · 1.21 KB
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
INCLUDE = ./include
LIBRARY = ./lib
GCC = riscv64-unknown-elf-gcc
C_FLAGS = -lecall -march=rv64i
cache :
make -C src/sim-cache
mv ./src/sim-cache/sim ./sim-cache
pipeline :
make -C src/sim-pipeline
mv ./src/sim-pipeline/sim .
single :
make -C src/sim-single
mv ./src/sim-single/sim .
cachetest :
make -C src/cache-test
mv ./src/cache-test/cachetest .
libecall :
$(GCC) ./src/syscall.c -c -o ./src/syscall.o -I$(INCLUDE)
ar -cr ./src/libecall.a ./src/syscall.o
mv ./src/libecall.a $(LIBRARY)
testprog :
$(GCC) ./src/test_prog/add.c -o ./test/add -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
$(GCC) ./src/test_prog/mul-div.c -o ./test/mul-div -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
$(GCC) ./src/test_prog/nl.c -o ./test/nl -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
$(GCC) ./src/test_prog/simple-fuction.c -o ./test/simple-fuction -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
$(GCC) ./src/test_prog/qsort.c -o ./test/qsort -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
$(GCC) ./src/test_prog/matmul.c -o ./test/matmul -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
$(GCC) ./src/test_prog/ackermann.c -o ./test/ackermann -I$(INCLUDE) -L$(LIBRARY) $(C_FLAGS)
all: pipeline libecall testprog
clean :
find . -name "*.o" | xargs rm -f
rm sim
rm sim-cache