Show More
@@ -1,60 +1,60 b'' | |||
|
1 | 1 | CC = clang |
|
2 | 2 | CXX = clang++ |
|
3 | 3 | |
|
4 | 4 | all: bdiff xdiff |
|
5 | 5 | |
|
6 | 6 | fuzzutil.o: fuzzutil.cc fuzzutil.h |
|
7 | 7 | $(CXX) $(CXXFLAGS) -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
8 | 8 | -std=c++17 \ |
|
9 | 9 | -I../../mercurial -c -o fuzzutil.o fuzzutil.cc |
|
10 | 10 | |
|
11 | 11 | fuzzutil-oss-fuzz.o: fuzzutil.cc fuzzutil.h |
|
12 | 12 | $(CXX) $(CXXFLAGS) -std=c++17 \ |
|
13 | 13 | -I../../mercurial -c -o fuzzutil-oss-fuzz.o fuzzutil.cc |
|
14 | 14 | |
|
15 | 15 | bdiff.o: ../../mercurial/bdiff.c |
|
16 | 16 | $(CC) $(CFLAGS) -fsanitize=fuzzer-no-link,address -c -o bdiff.o \ |
|
17 | 17 | ../../mercurial/bdiff.c |
|
18 | 18 | |
|
19 | 19 | bdiff: bdiff.cc bdiff.o fuzzutil.o |
|
20 | 20 | $(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
21 | 21 | -std=c++17 \ |
|
22 | 22 | -I../../mercurial bdiff.cc bdiff.o fuzzutil.o -o bdiff |
|
23 | 23 | |
|
24 | 24 | bdiff-oss-fuzz.o: ../../mercurial/bdiff.c |
|
25 | 25 | $(CC) $(CFLAGS) -c -o bdiff-oss-fuzz.o ../../mercurial/bdiff.c |
|
26 | 26 | |
|
27 | 27 | bdiff_fuzzer: bdiff.cc bdiff-oss-fuzz.o fuzzutil-oss-fuzz.o |
|
28 | 28 | $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial bdiff.cc \ |
|
29 | 29 | bdiff-oss-fuzz.o fuzzutil-oss-fuzz.o -lFuzzingEngine -o \ |
|
30 | 30 | $$OUT/bdiff_fuzzer |
|
31 | 31 | |
|
32 | 32 | x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
|
33 | 33 | $(CC) -g -O1 -fsanitize=fuzzer-no-link,address -c \ |
|
34 | 34 | -o $@ \ |
|
35 | 35 | $< |
|
36 | 36 | |
|
37 | 37 | xdiff: CXXFLAGS += -std=c++17 |
|
38 | 38 | xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o fuzzutil.o |
|
39 | 39 | $(CXX) $(CXXFLAGS) -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
|
40 | 40 | -I../../mercurial xdiff.cc \ |
|
41 | 41 | xdiffi.o xprepare.o xutils.o fuzzutil.o -o xdiff |
|
42 | 42 | |
|
43 | 43 | fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
|
44 | 44 | $(CC) $(CFLAGS) -c \ |
|
45 | 45 | -o $@ \ |
|
46 | 46 | $< |
|
47 | 47 | |
|
48 | 48 | xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o fuzzutil-oss-fuzz.o |
|
49 | 49 | $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial xdiff.cc \ |
|
50 | 50 | fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o fuzzutil-oss-fuzz.o \ |
|
51 | 51 | -lFuzzingEngine -o $$OUT/xdiff_fuzzer |
|
52 | 52 | |
|
53 | 53 | clean: |
|
54 |
|
|
|
54 | $(RM) *.o *_fuzzer \ | |
|
55 | 55 | bdiff \ |
|
56 | 56 | xdiff |
|
57 | 57 | |
|
58 | 58 | oss-fuzz: bdiff_fuzzer xdiff_fuzzer |
|
59 | 59 | |
|
60 | 60 | .PHONY: all clean oss-fuzz |
General Comments 0
You need to be logged in to leave comments.
Login now