ChangeLog update
[tetrinet/clach04.git] / Makefile
blob8230179aef44c823e4db985687f1152b268ecb6f
1 CC = cc
3 CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -Wall
4 OBJS = 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
8 ### If you want to have -server tetrinet client option, comment the two lines
9 ### above and uncomment this instead.
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
14 ########
16 all: tetrinet tetrinet-server
18 install: all
19 cp -p tetrinet tetrinet-server /usr/games
21 clean:
22 rm -f tetrinet tetrinet-server *.o
24 spotless: clean
26 binonly:
27 rm -f *.[cho] Makefile
28 rm -rf CVS/
30 ########
32 tetrinet: $(OBJS)
33 $(CC) -o $@ $(OBJS) -lncurses
35 tetrinet-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
38 .c.o:
39 $(CC) $(CFLAGS) -c $<
41 server.o: server.c tetrinet.h tetris.h server.h sockets.h
42 sockets.o: sockets.c sockets.h tetrinet.h
43 tetrinet.o: tetrinet.c tetrinet.h io.h server.h sockets.h tetris.h
44 tetris.o: tetris.c tetris.h tetrinet.h io.h sockets.h
45 tty.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
49 tetrinet.h: io.h