forked from jscert/jscert
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
75 lines (52 loc) · 1.61 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
############################################################################
# You can define your own path to COQBIN by creating a file called
# "settings.sh" and placing the right definitions into it, e.g.
# COQBIN=/var/tmp/charguer/v8.4/bin/
#
# Note that COQBIN should have a leading slash.
# Note that if you add a settings.sh file, you need to do "make clean" first.
# Default paths for COQBIN, etc are as follows:
COQBIN=
# Use bash as the default shell
SHELL=/bin/bash
#######################################################
COQINCLUDES=-R coq JsCert
COQC=$(COQBIN)coqc
COQDEP=$(COQBIN)coqdep
COQFLAGS=
OCAMLBUILD=ocamlbuild
OCAMLBUILDFLAGS=-cflags "-w -20"
#######################################################
# MAIN SOURCE FILES
JS_SRC=\
coq/JsNumber.v \
coq/JsSyntax.v \
#######################################################
# MAIN TARGETS
all: coq
.PHONY: all
#######################################################
# Coq Compilation Implicit Rules
%.v.d: %.v
$(COQDEP) $(COQINCLUDES) $< > $@
# If this rule fails for some reason, try `make clean_all && make`
%.vo: %.v
$(COQC) $(COQFLAGS) $(COQINCLUDES) $<
#######################################################
# JsAst Specific Rules
.PHONY: coq proof
coq: Makefile.coq
@$(MAKE) -f Makefile.coq
install: Makefile.coq
@$(MAKE) -f Makefile.coq install
#######################################################
# CLEAN
.PHONY: clean
clean:
-rm -f coq/*.{vo,glob,d}
cleanall:
@$(MAKE) clean
-rm -f Makefile.coq Makefile.coq.conf .Makefile.coq.d .coqdeps.d
##
Makefile.coq: Makefile $(JS_SRC)
@coq_makefile -f _CoqProject $(JS_SRC) -o Makefile.coq