siphash/makefile

27 lines
556 B
Makefile
Raw Normal View History

2016-01-20 14:00:45 +00:00
CC=gcc
2016-12-17 13:14:22 +00:00
CFLAGS=-Wall --std=c99
2016-12-16 08:04:05 +00:00
SRC=siphash.c halfsiphash.c test.c
2016-12-17 13:14:22 +00:00
BIN=test debug vectors
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/*