CC=gcc
SRCS  = pokerd.c util.c
OBJS  = $(SRCS:.c=.o)
SRCS1 = xp_poker.c xp_window.c cards.c common.c xcommon.c util.c \
		f_fonts.c f_inter.c ps_italic.c xp_event.c
OBJS1 = $(SRCS1:.c=.o)

#
# define the type of system programs are being made on
# currently this is only important for MASSCOMP machines because some
# socket routine calls and include files are different than 4.2BSD
#CFLAGS= -DMASSCOMP
# add local stuff -kl-
#CFLAGS= -DVAX -DUNIDO -g -Wall -D__USE_FIXED_PROTOTYPES__
#

CFLAGS= -g -Wall -D__USE_FIXED_PROTOTYPES__

all:	poker pokerd

pokerd:	$(OBJS)
	gcc $(OBJS) -o pokerd
poker:	$(OBJS1)
	gcc $(OBJS1) -o poker -lXpm -lX11 -lXmu

ctags0:
	ctags $(SRCS) *.h
ctags1:
	ctags $(SRCS1) *.h

clean:
	rm -f pokerd poker *.o core
depend:
	makedepend -- $(CFLAGS) -- -Y $(SRCS1)

#
# This 'target' simply makes a new Makefile (after saving the current one
# in Makefile.old) with added dependencies for header files included
# in the listed source files.
#depend:
#	mv Makefile Makefile.old
#	sed -n '1,/^# DO NOT REMOVE THIS LINE/p' Makefile.old > Makefile
#	grep '^#[ 	]*include[ 	]*["]' $(SRCS) | \
#		sed -e 's/\.[^:]*:#[ 	]*include[ 	]*/.o:	/' \
#		    -e 's/"\([^"]*\)".*/\1/' \
#		    -e 's@<\([^>]*\)>.*@/usr/include/\1@' >> Makefile
#
# Lines after this block of comments are replace every time the new dependency
# information is created using 'make depend'.  The next line is crucial.
# DO NOT DELETE

xp_poker.o: common.h util.h port.h limits.h
xp_window.o: common.h xcommon.h xp_window.h cards.h limits.h util.h
cards.o: common.h cards.h bitmaps/rank.bm bitmaps/face.bm bitmaps/suit.bm
common.o: common.h
xcommon.o: common.h xcommon.h
util.o: util.h
f_fonts.o: common.h f_fonts.h
f_inter.o: common.h xcommon.h f_fonts.h f_inter.h
ps_italic.o: common.h f_fonts.h ps_italic.h
xp_event.o: common.h xcommon.h f_fonts.h f_inter.h ps_italic.h
