CFLAGS = -O
#CFLAGS = -g
LIBS = -lm 

EXECS =	players planets message watchmes xtkill scores \
	newscores trimscores showgalaxy

all: $(EXECS)

clean:; rm -f *.o $(EXECS)

watchmes: watchmes.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) watchmes.c $(LIBS)

xtkill: xtkill.c struct.h
	$(CC) -o $@ $(CFLAGS) xtkill.c $(LIBS)

players: players.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) players.c $(LIBS)

pl3: pl3.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) pl3.c $(LIBS)

planets: planets.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) planets.c $(LIBS)

message: message.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) message.c $(LIBS)

scores: scores.c struct.h defs.h
#	gcc -o $@ -g scores.c $(LIBS)
	gcc -o $@ -g scores.c -L/usr/users/terence/lib
#	cp scores /usr/users/terence/bin/trekscores
#	chmod 4711 /usr/users/terence/bin/trekscores

trimscores: trimscores.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) trimscores.c $(LIBS)

newscores: newscores.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) newscores.c $(LIBS)

showgalaxy: showgalaxy.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) showgalaxy.c $(LIBS) -lcurses -ltermcap

wander: wander.c struct.h defs.h
	$(CC) -o $@ -g wander.c ../ntserv/sintab.o $(LIBS)

wander2: wander2.c struct.h defs.h
	$(CC) -o $@ -g wander2.c ../ntserv/sintab.o $(LIBS)

wander3: wander3.c struct.h defs.h
	$(CC) -o $@ -g wander3.c $(LIBS)

setgalaxy: setgalaxy.c struct.h defs.h
	$(CC) -o $@ $(CFLAGS) setgalaxy.c $(LIBS)
