CC = gcc
CFLAGS = -O0 -I. -I../include

LIBOBJS = hibutil.o
TARGET = libhib.a hibtest lsgrape

all:	$(TARGET)

libhib.a:	$(LIBOBJS)
	ar rvu $@ $?
	ranlib $@

hibtest:	hibtest.c hibutil.c $(LIBOBJS)
	$(CC) $(CFLAGS) -o $@ hibtest.c hibutil.c -lm

lsgrape:	lsgrape.c hibutil.c $(LIBOBJS)
	$(CC) $(CFLAGS) -o $@ lsgrape.c hibutil.c -lm

clean:
	rm -f *.o core *~ $(TARGET)

bak:
	-tar cvf hib.tar ./*.[hc] ./*.pl ./*.csh ./*.awk
	-gzip hib.tar
