-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (37 loc) · 1.32 KB
/
Copy pathMakefile
File metadata and controls
48 lines (37 loc) · 1.32 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
47
48
MODULES=main introState endState position gameGaugesDict drawable rect state author world item effect gauges character imageHandler areaMap
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
TEST=test.byte
MAIN=main.byte
OCAMLBUILD=ocamlbuild -use-ocamlfind
PKGS=unix,oUnit,str,graphics,yojson,camlimages,camlimages.graphics,camlimages.png,camlimages.all
default: build
OCAMLRUNPARAM=b utop
build:
# $(OCAMLBUILD) $(OBJECTS) && js_of_ocaml +graphics.js $(MAIN)
$(OCAMLBUILD) $(OBJECTS)
main:
$(OCAMLBUILD) $(MAIN) && ./$(MAIN)
test:
$(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
bisect-test:
BISECT_COVERAGE=YES $(OCAMLBUILD) -tag 'debug' $(TEST) \
&& ./$(TEST)
play:
$(OCAMLBUILD) -tag 'debug' $(MAIN) && OCAMLRUNPARAM=b ./$(MAIN)
zip:
zip src.zip *.ml* *.json *.sh _tags .merlin .ocamlformat .ocamlinit LICENSE Makefile
docs: docs-public docs-private
docs-public: build
mkdir -p _doc.public
ocamlfind ocamldoc -I _build -package graphics,yojson,ANSITerminal,camlimages.all \
-html -stars -d _doc.public $(MLIS)
docs-private: build
mkdir -p _doc.private
ocamlfind ocamldoc -I _build -package graphics,yojson,ANSITerminal,camlimages.all \
-html -stars -d _doc.private \
-inv-merge-ml-mli -m A $(MLIS) $(MLS)
clean:
ocamlbuild -clean
rm -rf _doc.public _doc.private src.zip