aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: af05a9f365c258e4dd18486ab7142997ec0453ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
CC=gcc
CFLAGS=-Wall --std=c99 
SRC=siphash.c halfsiphash.c test.c testmain.c
BIN=test debug vectors

ifneq ($(cROUNDS),)
CFLAGS:=$(CFLAGS) -DcROUNDS=$(cROUNDS)
endif

ifneq ($(dROUNDS),)
CFLAGS:=$(CFLAGS) -DdROUNDS=$(dROUNDS)
endif

all:                    $(BIN)

test:                   $(SRC)
			$(CC) $(CFLAGS) $^ -o $@

debug:                  $(SRC) 
			$(CC) $(CFLAGS) $^ -o $@ -DDEBUG

vectors:                $(SRC) 
			$(CC) $(CFLAGS) $^ -o $@ -DGETVECTORS


clean:
			rm -f *.o $(BIN)
format:
		        clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4}" \
			-i *.c *.h