-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
101 lines (82 loc) · 1.83 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
EXEC_PY="./exec-py.py"
test: unittests apptests
######################################################################
#
# app-tests
#
GAME_SIMS= holdem \
omaha \
omahahilo \
fivecardstud \
fivecardstudhilo \
sevencardstud \
sevencardstudhilo
OTHER_APPS= holdem-best-hand \
holdem-best-suited-hand \
holdem-domination \
board-low-analyze \
board-flush-analyze \
omaha8-eval
apptests: game-sims $(OTHER_APPS) sha
game-sims: $(GAME_SIMS)
$(GAME_SIMS):
@echo "Running $@ simulation:"
@$(EXEC_PY) apps/poker-sim.py -p -g $@
$(OTHER_APPS):
@$(EXEC_PY) apps/[email protected]
sha:
@$(EXEC_PY) apps/sha.py -v apps/sha-input
######################################################################
#
# Profiling
#
# Make a copy of all the current profiles in snapshot subdirectory
profile-snapshot:
@test -d profile/snapshot || mkdir profile/snapshot
@for profile in profile/*.pstats ; do \
cp $${profile} profile/snapshot ;\
done
profiles:
@for game in $(GAME_SIMS) ; do \
echo -n Profiling $${game}: ;\
$(EXEC_PY) apps/poker-sim.py -q -g $${game} \
-P profile/$${game}.pstats || exit 1;\
$(EXEC_PY) profile/print-pstats.py -t profile/$${game}.pstats ;\
done
######################################################################
#
# unittests
#
# List in order to be tested
UNITTESTS = \
test-testing \
test-Utils \
test-Action \
test-Bitfield \
test-Cards \
test-PredefinedCards \
test-Deck \
test-Hand \
test-Hands \
test-HoldEm \
test-LowRanker \
test-Omaha \
test-FiveCardStud \
test-SevenCardStud \
test-PokerRank \
test-HandGenerator \
test-Player \
test-PokerGame \
test-Ranker
unittests: $(UNITTESTS)
$(UNITTESTS):
@echo "$@:"
@$(EXEC_PY) unittests/[email protected]
######################################################################
#
# Documentation
#
doc:
@(cd pyPoker; pydoc -w ./*.py)
@mv pyPoker/*.html doc/
.PHONY: doc