#
# Makefile automatically generated by MKMK V6.55
# Tue Feb 04 07:42:30 1997
#

OBJS= bzip.o
TMPS = (rbz|lha|lzx|tst)

.ref.lha:
	lha -2 a $@ $?

.ref.lzx:
	lzx -3 a $@ $?

#all: cleanup
all: bzip test cleanup

cleanup:
	execute <<
failat 30
delete \#?.$(TMPS) \#?.(lnk|o|bak)
<

test: lha lzx
	cat words0
	cat words1

    echo "** Test Compression **"
	bzip -Q -1 -f < sample1.ref > sample1.rbz
	list sample1.$(TMPS)
	bzip -Q -2 -f < sample2.ref > sample2.rbz
	list sample1.$(TMPS)

    echo "** Test Decompression **"
	bzip -d -Q < sample1.bz > sample1.tst
	bzip -d -Q < sample2.bz > sample2.tst
	cat words2
	cmp sample1.bz sample1.rbz 
	cmp sample2.bz sample2.rbz
	cmp sample1.tst sample1.ref
	cmp sample2.tst sample2.ref
	cat words3

bzip: $(OBJS)
   sc link to bzip with <<
$(OBJS)
<

bzip.o: bzip.c

lha: sample1.lha sample2.lha
sample1.lha: sample1.ref
sample2.lha: sample2.ref

lzx: sample1.lzx sample2.lzx
sample1.lzx: sample1.ref
sample2.lzx: sample2.ref
