-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (32 loc) · 889 Bytes
/
Makefile
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
PREFIX_DIR=~/.local/
INSTALL=/usr/bin/install
ARCH=\
rv32imac \
rv64imac
all : configure build-dep build csrs subdirs
configure:
pip3 install -r requirements.txt
cd extern/riscv-isa-sim/; ./configure
clean :
rm -f csr_data/*
${MAKE} -C src/ clean
build-dep :
cd extern/riscv-isa-sim/; make -j8
build:
${MAKE} -C src
csrs:
if [ ! -d csr_data ] ; then mkdir csr_data; fi
scripts/generate_csrs.py \
extern/riscv-isa-data/csr.yaml \
csr_data
cd csr_data && perl -pi -e 's/^-group_end\n//' *.gtkw
subdirs:
install :
${INSTALL} -d ${PREFIX_DIR}/bin
${INSTALL} -d ${PREFIX_DIR}/share/riscv-gtkwave
${INSTALL} src/decode_addr ${PREFIX_DIR}/bin
${INSTALL} src/decode_inst ${PREFIX_DIR}/bin
for arch in ${ARCH} ; do \
ln -s ${PREFIX_DIR}/bin/decode_inst ${PREFIX_DIR}/bin/decode_inst-$${arch}; \
done
${INSTALL} csr_data/*.gtkw ${PREFIX_DIR}/share/riscv-gtkwave