#
# Check Players Makefile
#

INCLUDE         = -I/usr/local/include

#
# If you want to compile for debugging, change "-O4" to "-g"
#

CFLAGS = ${INCLUDE} -O4

# if you want special to pass special loader options to ld, set
# LDFLAGS= ...
#

XVIEW_LIBS      = -L/bham/X11/lib -lxview -lolgx -lX11

DEST = ~jwh/bin

OBJS = check.o

SRCS = check.c

INCLUDES =	0.icon \
		1.icon \
		2.icon \
		3.icon \
		4.icon \
		5.icon \
		6.icon \
		7.icon \
		8.icon \
		9.icon \
		10.icon \
		11.icon \
		12.icon \
		13.icon \
		14.icon \
		15.icon \
		16.icon \
		17.icon \
		18.icon \
		19.icon \
		20.icon \
		Tmode.icon \
		down.icon \
		wait.icon

check:  ${OBJS}
	cc -O4 -o check ${OBJS} $(XVIEW_LIBS)

TARFILES = ${SRCS} ${INCLUDES} Makefile

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

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

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

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

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

check.tar.Z.uu: check.tar.Z
	@echo "uuencoding...";\
	uuencode check.tar.Z check.tar.Z > check.tar.Z.uu
	
release:  check.tar.Z.uu
	@rm -f check.post.* ;\
	split -100 check.tar.Z.uu check.post. ;\
	du -s check.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 check.tar testdir;\
	(cd testdir; tar xvf check.tar; make check ) 

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


#####
