File: makefile

package info (click to toggle)
phalanx 22%2Bd051004-14
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 1,444 kB
  • ctags: 973
  • sloc: ansic: 11,916; sh: 80; makefile: 44
file content (45 lines) | stat: -rw-r--r-- 1,209 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
CC = gcc

####### choose the line that makes the binary faster on your machine
# CFLAGS = -O3 -Wall -fomit-frame-pointer -funroll-loops
CFLAGS += -std=c99 -D_GNU_SOURCE

####### 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/phalanx\" -DSBOOK_DIR=\"/usr/share/phalanx\" \
-DLEARN_DIR=\"/var/games\" -DLEARN_FILE=\"phalanx.learn\" -DDEBIAN
#LDFLAGS =

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

.o/%.o: makefile %.c
	$(CC) $(CPPFLAGS) $(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