summaryrefslogtreecommitdiff
path: root/contributed/makefile
blob: f44a3c065d58f18fb5d7510319f66109a012ece7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ONIG_LIB=../src/.libs/libonig.a
LIBS=$(ONIG_LIB) /usr/local/lib/libLLVMFuzzerMain.a

TARGETS=libfuzzer-onig libfuzzer-onig-full

default: $(TARGETS)

libfuzzer-onig: libfuzzer-onig.cpp $(ONIG_LIB)
	clang++ $< $(LIBS) -o $@ -fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address

libfuzzer-onig-full: libfuzzer-onig.cpp $(ONIG_LIB)
	clang++ -DFULL_TEST $< $(LIBS) -o $@ -fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address


$(ONIG_LIB):
	cd ..; ./configure CC=clang LD=clang CFLAGS="-g -fsanitize=fuzzer,address" LDFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address"; make



clean:
	rm -f $(TARGETS)