# Makefile for fnv
# If you extract this file from RFC NNNN, the five character sequence
# 	 below must be replace with a tab (0x09) character.

explanation:
	@echo Choose one of the following make targets:
	@echo make FNVhash -- test program
	@echo make libfnv.a -- library you can use
	@echo make clean -- removes all of the built targets

SRC=FNV1024.c FNV128.c FNV256.c FNV32.c FNV512.c FNV64.c
HDR=FNV32.h FNV64.h FNV128.h FNV256.h FNV512.h FNV1024.h \
	FNVErrorCodes.h FNVconfig.h fnv-private.h
OBJ=$(SRC:.c=.o)
CFLAGS=-Wall
AR=ar
ARFLAGS= rcs

FNVhash: libfnv.a main.c
	$(CC) $(CFLAGS) -o FNVhash main.c libfnv.a

libfnv.a: $(SRC) $(HDR)
	rm -f libfnv.a *.o
	$(CC) $(CFLAGS) -c $(SRC)
	$(AR) $(ARFLAGS) libfnv.a $(OBJ)

clean:
	rm -rf libfnv.a FNVhash *.o

