42 lines
886 B
Makefile
42 lines
886 B
Makefile
CC = cc
|
|
|
|
CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -Wall
|
|
OBJS = sockets.o tetrinet.o tetris.o tty.o xwin.o
|
|
|
|
### If you want to have -server tetrinet client option, comment the two lines
|
|
### above and uncomment this instead.
|
|
|
|
# CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -DBUILTIN_SERVER -Wall
|
|
# OBJS = server.o sockets.o tetrinet.o tetris.o tty.o xwin.o
|
|
|
|
########
|
|
|
|
all: tetrinet tetrinet-server
|
|
|
|
install: all
|
|
cp -p tetrinet tetrinet-server /usr/games
|
|
|
|
clean:
|
|
rm -f tetrinet tetrinet-server *.o
|
|
|
|
spotless: clean
|
|
|
|
########
|
|
|
|
tetrinet: $(OBJS)
|
|
$(CC) -o $@ $(OBJS) $(LDFLAGS) -lncurses -ltinfo
|
|
|
|
tetrinet-server: server.c sockets.c tetrinet.c tetris.c
|
|
$(CC) $(CFLAGS) -o $@ -DSERVER_ONLY server.c sockets.c tetrinet.c tetris.c
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
server.o: server.c
|
|
sockets.o: sockets.c
|
|
tetrinet.o: tetrinet.c
|
|
tetris.o: tetris.c
|
|
tty.o: tty.c
|
|
xwin.o: xwin.c
|
|
|