This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
266 lines (224 loc) · 8.61 KB
/
Makefile.am
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
AUTOMAKE_OPTIONS = foreign
install: patch-phoenix
$(PYTHON) $(srcdir)/setup.py build install
mkdir -p $(srcdir)/sandbox
make create-sandbox
make prepare-interfaces
PHOENIX_DEBUG_DIR = "$(PROGRAM_FILES)/Phoenix SDK June 2008/bin/debug"
patch-phoenix:
cp $(srcdir)/ext/phx-bat.diff $(PHOENIX_DEBUG_DIR)
-cd $(PHOENIX_DEBUG_DIR) && patch -N < phx-bat.diff
rm -f $(PHOENIX_DEBUG_DIR)/phx-bat.diff
rm -f $(PHOENIX_DEBUG_DIR)/phxvars32d.bat.orig
rm -f $(PHOENIX_DEBUG_DIR)/phxvars32d.bat.rej
$(PHOENIX_DEBUG_DIR)/phxvars32d.bat x86
create-sandbox:
mkdir -p $(srcdir)/sandbox
cp $(srcdir)/src/bin/analyzeProject.py $(srcdir)/sandbox
cp $(srcdir)/src/bin/sampleProjectConfig.xml $(srcdir)/sandbox
prepare-interfaces:
rm -f $(srcdir)/gametime-cli.exe
rm -f $(srcdir)/gametime-gui.exe
cd $(srcdir) && \
mkshortcut "$(PYTH_SCRIPTSDIR_UNIX)/gametime-cli.exe" \
-n gametime-cli && \
mkshortcut "$(PYTH_SCRIPTSDIR_UNIX)/gametime-gui.exe" \
-n gametime-gui
# Primarily for development.
find-project-configs:
find $(srcdir) -iname "*projectConfig.xml" -print
# Primarily for development.
configure-cil:
cd $(srcdir)/src/cil && ./configure
# Primarily for development.
patch-cil:
-cd $(srcdir)/src/cil/src && \
dos2unix -f rmtmps.* && \
patch -f < rmtmps.diff
rm -f $(srcdir)/src/cil/src/rmtmps.ml.orig
rm -f $(srcdir)/src/cil/src/rmtmps.ml.rej
-cd $(srcdir)/src/cil/src/ext/inliner && \
dos2unix -f inliner.* && \
patch -f < inliner.diff
rm -f $(srcdir)/src/cil/src/ext/inliner/inliner.ml.orig
rm -f $(srcdir)/src/cil/src/ext/inliner/inliner.ml.rej
# -cd $(srcdir)/src/cil/src/frontc && \
# dos2unix -f cabs2cil.* && \
# patch -f < cabs2cil.diff
# rm -f $(srcdir)/src/cil/src/frontc/cabs2cil.ml.orig
# rm -f $(srcdir)/src/cil/src/frontc/cabs2cil.ml.rej
# Primarily for development.
cil-modules:
cd $(CURDIR)/src/ocaml/loopHandler && \
OCAMLPATH=$(CURDIR)/src/ocaml/lib ocamlbuild -use-ocamlfind \
-package cil loopHandler.cma loopHandler.cmxs && \
OCAMLFIND_DESTDIR=$(CURDIR)/src/ocaml/lib ocamlfind \
remove loopHandler && \
OCAMLFIND_DESTDIR=$(CURDIR)/src/ocaml/lib ocamlfind \
install loopHandler META _build/loopHandler.cma _build/loopHandler.cmxs
# Primarily for development.
cil: patch-cil
rm -rf $(srcdir)/tmp
mkdir $(srcdir)/tmp
cp $(srcdir)/src/cil/bin/cilly.bat.in $(srcdir)/tmp
make -C $(srcdir)/src/cil
make -C $(srcdir)/src/cil install-findlib \
OCAMLFIND_DESTDIR=../../src/ocaml/lib
cp $(srcdir)/tmp/cilly.bat.in $(srcdir)/src/cil/bin/cilly.bat.in
rm -rf $(srcdir)/tmp
-make cil-modules
# Primarily for development.
build-ocaml:
cd $(CURDIR)/src/ocaml/loopHandler && \
OCAMLPATH=$(CURDIR)/src/ocaml/lib ocamlbuild -use-ocamlfind \
-package cil loopHandler.cma loopHandler.cmxs
# Primarily for development.
build-phoenix:
make -C $(srcdir)/src/phoenix
# Primarily for development.
update-dll: build-phoenix
cp $(srcdir)/src/phoenix/GameTime/bin/Debug/*.dll $(srcdir)/src/bin/
# Primarily for development.
clean-phoenix:
make -C $(srcdir)/src/phoenix clean
# Primarily for development.
demo-clean:
find $(srcdir)/demo -name "*-gt" -type d | xargs rm -rf
find $(srcdir)/demo -name "*.pyc" | xargs rm -rf
find $(srcdir)/demo -name "analysis" -type d | xargs rm -rf
sandbox-clean:
find $(srcdir)/sandbox -name "*-gt" -type d | xargs rm -rf
find $(srcdir)/sandbox -name "*.pyc" | xargs rm -rf
find $(srcdir)/sandbox -name "analysis" -type d | xargs rm -rf
gui:
$(PYTHON) $(srcdir)/src/gui/gui.py
# Primarily for development.
gui-dev: install
$(PYTHON) $(srcdir)/src/gui/gui.py
# Primarily for development.
gui-clean:
find $(srcdir)/src/gui -name "*.pyc" | xargs rm -rf
test: install
$(PYTHON) $(srcdir)/tests/analyzeTest.py
# Primarily for development.
test-dev: update-dll test
# Primarily for development.
test-clean:
find $(srcdir)/tests -name "*-gt" -type d | xargs rm -rf
find $(srcdir)/tests -name "*.pyc" | xargs rm -rf
test-all: install
$(PYTHON) $(srcdir)/tests/testHarness.py
# Primarily for development.
test-all-dev: update-dll test-all
$(PYTHON) $(srcdir)/tests/testHarness.py
# Primarily for development.
test-all-clean: test-clean
doc-html: install
make -C $(srcdir)/doc html
doc-latex: install
make -C $(srcdir)/doc latex
doc-clean:
make -C $(srcdir)/doc clean
show-doc:
cygstart $(srcdir)/doc/build/html/index.html
# Primarily for development.
pyflakes:
-@for filename in `find $(srcdir)/src -maxdepth 1 \
-name "*.py" -not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pyflakes.exe $$filename ; \
done
-@for filename in `find $(srcdir)/src/gui -name "*.py" \
-not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pyflakes.exe $$filename ; \
done
-@for filename in `find $(srcdir)/src/simulators -name "*.py" \
-not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pyflakes.exe $$filename ; \
done
-@for filename in `find $(srcdir)/src/smt -name "*.py" \
-not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pyflakes.exe $$filename ; \
done
# Primarily for development.
pylint-src:
-@for filename in `find $(srcdir)/src -maxdepth 1 \
-name "*.py" -not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pylint.exe $$filename \
--rcfile=$(srcdir)/src/config-pylint.rc ; \
done
# Primarily for development.
pylint-gui:
-@for filename in `find $(srcdir)/src/gui -name "*.py" \
-not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pylint.exe $$filename \
--rcfile=$(srcdir)/src/config-pylint.rc ; \
done
# Primarily for development.
pylint-simulators:
-@for filename in `find $(srcdir)/src/simulators -name "*.py" \
-not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pylint.exe $$filename \
--rcfile=$(srcdir)/src/config-pylint.rc ; \
done
# Primarily for development.
pylint-smt:
-@for filename in `find $(srcdir)/src/smt -name "*.py" \
-not -name "__init__.py"` ; do \
$(PYTH_SCRIPTSDIR_UNIX)/pylint.exe $$filename \
--rcfile=$(srcdir)/src/config-pylint.rc ; \
done
# Primarily for development.
pylint: pylint-src pylint-gui pylint-simulators pylint-smt
# Primarily for development.
prepare-scripts:
dos2unix -f $(srcdir)/configure
dos2unix $(srcdir)/verify-installation
dos2unix $(srcdir)/src/bin/analyze.in
dos2unix $(srcdir)/src/bin/gametime-cli.bat.in
dos2unix $(srcdir)/src/bin/gametime-gui.bat.in
dos2unix $(srcdir)/src/bin/gui.in
# Primarily for development.
trim: prepare-scripts
-find $(srcdir) -maxdepth 1 -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir) -name "*.xml" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/doc -name "*.css" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/sandbox -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src -maxdepth 1 -name "*.in" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src -maxdepth 1 -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src/bin -name "*.in" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src/bin -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src/gui -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src/ocaml -name "*.ml" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src/simulators -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/src/smt -name "*.py" | xargs sed -i "s/^ *$$//g"
-find $(srcdir)/tests -name "*.py" | xargs sed -i "s/^ *$$//g"
# Primarily for development. This rule is maintained separately since it
# takes some time to complete, and should be used sparingly.
trim-tests:
-find $(srcdir)/tests -name "*.c" | xargs sed -i "s/^ *$$//g"
# Primarily for development. This rule is used whenever a new distribution
# of GameTime needs to be created and released.
distribution: install
python $(srcdir)/setup.py sdist --formats=gztar,zip
cp $(srcdir)/LICENSE $(srcdir)/web/about
cp $(srcdir)/sandbox/sampleProjectConfig.xml $(srcdir)/web/documentation
make update-website-info
update-website-info:
sed -e "s/[@]VERSION[@]/$(VERSION)/g" \
$(srcdir)/web/static/php/version.php.in > \
$(srcdir)/web/static/php/version.php
clean-local: trim
$(PYTHON) $(srcdir)/setup.py clean
rm -rf $(srcdir)/build
rm -f $(srcdir)/ez_setup.pyc
rm -rf $(srcdir)/gametime.egg-info
rm -f $(srcdir)/gametime-cli.lnk
rm -f $(srcdir)/gametime-gui.lnk
rm -f $(srcdir)/sandbox/analyzeProject.py
rm -f $(srcdir)/sandbox/sampleProjectConfig.xml
find $(srcdir) -name "gurobi.log" | xargs rm -f
find $(srcdir) -name "*.csprojResolveAssemblyReference.cache" | \
xargs rm -f
distclean-local: demo-clean gui-clean test-clean
# Primarily for development.
pre-commit: pyflakes pylint distclean