kgs-genmove_cleanup, UCT pass_all_alive: Fix up semantics
[pachi/derm.git] / Makefile
blobbfc56880f31eabf3fca659ac775f09ffaf73471d
1 #### CONFIGURATION
3 # PROFILING=1
5 PREFIX=/usr/local
6 BINDIR=$(PREFIX)/bin
8 # -ffast-math breaks us
9 CUSTOM_CFLAGS=-Wall -ggdb3 -O3 -march=native -std=gnu99 -frename-registers -pthread
10 SYS_CFLAGS=
11 LDFLAGS=-lm -pthread -lrt
13 # Profiling:
14 ifdef PROFILING
15 LDFLAGS+=-pg
16 CUSTOM_CFLAGS+=-pg -fno-inline
17 else
18 # Whee, an extra register!
19 CUSTOM_CFLAGS+=-fomit-frame-pointer
20 endif
22 LD=ld
23 AR=ar
25 ### CONFIGURATION END
27 ifndef INSTALL
28 INSTALL=/usr/bin/install
29 endif
31 export
32 unexport INCLUDES
33 INCLUDES=-I.
36 OBJS=board.o gtp.o move.o ownermap.o pattern3.o pattern.o patternsp.o playout.o probdist.o random.o stone.o tactics.o timeinfo.o network.o
37 SUBDIRS=random replay patternscan montecarlo uct uct/policy playout t-unit distributed
39 all: all-recursive zzgo
41 LOCALLIBS=random/random.a replay/replay.a patternscan/patternscan.a montecarlo/montecarlo.a uct/uct.a uct/policy/uctpolicy.a playout/playout.a t-unit/test.a distributed/distributed.a
42 zzgo: $(OBJS) zzgo.o $(LOCALLIBS)
43 $(call cmd,link)
45 .PHONY: zzgo-profiled
46 zzgo-profiled:
47 @make clean all XLDFLAGS=-fprofile-generate XCFLAGS="-fprofile-generate -fomit-frame-pointer -frename-registers"
48 ./zzgo -t =5000 no_book <genmove.gtp
49 @make clean all clean-profiled XLDFLAGS=-fprofile-use XCFLAGS="-fprofile-use -fomit-frame-pointer -frename-registers"
51 # install-recursive?
52 install:
53 $(INSTALL) ./zzgo $(DESTDIR)$(BINDIR)
56 clean: clean-recursive
57 rm -f zzgo *.o
59 clean-profiled: clean-profiled-recursive
60 rm -f *.gcda *.gcno
62 -include Makefile.lib