UCT: Improve debug message
[pachi.git] / Makefile
blob14918ed02ab858c643c85168cabe383e5920bdda
1 #### CONFIGURATION
3 PREFIX=/usr/local
4 BINDIR=$(PREFIX)/bin
6 # -ffast-math breaks us
7 CUSTOM_CFLAGS=-Wall -ggdb3 -O3 -march=i686 -std=gnu99 -fomit-frame-pointer -frename-registers
8 SYS_CFLAGS=
9 LDFLAGS=-lm
11 # Profiling:
12 # LDFLAGS+=-pg
13 # CUSTOM_CFLAGS+= -pg -fno-inline
15 LD=ld
16 AR=ar
18 ### CONFIGURATION END
20 ifndef INSTALL
21 INSTALL=/usr/bin/install
22 endif
24 export
25 unexport INCLUDES
26 INCLUDES=-I.
29 OBJS=board.o gtp.o move.o playout.o random.o stone.o zzgo.o
30 SUBDIRS=random montecarlo uct uct/policy playout
32 all: all-recursive zzgo
34 LOCALLIBS=random/random.a montecarlo/montecarlo.a uct/uct.a uct/policy/uctpolicy.a playout/playout.a
35 zzgo: $(OBJS) $(LOCALLIBS)
36 $(call cmd,link)
38 .PHONY: zzgo-profiled
39 zzgo-profiled:
40 @make clean all LDFLAGS=-fprofile-generate XCFLAGS="-fprofile-generate -fomit-frame-pointer -frename-registers"
41 echo -e 'boardsize 9\nkomi 0\nclear_board\ngenmove black\ngenmove white' | ./zzgo games=5000
42 @make clean all clean-profiled LDFLAGS=-fprofile-use XCFLAGS="-fprofile-use -fomit-frame-pointer -frename-registers"
44 # install-recursive?
45 install:
46 $(INSTALL) ./zzgo $(DESTDIR)$(BINDIR)
49 clean: clean-recursive
50 rm -f zzgo *.o
52 clean-profiled: clean-profiled-recursive
53 rm -f *.gcda *.gcno
55 -include Makefile.lib