1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
CC = gcc
####### choose the line that makes the binary faster on your machine
# CFLAGS = -O3 -Wall -fomit-frame-pointer -funroll-loops
CFLAGS = -O2 -Wall -fomit-frame-pointer
####### debug/tuning options for developers
# CFLAGS = -O2 -Wall -g3 -static
# CFLAGS = -O3 -Wall -pg
#######
### DEFINES
### -DSHOW_FORCED_MOVES
### -DPBOOK_FILE=\"pbook.phalanx\"
### -DSBOOK_FILE=\"sbook.phalanx\"
### -DLEARN_FILE=\"learn.phalanx\"
### -DPBOOK_DIR=\"/usr/local/lib\"
### -DSBOOK_DIR=\"/usr/local/lib\"
### -DLEARN_DIR=\"/var/local/lib\"
### -DQCAPSONLY
DEFINES = -DPBOOK_DIR=\"/usr/lib/games/phalanx\" -DSBOOK_DIR=\"/usr/lib/games/phalanx\" -DLEARN_DIR=\"/var/lib/games\" -DLEARN_FILE=\"phalanx.learn\"
LDFLAGS = -s
OBJ = .o/search.o .o/io.o .o/data.o .o/evaluate.o \
.o/genmoves.o .o/moving.o .o/hash.o .o/static.o .o/levels.o \
.o/book.o .o/killers.o .o/endgame.o .o/learn.o
all: phalanx bcreate
phalanx: .o .o/phalanx.o $(OBJ)
$(CC) $(CFLAGS) $(DEFINES) $(LDFLAGS) .o/phalanx.o $(OBJ) -o phalanx
bcreate: .o .o/bcreate.o $(OBJ)
$(CC) $(CFLAGS) $(DEFINES) $(LDFLAGS) .o/bcreate.o $(OBJ) -o bcreate
.o/phalanx.o: makefile phalanx.c
$(CC) $(CFLAGS) $(DEFINES) -c phalanx.c -o .o/phalanx.o
.o/bcreate.o: makefile bcreate.c
$(CC) $(CFLAGS) $(DEFINES) -c bcreate.c -o .o/bcreate.o
.o/%.o: makefile %.c
$(CC) $(CFLAGS) $(DEFINES) -c $*.c -o .o/$*.o
.o:
mkdir .o
clean:
rm -rf .o phalanx bcreate
backup:
tar -czvf Archive/phalanx.tgz \
makefile *.c *.h pbook.phalanx sbook.phalanx test.fin
|