Skip to content
Snippets Groups Projects
Commit 53f7b675 authored by Toby Murray's avatar Toby Murray
Browse files

restructure to more closely fit assignment 1 for tourney

parent 39076c36
Branches
No related tags found
No related merge requests found
......@@ -2,19 +2,21 @@ BINARY=passbook
SRC=src
BIN=bin
INCLUDE=$(SRC)/include
VULNS=vuln-1 vuln-2 vuln-3 vuln-4 vuln-5
VERSIONS=original vuln-1 vuln-2 vuln-3 vuln-4 vuln-5
VBINARIES=$(BINARY) $(VULNS:%=${BINARY}-%)
VBINARIES=$(VERSIONS:%=%/$(BINARY))
BIN_TARGETS=$(VBINARIES:%=%-san) $(VBINARIES:%=%-fuzz) $(VBINARIES:%=%-cov)
BIN_TARGETS=$(VBINARIES) $(VBINARIES:%=%-san) $(VBINARIES:%=%-fuzz) $(VBINARIES:%=%-cov)
BIN_DIRS=$(BIN) $(VERSIONS:%=$(BIN)/%)
TARGETS=$(BIN_TARGETS:%=$(BIN)/%)
HEADERS=$(wildcard $(SRC)/*.h)
HEADERS=$(wildcard $(INCLUDE)/*.h)
# allow the user to provide additional CFLAGS by doing e.g. CFLAGS=blah make
CFLAGS += -W -Wall -Wpedantic -Wno-language-extension-token -g
CFLAGS += -W -Wall -Wpedantic -Wno-language-extension-token -g -I$(INCLUDE)
# allow the user to override what clang we use by doing e.g. CLANG=blah make
CLANG ?= clang-6.0
......@@ -25,9 +27,9 @@ FUZZ_FLAGS ?= -DPASSBOOK_LIBFUZZER -fsanitize=fuzzer,address -fno-omit-frame-poi
NO_STRICT_OVERFLOW_CFLAGS ?= -fwrapv -fno-strict-overflow -Wstrict-overflow
COV_FLAGS ?= -fprofile-instr-generate -fcoverage-mapping -DPASSBOOK_FUZZ
default: $(BIN) $(TARGETS)
default: $(BIN_DIRS) $(TARGETS)
$(BIN):
$(BIN_DIRS):
mkdir -p $@
.PHONY: default
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment