forked from andrejbauer/clerical
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (25 loc) · 777 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
DUNE=dune
default: clerical.exe
COQMAKEFILE = coq_makefile
COQSRC = formalization
OCAMLBUILD = ocamlbuild
OCAMLBUILD_FLAGS = -j 4 -use-ocamlfind -pkg menhirLib -pkg $(SEDLEX) -pkg gmp -pkg zarith
OCAMLBUILD_MENHIRFLAGS = -use-menhir -menhir "menhir --explain"
SRCDIR = src
.PHONY: coq_code clean clerical.exe
### Compilation of Coq files
$(COQSRC)/Makefile: $(COQSRC)/_CoqProject
cd $(COQSRC) && $(COQMAKEFILE) -f _CoqProject
coq_code: $(COQSRC)/Makefile
$(MAKE) -C $(COQSRC)
### Compilation of OCaml files
src/build.ml:
/bin/echo -n 'let version = "' > $@
$(MAKE) -s version | tr -d '\n' >> $@
/bin/echo '" ;;' >> $@
clerical.exe: src/build.ml
$(DUNE) build src/clerical.exe
# Cleaning up
clean: $(COQSRC)/Makefile
$(MAKE) -C $(COQSRC) clean
$(DUNE) clean