Remove *.o in binonly as well.
[tetrinet.git] / Makefile
blob8531b1be00e5028d7973b60924e306daad581834
1 CC = cc
3 CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -Wall
4 OBJS = sockets.o tetrinet.o tetris.o tty.o xwin.o
6 ### If you want to have -server tetrinet client option, comment the two lines
7 ### above and uncomment this instead.
9 # CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -DBUILTIN_SERVER -Wall
10 # OBJS = server.o sockets.o tetrinet.o tetris.o tty.o xwin.o
12 ########
14 all: tetrinet tetrinet-server
16 install: all
17 cp -p tetrinet tetrinet-server /usr/games
19 clean:
20 rm -f tetrinet tetrinet-server *.o
22 spotless: clean
24 binonly:
25 rm -f *.[cho] Makefile
26 rm -rf CVS/
28 ########
30 tetrinet: $(OBJS)
31 $(CC) -o $@ $(OBJS) -lncurses
33 tetrinet-server: server.c sockets.c tetrinet.c tetris.c server.h sockets.h tetrinet.h tetris.h
34 $(CC) $(CFLAGS) -o $@ -DSERVER_ONLY server.c sockets.c tetrinet.c tetris.c
36 .c.o:
37 $(CC) $(CFLAGS) -c $<
39 server.o: server.c tetrinet.h tetris.h server.h sockets.h
40 sockets.o: sockets.c sockets.h tetrinet.h
41 tetrinet.o: tetrinet.c tetrinet.h io.h server.h sockets.h tetris.h
42 tetris.o: tetris.c tetris.h tetrinet.h io.h sockets.h
43 tty.o: tty.c tetrinet.h tetris.h io.h
44 xwin.o: xwin.c tetrinet.h tetris.h io.h
46 tetrinet.h: io.h