Skip to content

Commit 270e466

Browse files
committed
Add build rule for fuzzer-api
Signed-off-by: Stefan Weil <[email protected]>
1 parent 7cd012f commit 270e466

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Makefile.am

+14
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,17 @@ doc-clean:
6464

6565
pkgconfigdir = $(libdir)/pkgconfig
6666
pkgconfig_DATA = tesseract.pc
67+
68+
# fuzzer-api is used for fuzzing tests.
69+
# They are run by OSS-Fuzz https://oss-fuzz.com/, but can also be run locally.
70+
# Note: -fsanitize=fuzzer currently requires the clang++ compiler.
71+
fuzzer-api: all
72+
fuzzer-api: $(top_srcdir)/unittest/fuzzers/fuzzer-api.cpp
73+
$(CXX) $(CXXFLAGS) -g -fsanitize=fuzzer \
74+
-I $(top_srcdir)/src/api \
75+
-I $(top_srcdir)/src/ccmain \
76+
-I $(top_srcdir)/src/ccstruct \
77+
-I $(top_srcdir)/src/ccutil \
78+
-I src/api \
79+
$< \
80+
src/api/.libs/libtesseract.a $(LEPTONICA_LIBS) $(libarchive_LIBS) -o $@

0 commit comments

Comments
 (0)