#
# Tn Makefile
#

INCLUDE         = 

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

CFLAGS = ${INCLUDE} -O4

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

XVIEW_LIBS      = 

DEST = ~jwh/bin

OBJS = tn.o

SRCS = tn.c

INCLUDES =	

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

TARFILES = ${SRCS} ${INCLUDES} Makefile

install:
	-mkdir $(DEST)
	strip tn
	-cp tn  $(DEST)

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

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

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

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

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

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


#####
