Distributed engine: Do not forward unsupported gtp commands to slaves
[pachi/nmclean.git] / Makefile
blob41d55a980aa6f23d1d77c158f4d10c6d09494d10
1 #### CONFIGURATION
3 # PROFILING=1
5 PREFIX=/usr/local
6 BINDIR=$(PREFIX)/bin
8 # -ffast-math breaks us
9 CUSTOM_CFLAGS=-Wall -ggdb3 -O3 -std=gnu99 -frename-registers -pthread -Wsign-compare -D_GNU_SOURCE
10 ifdef MAC
11 SYS_CFLAGS=-DNO_THREAD_LOCAL
12 LDFLAGS=-lm -pthread -ldl -rdynamic
13 else
14 SYS_CFLAGS=-march=native
15 LDFLAGS=-lm -pthread -lrt -ldl -rdynamic
16 endif
18 # Use make DOUBLE=1 in large configurations with counts > 1M
19 # where 24 bits of floating_t mantissa become insufficient.
20 ifdef DOUBLE
21 CUSTOM_CFLAGS+=-DDOUBLE
22 endif
24 # Profiling:
25 ifdef PROFILING
26 LDFLAGS+=-pg
27 CUSTOM_CFLAGS+=-pg -fno-inline
28 else
29 # Whee, an extra register!
30 CUSTOM_CFLAGS+=-fomit-frame-pointer
31 endif
33 LD=ld
34 AR=ar
36 ### CONFIGURATION END
38 ifndef INSTALL
39 INSTALL=/usr/bin/install
40 endif
42 export
43 unexport INCLUDES
44 INCLUDES=-I.
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)
54 $(call cmd,link)
56 .PHONY: zzgo-profiled
57 zzgo-profiled:
58 @make clean all XLDFLAGS=-fprofile-generate XCFLAGS="-fprofile-generate -fomit-frame-pointer -frename-registers"
59 ./zzgo -t =5000 no_tbook <genmove19.gtp
60 @make clean all clean-profiled XLDFLAGS=-fprofile-use XCFLAGS="-fprofile-use -fomit-frame-pointer -frename-registers"
62 # install-recursive?
63 install:
64 $(INSTALL) ./zzgo $(DESTDIR)$(BINDIR)
67 clean: clean-recursive
68 rm -f zzgo *.o
70 clean-profiled: clean-profiled-recursive
71 rm -f *.gcda *.gcno
73 -include Makefile.lib