Skip to content

Commit

Permalink
Add build rule for fuzzer-api
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Mar 26, 2019
1 parent 7cd012f commit 270e466
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,17 @@ doc-clean:

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = tesseract.pc

# fuzzer-api is used for fuzzing tests.
# They are run by OSS-Fuzz https://oss-fuzz.com/, but can also be run locally.
# Note: -fsanitize=fuzzer currently requires the clang++ compiler.
fuzzer-api: all
fuzzer-api: $(top_srcdir)/unittest/fuzzers/fuzzer-api.cpp
$(CXX) $(CXXFLAGS) -g -fsanitize=fuzzer \
-I $(top_srcdir)/src/api \
-I $(top_srcdir)/src/ccmain \
-I $(top_srcdir)/src/ccstruct \
-I $(top_srcdir)/src/ccutil \
-I src/api \
$< \
src/api/.libs/libtesseract.a $(LEPTONICA_LIBS) $(libarchive_LIBS) -o $@

0 comments on commit 270e466

Please sign in to comment.