is_selfatari(): Split the main loop to one per color
[pachi.git] / Makefile
blob3ae955e0391c94340a2af00b7da9bfc600030780
1 #### CONFIGURATION
3 PREFIX=/usr/local
4 BINDIR=$(PREFIX)/bin
6 # -ffast-math breaks us
7 CUSTOM_CFLAGS=-Wall -ggdb3 -O3 -march=native -std=gnu99 -fomit-frame-pointer -frename-registers -pthread
8 SYS_CFLAGS=
9 LDFLAGS=-lm -pthread
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 XLDFLAGS=-fprofile-generate XCFLAGS="-fprofile-generate -fomit-frame-pointer -frename-registers"
41 ./zzgo games=5000,no_book <genmove.gtp
42 @make clean all clean-profiled XLDFLAGS=-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