#	Makefile for the compact program.
#
#	@(#)Makefile	1.7 10/27/90
#
#	This is FREE software in the PUBLIC DOMAIN.
#
#	This program may be used only for research into data
#	compression techniques.  See WARNING section in
#	compact(1) manual page for further discussion.

BIN	= /usr/local/bin
MAN	= /usr/man/mann
MANSUF	= n

SHAR	= README Makefile compact.1 compact.c share.c smtest.c 

CFLAGS = -O

compact: compact.o share.o
	cc -o compact compact.o share.o

smtest: smtest.o share.o
	cc -o smtest smtest.o share.o

install: compact compact.1
	rm -f $(BIN)/compact $(BIN)/uncompact
	cp compact $(BIN)/compact
	ln $(BIN)/compact $(BIN)/uncompact
	cp compact.1 $(MAN)/compact.$(MANSUF)

shar:	$(SHAR)
	shar $(SHAR) >compact.shar

tar:	$(SHAR)
	tar cf compact.tar $(SHAR)

unget:	clean
	@x=;\
	for i in $(SHAR); do [ -r $$i -a \! -w $$i ] && x="$$x $$i"; done;\
	echo rm -f $$x; rm -f $$x

clean:
	rm -f compact smtest *.o
