-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (32 loc) · 994 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
MODULES= dictionary trieDictionary board gameplay player proposedMove ProposedSwap state tileInventory main
OBJECTS=$(MODULES:=.cmo)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
TEST=test.byte
MAIN=main.byte
OCAMLBUILD=ocamlbuild -use-ocamlfind
PKGS=unix,oUnit,str,ANSITerminal
GIT_HASH=$(shell git log --pretty=format:'%h' -n 1)
default: build
utop
build:
$(OCAMLBUILD) $(OBJECTS) $(MAIN)
run:
$(OCAMLBUILD) $(OBJECTS) $(MAIN) && ./$(MAIN)
zip:
zip OScrabble-$(GIT_HASH).zip *.ml* _tags Makefile *.txt *.md
test:
$(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
docs: docs-public docs-private
docs-public: build
mkdir -p doc.public
ocamlfind ocamldoc -I _build -package $(PKGS) \
-html -stars -d doc.public $(MLIS)
docs-private: build
mkdir -p doc.private
ocamlfind ocamldoc -I _build -package $(PKGS) \
-html -stars -d doc.private \
-inv-merge-ml-mli -m A -hide-warnings $(MLIS) $(MLS)
clean:
ocamlbuild -clean
rm -rf doc.public doc.private report