-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 1.01 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
MODULES=solitaire_game solitaire_state uno_game uno_state card deck command hand main authors files #add modules here
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
TEST=test.byte
MAIN=main.byte
OCAMLBUILD=ocamlbuild -use-ocamlfind
default: build
OCAMLRUNPARAM=b utop -init ./.ocamlinit
build:
$(OCAMLBUILD) $(OBJECTS)
test:
$(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
play:
$(OCAMLBUILD) -tag 'debug' $(MAIN) && OCAMLRUNPARAM=b ./$(MAIN)
docs: docs-public docs-private
docs-public: build
mkdir -p _doc.public
ocamlfind ocamldoc -I _build -package yojson,ANSITerminal \
-html -stars -d _doc.public $(MLIS)
docs-private: build
mkdir -p _doc.private
ocamlfind ocamldoc -I _build -package yojson,ANSITerminal \
-html -stars -d _doc.private \
-inv-merge-ml-mli -m A $(MLIS) $(MLS)
clean:
ocamlbuild -clean
rm -rf _doc.public _doc.private src.zip
zip:
zip src.zip *.ml *.mli Makefile README.md INSTALL.txt _tags .merlin .ocamlformat .ocamlinit load_test_file.json