8 # -ffast-math breaks us
9 CUSTOM_CFLAGS
=-Wall
-ggdb3
-O3
-std
=gnu99
-frename-registers
-pthread
-Wsign-compare
-D_GNU_SOURCE
11 SYS_CFLAGS
=-DNO_THREAD_LOCAL
12 LDFLAGS
=-lm
-pthread
-ldl
-rdynamic
14 SYS_CFLAGS
=-march
=native
15 LDFLAGS
=-lm
-pthread
-lrt
-ldl
-rdynamic
18 # Use make DOUBLE=1 in large configurations with counts > 1M
19 # where 24 bits of floating_t mantissa become insufficient.
21 CUSTOM_CFLAGS
+=-DDOUBLE
27 CUSTOM_CFLAGS
+=-pg
-fno-inline
29 # Whee, an extra register!
30 CUSTOM_CFLAGS
+=-fomit-frame-pointer
39 INSTALL
=/usr
/bin
/install
47 OBJS
=board.o gtp.o move.o ownermap.o pattern3.o playout.o probdist.o random.o stone.o timeinfo.o network.o fbook.o
48 SUBDIRS
=random replay joseki montecarlo uct uct
/policy playout tactics t-unit distributed
50 all: all-recursive zzgo
52 LOCALLIBS
=random
/random.a replay
/replay.a joseki
/joseki.a montecarlo
/montecarlo.a uct
/uct.a uct
/policy
/uctpolicy.a playout
/playout.a tactics
/tactics.a t-unit
/test.a distributed
/distributed.a
53 zzgo
: $(OBJS
) zzgo.o
$(LOCALLIBS
)
58 @make
clean all XLDFLAGS
=-fprofile-generate XCFLAGS
="-fprofile-generate -fomit-frame-pointer -frename-registers"
59 .
/zzgo
-t
=5000 no_tbook
<tools
/genmove19.gtp
60 @make
clean all clean-profiled XLDFLAGS
=-fprofile-use XCFLAGS
="-fprofile-use -fomit-frame-pointer -frename-registers"
64 $(INSTALL
) .
/zzgo
$(DESTDIR
)$(BINDIR
)
67 clean: clean-recursive
70 clean-profiled
: clean-profiled-recursive