+include arch.mk
+
+
.PHONY: nothing clean install
nothing:
- echo "clean, tarball, install?"
+ @echo "clean, tarball, install?"
+ @echo "G: allowed values: riscv64, ppc, ppc64"
+ @echo "H: allowed values: amd64"
clean:
rm -f $(HOME)/lib/libcava.a $(HOME)/lib/softfloat.a *~ ./#*#
( cd softfloat/build/Linux-x86_64-GCC; rm -f softfloat.a *.o )
- make -C caveat clean
+ make -C caveat clean G=$G H=$H
make -C cachesim clean
make -C pipesim clean
make -C traceinfo clean
To build Cavatools:
```
$ cd cavatools
- $ make install
+ $ make install G=$GUEST H=$HOST
```
+Allowed GUEST values: riscv64, ppc or ppc64.
+Allowed HOST values: amd64.
+
will create the following files:
```
~/bin/caveat - instruction set interpreter
--- /dev/null
+G ?= riscv64
+H ?= amd64
+
+
+ifneq ($G,riscv64)
+ifneq ($G,ppc)
+ifneq ($G,ppc64)
+$(error G: allowed values: riscv64, ppc, ppc64, not '$G')
+endif
+endif
+endif
+
+
+ifneq ($H,amd64)
+$(error H: allowed values: amd64, not '$H')
+endif
+include ../arch.mk
+
# Path where things should be installed
R = $(HOME)
B = build
+G ?= riscv64
+H ?= amd64
_dummy := $(shell mkdir -p $B)
_dummy := $(shell mkdir -p $R/include/cava)
echo '#include "opcodes.h"' >> $@
echo '#include "insn.h"' >> $@
echo '#include "core.h"' >> $@
- python3 -m openpower.syscalls ecall riscv64 amd64 >> $@
+ python3 -m openpower.syscalls ecall $G $H >> $@