#
# Makefile for xsg
#

#
# If you are running on a BSD system, use the following defines:
#
#SYSTYPE = -DBSD
#LIBS = -lm 

#
# If you are running on a System V system (heaven help you), use the following:
#
SYSTYPE = -DSYSV
LIBS = -lm -lsocket -lbsd

#
# If you have support for AT&T starships:
#
ATT = -DHAS_ATT

#
# If you have support for Galaxy class starships:
#
GALAXY = -DHAS_GALAXY

#
# If you have scanning beams as weapon #3 (others are plasmas & tractors):
#
SCANNER = -DHAS_SCANNER

#
# If you have the independent (Iggy) bitmaps:
#
IGGYBITS = -DHAS_IGGYBITS

#
# If you are running the final Bronco release, you may need:
#
FULLHOSTS = -DFULL_HOSTNAMES


OBJS =	main.o \
	input.o \
	smessage.o \
	dmessage.o \
	defaults.o \
	inform.o \
	option.o \
	modify.o \
	playerlist.o \
	planetlist.o \
	planets.o \
	util.o \
	getship.o \
	sysdefaults.o \
	shmem.o \
	data.o \
	sintab.o \
	redraw.o \
	warning.o \
	newwin.o \
	colors.o

SRCS =	main.c \
	input.c \
	smessage.c \
	dmessage.o \
	defaults.c \
	inform.c \
	option.c \
	modify.c \
	playerlist.c \
	planetlist.c \
	planets.c \
	util.c \
	getship.c \
	sysdefaults.c \
	shmem.c \
	data.c \
	sintab.o \
	redraw.c \
	warning.c \
	newwin.c \
	colors.c

INCLUDES =  struct.h \
	    packets.h \
	    defs.h \
	    copyright.h \
	    bitmaps.h \
	    data.h \
	    oldbitmaps.h

X11LIB = -lX11
X11OBJS = x11window.o

#CFLAGS = -g $(SYSTYPE) $(ATT) $(GALAXY) $(SCANNER) $(IGGYBITS) $(FULLHOSTS)
CFLAGS = -O -s $(SYSTYPE) $(ATT) $(GALAXY) $(SCANNER) $(IGGYBITS) $(FULLHOSTS)

xsg:	$(OBJS) $(X11OBJS)
	cc -o xsg $(CFLAGS) $(OBJS) $(X11OBJS) $(X11LIB) $(LIBS)

clean:
	rm -f $(OBJS) $(X11OBJS)
clobber: clean
	rm -f xsg

tar:
	tar cvf xsg.tar README Makefile *.[ch] sample.xsgrc

#####
