tesseract/Makefile.am
Stefan Weil 7ef20bb0e6 Use flat make for include/tesseract
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-10-29 12:01:51 +01:00

109 lines
3.7 KiB
Makefile

## run autogen.sh to create Makefile.in from this file
ACLOCAL_AMFLAGS = -I m4
if ENABLE_TRAINING
TRAINING_SUBDIR = src/training
training: all
@$(MAKE) -C src/training
training-install: training
@$(MAKE) -C src/training install
training-uninstall:
@$(MAKE) -C src/training uninstall
clean-local:
@$(MAKE) -C src/training clean
# Some unit tests use code from training.
check: training
else
training:
@echo "Need to reconfigure project, so there are no errors"
endif
.PHONY: doc install-langs ScrollView.jar install-jars training
SUBDIRS = src/arch src/ccutil src/viewer src/cutil src/opencl src/ccstruct
SUBDIRS += src/dict src/classify src/wordrec src/textord src/lstm
SUBDIRS += src/ccmain src/api . tessdata doc unittest
EXTRA_DIST = README.md LICENSE
EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh
EXTRA_DIST += tesseract.pc.in $(TRAINING_SUBDIR) java doc
EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION src/vs2010 cppan.yml
DIST_SUBDIRS = $(SUBDIRS) $(TRAINING_SUBDIR)
uninstall-hook:
rm -rf $(DESTDIR)$(pkgincludedir)
dist-hook:
# Need to remove .svn directories from directories
# added using EXTRA_DIST. $(distdir)/tessdata would in
# theory suffice.
rm -rf `find $(distdir) -name .deps -type d`
-rm -f $(distdir)/*/Makefile $(distdir)/*/*/Makefile
rm -f `find $(distdir) -name '*~'`
rm -rf $(find $(distdir)/src/training -executable -type f)
rm -rf $(distdir)/doc/html/* $(distdir)/doc/*.log
ScrollView.jar:
@cd "$(top_builddir)/java" && $(MAKE) $@
install-jars:
@cd "$(top_builddir)/java" && $(MAKE) $@
doc:
-srcdir="$(top_srcdir)" builddir="$(top_builddir)" \
version="@PACKAGE_VERSION@" name="@PACKAGE_NAME@" \
doxygen $(top_srcdir)/doc/Doxyfile
doc-pack: doc
-chmod a+r $(top_builddir)/doc/html/*
@tar --create --directory=$(top_builddir)/doc/html --verbose --file=- . | gzip -c -9 > $(top_builddir)/@PACKAGE_NAME@-@PACKAGE_VERSION@-doc-html.tar.gz;
doc-clean:
rm -rf $(top_builddir)/doc/html/*
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = tesseract.pc
pkginclude_HEADERS = $(top_builddir)/include/tesseract/version.h
pkginclude_HEADERS += include/tesseract/apitypes.h
pkginclude_HEADERS += include/tesseract/baseapi.h
pkginclude_HEADERS += include/tesseract/capi.h
pkginclude_HEADERS += include/tesseract/genericvector.h
pkginclude_HEADERS += include/tesseract/helpers.h
pkginclude_HEADERS += include/tesseract/ltrresultiterator.h
pkginclude_HEADERS += include/tesseract/ocrclass.h
pkginclude_HEADERS += include/tesseract/osdetect.h
pkginclude_HEADERS += include/tesseract/pageiterator.h
pkginclude_HEADERS += include/tesseract/platform.h
pkginclude_HEADERS += include/tesseract/publictypes.h
pkginclude_HEADERS += include/tesseract/renderer.h
pkginclude_HEADERS += include/tesseract/resultiterator.h
pkginclude_HEADERS += include/tesseract/serialis.h
pkginclude_HEADERS += include/tesseract/strngs.h
pkginclude_HEADERS += include/tesseract/thresholder.h
pkginclude_HEADERS += include/tesseract/unichar.h
# 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.
# LIB_FUZZING_ENGINE can be overridden by the caller.
# This is used by OSS-Fuzz.
LIB_FUZZING_ENGINE ?= -fsanitize=fuzzer
fuzzer-api: all
fuzzer-api: $(top_srcdir)/unittest/fuzzers/fuzzer-api.cpp
$(CXX) $(CXXFLAGS) -g $(LIB_FUZZING_ENGINE) \
-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) \
$(TENSORFLOW_LIBS) \
$(libarchive_LIBS) \
-o $@