CC	=	gcc
DEST	=	..
LIBDIR	=	$(DEST)/lib/$(ARCH)
INCDIR	=	$(DEST)/include
OBJS	=	hash.o
CFLAGS	=	-I. -I$(INCDIR) -Wall -g
LDLIBS	=	-L$(LIBDIR) -lmem

all:	testhash iterate libhash.a

clean:
	rm -f lib* *.o testhash iterate

install:	libhash.a
	install -m0644 libhash.a $(LIBDIR)
	install -m0644 hash.h $(INCDIR)

libhash.a:	$(OBJS)
	rm -f libhash.a
	ar rc libhash.a $(OBJS)
	ranlib libhash.a

testhash:	testhash.o hash.o
iterate:	iterate.o hash.o
testhash.o:	hash.h
hash.o:		hash.h
iterate.o:	hash.h
