summaryrefslogtreecommitdiff
path: root/Makefile
blob: 2b5e867c92d32fd064fd287c61271775f517a401 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ARCHS += power
ARCHS += arm
ARCHS += risc-v
# ARCHS += mips
# ARCHS += cheri
ARCHS += x86

all: sail interpreter
.PHONY: all

sail:
	$(MAKE) -C src
	ln -f -s src/sail.native sail
.PHONY: sail

language:
	$(MAKE) -C language
.PHONY: language

interpreter:
	$(MAKE) -C src interpreter
.PHONY: interpreter

archs:
	for arch in $(ARCHS); do\
	  $(MAKE) -C "$$arch" || exit;\
	done
.PHONY: archs

isabelle-lib:
	$(MAKE) -C isabelle-lib
.PHONY: isabelle-lib

apply_header:
	$(MAKE) clean
	headache -c etc/headache_config -h etc/mips_header `ls mips/*.sail`
	headache -c etc/headache_config -h etc/mips_header `ls cheri/*.sail`
	headache -c etc/headache_config -h src/LICENCE `ls src/Makefile*`
	headache -c etc/headache_config -h src/LICENCE `ls src/*.ml*`
	headache -c etc/headache_config -h src/LICENCE `ls src/lem_interp/*.ml`
	headache -c etc/headache_config -h src/LICENCE `ls src/lem_interp/*.lem`
	$(MAKE) -C arm apply_header
.PHONY: apply_header

clean:
	for subdir in src arm ; do\
	  $(MAKE) -C "$$subdir" clean;\
	done
	-rm sail
.PHONY: clean

clean_archs:
	for arch in $(ARCHS); do\
	  $(MAKE) -C "$$arch" clean;\
	done
.PHONY: clean_archs