diff options
| author | Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com> | 2021-02-19 08:27:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-19 08:27:11 +0100 |
| commit | 750cdc00bc86b927b0f0667ff781526c3a56df09 (patch) | |
| tree | 3533de2c8c97de49b7a62eb41fe151ac17bd36f3 /makefile | |
| parent | halfsiphash header + badge (diff) | |
| parent | tests (diff) | |
| download | siphash-750cdc00bc86b927b0f0667ff781526c3a56df09.tar.gz siphash-750cdc00bc86b927b0f0667ff781526c3a56df09.tar.xz | |
Merge pull request #34 from veorq/moretest
more tests and security checks
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 25 |
1 files changed, 21 insertions, 4 deletions
@@ -1,6 +1,7 @@ CC=gcc CFLAGS=-Wall --std=c99 SRC=siphash.c halfsiphash.c test.c testmain.c +HEADERS=siphash.h halfsiphash.h BIN=test debug vectors ifneq ($(cROUNDS),) @@ -11,21 +12,37 @@ ifneq ($(dROUNDS),) CFLAGS:=$(CFLAGS) -DdROUNDS=$(dROUNDS) endif +.PHONY: analyze sanitize lint format clean + + all: $(BIN) +everything: clean format lint analyze sanitize test vectors + test: $(SRC) - $(CC) $(CFLAGS) $^ -o $@ + $(CC) $(CFLAGS) $^ -o $@ debug: $(SRC) - $(CC) $(CFLAGS) $^ -o $@ -DDEBUG + $(CC) $(CFLAGS) -g $^ -o $@ -DDEBUG vectors: $(SRC) $(CC) $(CFLAGS) $^ -o $@ -DGETVECTORS +analyze: $(SRC) + scan-build $(CC) $(CFLAGS) $^ -o $@ + rm -f $@ -clean: - rm -f *.o $(BIN) +sanitize: $(SRC) + $(CC) -fsanitize=address,undefined $(CFLAGS) $^ -o $@ + ./$@ + rm -f $@ + +lint: $(SRC) $(HEADERS) + cppcheck --std=c99 $^ format: clang-format -style="{BasedOnStyle: llvm, IndentWidth: 4}" \ -i *.c *.h +clean: + rm -f *.o $(BIN) analyze sanitize + |
