summaryrefslogtreecommitdiff
path: root/test/isabelle/Makefile
blob: 43028fedf20dcb4863c4b06511754fe66838c9b7 (plain)
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
CHERI_DIR = ../../cheri
AARCH64_DIR = ../../aarch64
TGTS = run_cheri.native run_aarch64.native
SESSION_DIRS = -d $(CHERI_DIR) -d $(AARCH64_DIR) -d .

.PHONY: all clean

all: $(TGTS)

%.native: %.ml elf_loader.ml
	ocamlbuild -use-ocamlfind -pkg lem -pkg linksem -pkg num -pkg unix $@

run_cheri.native: cheri_export.ml
run_aarch64.native: aarch64_export.ml

cheri_export.ml: Cheri_code.thy
	make -C $(CHERI_DIR) Cheri.thy
	isabelle build -c $(SESSION_DIRS) Sail-CHERI-Code

aarch64_export.ml: Aarch64_code.thy
	make -C $(AARCH64_DIR) Aarch64.thy
	isabelle build -c $(SESSION_DIRS) Sail-AArch64-Code

clean:
	-ocamlbuild -clean
	-rm -f cheri_export.ml
	-rm -f aarch64_export.ml