forked from nada-attia/dama
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (31 loc) · 985 Bytes
/
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
FILES=board state main command author move gui constants
MODULES=$(addprefix src/, $(FILES))
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
TEST=test.byte
MAIN=main.byte
GUI=gui.byte
OCAMLBUILD=ocamlbuild -use-ocamlfind -package camlimages.all
default: build
OCAMLRUNPARAM=b utop
build:
$(OCAMLBUILD) $(OBJECTS)
test:
$(OCAMLBUILD) -tag 'debug' src/$(TEST) && ./$(TEST) -runner sequential
play:
$(OCAMLBUILD) -tag 'debug' src/$(MAIN) && OCAMLRUNPARAM=b ./$(MAIN)
gui:
$(OCAMLBUILD) -tag 'debug' src/$(GUI) && OCAMLRUNPARAM=b ./$(GUI)
clean:
ocamlbuild -clean
rm -rf _doc.public _doc.private final.zip
docs: docs-public
docs-public: build
mkdir -p _doc.public
ocamlfind ocamldoc -I _build/src -package yojson,ANSITerminal\
-html -stars -d _doc.public $(MLIS)
loc:
cloc --by-file --include-lang=OCaml .
zip:
zip dama.zip *.ml* *.md *.sh _tags .merlin .ocamlformat .ocamlinit LICENSE Makefile images/* src/* images/numbers/* images/pages/*