summaryrefslogtreecommitdiff
path: root/contributed/makefile
blob: c50ab361a3bfc49c5d2911d94cfd95844d7a1de9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

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)