OPTIM=-g
CFLAGS=$(OPTIM) $(DEFS)
CC=cc

test.o: radix.h
a.o: radix.h
compress.o: compresstab.h radix.h
compressmush.o: compresstab.h radix.h
complib.o: radix.h compresstab.h

radix.o: radix.c radix.h
	$(CC) $(CFLAGS) -c -DCOMPRESSOR radix.c -o radix.o

radix_nocompress.o: radix.c radix.h
	$(CC) $(CFLAGS) -c radix.c -o radix_nocompress.o

libcompress.a: complib.o radix.o
	ar cr libcompress.a complib.o radix.o
	ranlib libcompress.a


a: radix_nocompress.o a.o
	$(CC) $(CFLAGS) radix_nocompress.o a.o -o a

clean:
	rm -f *.o core a libcompress.a
