File: makefile

package info (click to toggle)
phalanx 21-12
  • links: PTS
  • area: main
  • in suites: potato
  • size: 808 kB
  • ctags: 524
  • sloc: ansic: 6,749; sh: 81; makefile: 64
file content (46 lines) | stat: -rw-r--r-- 1,226 bytes parent folder | download
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

CC = gcc

####### choose the line that makes the binary faster on your machine
CFLAGS = -g -O3 -Wall -fomit-frame-pointer -funroll-loops
#CFLAGS = -O -fomit-frame-pointer

####### debug/tuning options for developers
# CFLAGS = -O -Wall -g3 -static
# CFLAGS = -O -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 = -DGNUFUN -DPBOOK_DIR=\"/usr/share/games/phalanx\" -DSBOOK_DIR=\"/usr/lib/games/phalanx\" -DLEARN_DIR=\"/var/games\" -DLEARN_FILE=\"phalanx.learn\" -DDEBIAN
LDFLAGS = #-s

OBJ = .o/phalanx.o .o/bcreate.o .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

phalanx: .o $(OBJ)
	$(CC) $(CFLAGS) $(DEFINES) $(LDFLAGS) $(OBJ) -o phalanx
	strip phalanx

.o/%.o: makefile %.c
	$(CC) $(CFLAGS) $(DEFINES) -c $*.c -o .o/$*.o

.o:
	mkdir .o

clean:
	rm -rf .o phalanx

backup:
	tar -czvf Archive/phalanx.tgz \
	makefile *.c *.h pbook.phalanx sbook.phalanx test.fin