File: Makefile

package info (click to toggle)
zsv 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 49,160 kB
  • sloc: ansic: 175,811; cpp: 56,301; sh: 3,623; makefile: 3,048; javascript: 577; cs: 90; awk: 70; python: 41; sql: 15
file content (27 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
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
.PHONY: build run clean help

INCLUDE_DIR=/usr/local/include
FUZZOUT=/tmp/zsvfuzzout
FUZZBIN=/tmp/zsvfuzz

help:
	@echo "To run fuzzer:"
	@echo "  make run [INCLUDE_DIR=/usr/local/include]"
	@echo ""
	@echo "Requirements:"
	@echo "  afl-clang-fast and afl-fuzz must be installed"
	@echo "  zsv.h must be present in INCLUDE_DIR"
	@echo ""

clean:
	rm -f $(FUZZBIN) $(FUZZOUT) $(FUZZBIN).dSYM

build: $(FUZZBIN)

$(FUZZBIN): fuzz.c
	afl-clang-fast -o $(FUZZBIN) -g3 -fsanitize=address,undefined fuzz.c -I/usr/local/include

run: $(FUZZBIN)
	@echo "Output will be written to $(FUZZOUT)"
	afl-fuzz -i ../data/test -o $(FUZZOUT) $(FUZZBIN)