forked from mirage/mirage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (35 loc) · 835 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
42
43
44
.PHONY: all clean tools
.DEFAULT: all
-include Makefile.config
SUDO ?= sudo
export SUDO
DESTDIR ?=
export DESTDIR
PREFIX ?= $(HOME)/mir-inst
export PREFIX
JOBS=-j 6
export JOBS
all: tools
@cd syntax && $(MAKE)
@cd lib && $(MAKE)
doc:
@cd docs && $(MAKE) all
@cd lib && $(MAKE) doc
tools:
@cd tools/crunch && ocamlbuild $(JOBS) crunch.native
@cd tools/ocp-pack && ocamlbuild $(JOBS) pack.native
@cd tools/mir && $(MAKE) install
@cp tools/crunch/_build/crunch.native $(PREFIX)/bin/mlcrunch
@$(MAKE) -C tools/fs all
@cp tools/fs/mir-fs-create $(PREFIX)/bin/mir-fs-create
install:
@rm -rf _build
@./assemble.sh
@mkdir -p $(PREFIX)
@cp -r _build/* $(PREFIX)/
clean:
@cd syntax && $(MAKE) clean
@cd lib && $(MAKE) clean
@cd tools/crunch && ocamlbuild -clean
@cd tools/ocp-pack && ocamlbuild -clean
@rm -rf _build