1CC = cc
2
3CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -Wall
4OBJS = sockets.o tetrinet.o tetris.o tty.o
5### no xwin.o, because it isn't done yet
6# OBJS = sockets.o tetrinet.o tetris.o tty.o xwin.o
7
8### If you want to have -server tetrinet client option, comment the two lines
9### above and uncomment this instead.
10
11# CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -DBUILTIN_SERVER -Wall
12# OBJS = server.o sockets.o tetrinet.o tetris.o tty.o xwin.o
13
14########
15
16all: tetrinet tetrinet-server
17
18install: all
19	cp -p tetrinet tetrinet-server /usr/games
20
21clean:
22	rm -f tetrinet tetrinet-server *.o
23
24spotless: clean
25
26binonly:
27	rm -f *.[cho] Makefile
28	rm -rf CVS/
29
30########
31
32tetrinet: $(OBJS)
33	$(CC) -o $@ $(OBJS) $(LDFLAGS) -lncurses
34
35tetrinet-server: server.c sockets.c tetrinet.c tetris.c server.h sockets.h tetrinet.h tetris.h
36	$(CC) $(CFLAGS) -o $@ -DSERVER_ONLY server.c sockets.c tetrinet.c tetris.c
37
38.c.o:
39	$(CC) $(CFLAGS) -c $<
40
41server.o:	server.c tetrinet.h tetris.h server.h sockets.h
42sockets.o:	sockets.c sockets.h tetrinet.h
43tetrinet.o:	tetrinet.c tetrinet.h io.h server.h sockets.h tetris.h
44tetris.o:	tetris.c tetris.h tetrinet.h io.h sockets.h
45tty.o:		tty.c tetrinet.h tetris.h io.h
46### no xwin.o, because it isn't done yet
47#xwin.o:		xwin.c tetrinet.h tetris.h io.h
48
49tetrinet.h:	io.h
50