-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1.06 KB
/
Makefile
File metadata and controls
46 lines (35 loc) · 1.06 KB
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
MODULES=main author display physics input sprite gamestate ai parse
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
OCAMLBUILD=ocamlbuild -use-ocamlfind -plugin-tag 'package(bisect_ppx-ocamlbuild)'
TEST=test.byte
MAIN=main.byte
PKGS=ounit2
default: build
utop: build
OCAMLRUNPARAM=b utop
build:
$(OCAMLBUILD) $(OBJECTS)
test:
BISECT_COVERAGE=YES $(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
play:
$(OCAMLBUILD) -tag 'debug' $(MAIN) && OCAMLRUNPARAM=b ./$(MAIN)
bisect: clean test
bisect-ppx-report html
docs: docs-public docs-private
docs-public: build
mkdir -p _doc.public
ocamlfind ocamldoc -I _build -package yojson,ANSITerminal,graphics \
-html -stars -d _doc.public $(MLIS)
docs-private: build
mkdir -p _doc.private
ocamlfind ocamldoc -I _build -package yojson,ANSITerminal,graphics \
-html -stars -d _doc.private \
-inv-merge-ml-mli -m A $(MLIS) $(MLS)
clean:
ocamlbuild -clean
rm -rf _coverage bisect*.coverage
zip:
zip -r mariogame.zip *.ml *.mli _tags .ocamlinit .merlin \
.ocamlformat *.json *.txt Makefile