File: Makefile

package info (click to toggle)
tetrinet 0.11%2BCVS20070911-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 332 kB
  • sloc: ansic: 4,410; makefile: 41
file content (74 lines) | stat: -rw-r--r-- 1,517 bytes parent folder | download | duplicates (3)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
######## Configuration area

# Your C compiler
CC = cc

# The passed compilation flags
CFLAGS = -O2 -I/usr/include/ncurses -g -Wall -fno-builtin-log

# Whether to enable IPv6 support
IPV6 = 1

# Whether to have builtin server in the tetrinet client (available through
# -server argument) (tetrinet-server will be built always regardless this)
# BUILTIN_SERVER = 1

# If you experience random delays and server freezes when accepting new
# clients, enable this.
# NO_BRUTE_FORCE_DECRYPTION = 1


######## End of configuration area


OBJS = sockets.o tetrinet.o tetris.o tty.o

ifdef IPV6
	CFLAGS += -DHAVE_IPV6
endif
ifdef BUILTIN_SERVER
	CFLAGS += -DBUILTIN_SERVER
	OBJS += server.o
endif
ifdef NO_BRUTE_FORCE_DECRYPTION
	CFLAGS += -DNO_BRUTE_FORCE_DECRYPTION
endif


########


all: tetrinet tetrinet-server

install: all
	cp -p tetrinet tetrinet-server /usr/games

clean:
	rm -f tetrinet tetrinet-server *.o

spotless: clean

binonly:
	rm -f *.[cho] Makefile
	rm -rf CVS/


########


tetrinet: $(OBJS)
	$(CC) -o $@ $(OBJS) -lncurses

tetrinet-server: server.c sockets.c tetrinet.c tetris.c server.h sockets.h tetrinet.h tetris.h
	$(CC) $(CFLAGS) -o $@ -DSERVER_ONLY server.c sockets.c tetrinet.c tetris.c

.c.o:
	$(CC) $(CFLAGS) -c $<

server.o:	server.c tetrinet.h tetris.h server.h sockets.h
sockets.o:	sockets.c sockets.h tetrinet.h
tetrinet.o:	tetrinet.c tetrinet.h io.h server.h sockets.h tetris.h
tetris.o:	tetris.c tetris.h tetrinet.h io.h sockets.h
tty.o:		tty.c tetrinet.h tetris.h io.h

tetrinet.h:	io.h