-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
52 lines (40 loc) · 1.34 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
MODULES=board command validation engine puzzle game_text game_gui endgame
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
TEST=test.byte
TEXT_MAIN=game_text.byte
GUI_MAIN=game_gui.byte
OCAMLBUILD=ocamlbuild -use-ocamlfind \
-plugin-tag 'package(bisect_ppx-ocamlbuild)'
default: build
OCAMLRUNPARAM=b utop
build:
$(OCAMLBUILD) $(OBJECTS)
test:
$(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
bisect-test:
BISECT_COVERAGE=YES $(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST)
command-line:
$(OCAMLBUILD) -tag 'debug' -I game_text $(TEXT_MAIN) && \
OCAMLRUNPARAM=b ./$(TEXT_MAIN)
gui:
$(OCAMLBUILD) -tag 'debug' -I game_gui $(GUI_MAIN) && \
OCAMLRUNPARAM=b ./$(GUI_MAIN)
bisect: clean bisect-test
bisect-ppx-report html
zip:
zip chess.zip *.ml* *.sh _tags .merlin .ocamlformat .ocamlinit *.json test_board_jsons/* INSTALL.md README.md Makefile assets/*
docs: docs-public docs-private
docs-public: build
mkdir -p _doc.public
ocamlfind ocamldoc -I _build -package yojson -package lablgtk2 \
-html -stars -d _doc.public $(MLIS)
docs-private: build
mkdir -p _doc.private
ocamlfind ocamldoc -I _build -package yojson -package lablgtk2 \
-html -stars -d _doc.private \
-inv-merge-ml-mli -m A $(MLIS) $(MLS)
clean:
ocamlbuild -clean
rm -rf _doc.public _doc.private chess.zip _coverage bisect*.coverage