#
# Check Players Makefile
#

CFLAGS = -O4

DEST = ../nt/tools

OBJS =	data.o \
	socket.o \
	reserved.o \
	main.o \
	enter.o

SRCS =  data.c \
	socket.c \
	reserved.c \
	main.c \
	enter.c

INCLUDES =	Wlib.h \
		defs.h \
		struct.h \
		data.h \
		packets.h \
		copyright.h \
		copyright2.h 

ck_players:  ${OBJS}
	cc -o ck_players ${OBJS} 

TARFILES = ${SRCS} ${INCLUDES} Makefile

install:
	-mkdir ../nt
	-mkdir $(DEST)
	strip ck_players
	-cp ck_players  $(DEST)

clean:
	rm -f $(OBJS) ck_players *~

tags: $(SRCS) $(INCLUDES)
	ctags $(SRCS)

ck_players.tar: ${SRCS} ${INCLUDES}
	@echo "Tarring files...";\
	tar cvf ck_players.tar ${TARFILES}

ck_players.tar.Z: ck_players.tar
	@rm -f ck_players.tar.Z;\
	echo "Compressing...";\
	compress -v ck_players.tar;\
	touch ck_players.tar;\
	touch ck_players.tar.Z

ck_players.tar.Z.uu: ck_players.tar.Z
	@echo "uuencoding...";\
	uuencode ck_players.tar.Z ck_players.tar.Z > ck_players.tar.Z.uu
	
release:  ck_players.tar.Z.uu
	@rm -f ck_players.post.* ;\
	split -100 ck_players.tar.Z.uu ck_players.post. ;\
	du -s ck_players.post.* ;\
	echo "READY FOR RELEASE "



		
list: 
	ls -l ${SRCS} ${INCLUDES} 

ALWAYS_MAKE:

test_tar: ALWAYS_MAKE
	touch ${SRCS};\
	make tar;\
	rm -rf testdir;\
	mkdir testdir;\
	mv ck_players.tar testdir;\
	(cd testdir; tar xvf ck_players.tar; make ck_players ) 

shar: ${TARFILES}
	shar -v -c -f -o ck_players.shar ${TARFILES}


#####
