2016-01-20 14:00:45 +00:00
|
|
|
CC=gcc
|
2016-12-17 13:14:22 +00:00
|
|
|
CFLAGS=-Wall --std=c99
|
2019-09-21 20:12:31 +00:00
|
|
|
SRC=siphash.c halfsiphash.c test.c testmain.c
|
2016-12-17 13:14:22 +00:00
|
|
|
BIN=test debug vectors
|
2016-01-20 14:00:45 +00:00
|
|
|
|
2019-09-10 12:43:15 +00:00
|
|
|
ifneq ($(cROUNDS),)
|
|
|
|
CFLAGS:=$(CFLAGS) -DcROUNDS=$(cROUNDS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(dROUNDS),)
|
|
|
|
CFLAGS:=$(CFLAGS) -DdROUNDS=$(dROUNDS)
|
|
|
|
endif
|
|
|
|
|
2016-01-20 14:00:45 +00:00
|
|
|
all: $(BIN)
|
|
|
|
|
2016-12-16 08:04:05 +00:00
|
|
|
test: $(SRC)
|
2016-01-20 14:00:45 +00:00
|
|
|
$(CC) $(CFLAGS) $^ -o $@
|
|
|
|
|
2016-12-16 08:04:05 +00:00
|
|
|
debug: $(SRC)
|
2016-01-20 14:00:45 +00:00
|
|
|
$(CC) $(CFLAGS) $^ -o $@ -DDEBUG
|
|
|
|
|
2016-12-17 13:14:22 +00:00
|
|
|
vectors: $(SRC)
|
|
|
|
$(CC) $(CFLAGS) $^ -o $@ -DGETVECTORS
|
|
|
|
|
|
|
|
|
2016-01-20 14:00:45 +00:00
|
|
|
clean:
|
2016-12-16 08:04:05 +00:00
|
|
|
rm -f *.o $(BIN)
|
2016-12-17 13:14:22 +00:00
|
|
|
format:
|
|
|
|
clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4}" \
|
|
|
|
-i *.c *.h
|
2016-01-20 14:00:45 +00:00
|
|
|
|
|
|
|
dist: clean
|
|
|
|
cd ..; \
|
|
|
|
tar zcf SipHash-`date +%Y%m%d%H%M`.tgz SipHash/*
|