-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
104 lines (77 loc) · 2.74 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
MODULES=card player state main computer constants testHelper test windowGui mainFunctions windowChangeColor windowIntermission windowSwapPlayer windowMain windowIntro winSelect windowHelp windowEndGame
OBJECTS=$(MODULES:=.cmo)
BYTES=$(MODULES:=.byte)
MLS=$(MODULES:=.ml)
MLIS=$(MODULES:=.mli)
MODDOCS = card player state main computer author
DOCS=$(MODDOCS:=.mli)
OCAMLBUILD=ocamlbuild -use-ocamlfind
CARDTEST=cardTest.byte
PLAYERTEST=playerTest.byte
STATETEST=stateTest.byte
COMPUTERTEST=computerTest.byte
TEST=test.byte
MAIN=main.byte
GUI=GUIMain.byte
default: build
utop: build
OCAMLRUNPARAM=b utop
build:
$(OCAMLBUILD) $(OBJECTS)
card-test:
$(OCAMLBUILD) -tag 'debug' $(CARDTEST) && ./$(CARDTEST) -runner sequential
player-test:
$(OCAMLBUILD) -tag 'debug' $(PLAYERTEST) && ./$(PLAYERTEST) -runner sequential
state-test:
$(OCAMLBUILD) -tag 'debug' $(STATETEST) && ./$(STATETEST) -runner sequential
computer-test:
$(OCAMLBUILD) -tag 'debug' $(COMPUTERTEST) && ./$(COMPUTERTEST) -runner sequential
test:
$(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
uno:
$(OCAMLBUILD) -tag 'debug' $(MAIN) && OCAMLRUNPARAM=b ./$(MAIN)
uno-gui:
$(OCAMLBUILD) -tag 'debug' $(GUI) && OCAMLRUNPARAM=b ./$(GUI)
bisect-test:
BISECT_COVERAGE=YES $(OCAMLBUILD) -tag 'debug' $(TEST) && ./$(TEST) -runner sequential
bisect: clean bisect-test
bisect-ppx-report html
docs: docs-public docs-private
docs-public: build
mkdir -p _doc.public
ocamlfind ocamldoc -I _build -package yojson,ANSITerminal \
-html -stars -d _doc.public $(DOCS)
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 $(DOCS)
clean:
ocamlbuild -clean
rm -rf _coverage bisect*.coverage _doc.public _doc.private uno-game.zip
zip:
zip uno-game.zip *.ml* *.json *.sh INSTALL.txt _tags .merlin .ocamlformat .ocamlinit LICENSE Makefile game_assets/* cards/* text_assets/*
window:
ocamlbuild -package graphics windowMain.native -use-ocamlfind
./WindowMain.native
change-color:
ocamlbuild -package graphics windowChangeColor.native -use-ocamlfind
./WindowChangeColor.native
window-swap-player:
ocamlbuild -package graphics windowSwapPlayer.native -use-ocamlfind
./WindowSwapPlayer.native
intermission:
ocamlbuild -package graphics windowIntermission.native -use-ocamlfind
./WindowIntermission.native
intro-win:
ocamlbuild -package graphics windowIntro.native -use-ocamlfind
./WindowIntro.native
select-win:
ocamlbuild -package graphics winSelect.native -use-ocamlfind
./WinSelect.native
help-win:
ocamlbuild -package graphics windowHelp.native -use-ocamlfind
./WindowHelp.native
end-game:
ocamlbuild -package graphics windowEndGame.native -use-ocamlfind
./WindowEndGame.native