forked from online-go/score-estimator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (28 loc) · 980 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
VERSION=1.0
OBJ=estimator.o
cxx=g++ -O2 -g3 -Wall --pedantic --std=c++11 -DDEBUG=1
#cxx=clang++ -O2 -g3 -Wall --pedantic --std=c++11 -DDEBUG=1
EMCC_FLAGS=-s EXPORTED_FUNCTIONS="['_estimate']" --memory-init-file 0
all build: estimator
test: build
./estimator test_games/1776378.game
test-all: build
./estimator test_games/*.game
js-debug:
emcc $(EMCC_FLAGS) -s DEMANGLE_SUPPORT=1 -s ASSERTIONS=2 -O1 -g3 jsbindings.cc -o score_estimator.js
js:
emcc $(EMCC_FLAGS) -O2 -g0 jsbindings.cc -o score_estimator.js
@rm -f score_estimator.js.gz
@gzip -k score_estimator.js
@echo
@echo Uncompressed: `wc -c score_estimator.js | awk '{print $$1}'` bytes
@echo Compressed: `wc -c score_estimator.js.gz | awk '{print $$1}'` bytes
@echo
estimator.o: estimator.cc estimator.h Makefile
$(cxx) -c estimator.cc
estimator: $(OBJ) main.cc
$(cxx) main.cc $(OBJ) -o estimator
grind: build
valgrind --tool=cachegrind ./estimator test_games/*.game
clean:
rm -f estimator *.o *.js