2012-03-16 05:05:12 +08:00
|
|
|
## run autogen.sh to create Makefile.in from this file
|
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
2013-09-27 04:23:17 +08:00
|
|
|
|
|
|
|
if ENABLE_TRAINING
|
2018-04-26 02:37:38 +08:00
|
|
|
TRAINING_SUBDIR = src/training
|
2018-03-19 05:10:41 +08:00
|
|
|
training: all
|
2018-04-26 02:37:38 +08:00
|
|
|
@$(MAKE) -C src/training
|
2018-03-19 05:10:41 +08:00
|
|
|
training-install: training
|
2018-04-26 02:37:38 +08:00
|
|
|
@$(MAKE) -C src/training install
|
2016-02-13 07:04:59 +08:00
|
|
|
training-uninstall:
|
2018-04-26 02:37:38 +08:00
|
|
|
@$(MAKE) -C src/training uninstall
|
2014-03-29 07:21:49 +08:00
|
|
|
clean-local:
|
2018-04-26 02:37:38 +08:00
|
|
|
@$(MAKE) -C src/training clean
|
2019-01-24 00:05:23 +08:00
|
|
|
# Some unit tests use code from training.
|
|
|
|
check: training
|
2013-09-27 04:23:17 +08:00
|
|
|
else
|
|
|
|
training:
|
|
|
|
@echo "Need to reconfigure project, so there are no errors"
|
|
|
|
endif
|
|
|
|
|
2018-02-18 22:25:31 +08:00
|
|
|
.PHONY: doc install-langs ScrollView.jar install-jars training
|
2013-09-27 04:23:17 +08:00
|
|
|
|
2018-04-26 02:37:38 +08:00
|
|
|
SUBDIRS = src/arch src/ccutil src/viewer src/cutil src/opencl src/ccstruct
|
|
|
|
SUBDIRS += src/dict src/classify src/wordrec src/textord src/lstm
|
2019-10-29 03:23:58 +08:00
|
|
|
SUBDIRS += src/ccmain src/api . tessdata doc unittest include/tesseract
|
2012-03-03 07:51:33 +08:00
|
|
|
|
2018-11-08 22:14:59 +08:00
|
|
|
EXTRA_DIST = README.md LICENSE
|
2018-10-12 17:20:38 +08:00
|
|
|
EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh
|
2018-11-09 05:31:32 +08:00
|
|
|
EXTRA_DIST += tesseract.pc.in $(TRAINING_SUBDIR) java doc
|
2018-10-12 23:57:27 +08:00
|
|
|
EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION src/vs2010 cppan.yml
|
2007-05-17 09:52:36 +08:00
|
|
|
|
2018-03-19 05:10:41 +08:00
|
|
|
DIST_SUBDIRS = $(SUBDIRS) $(TRAINING_SUBDIR)
|
2007-03-08 04:03:40 +08:00
|
|
|
|
2012-03-04 05:13:42 +08:00
|
|
|
uninstall-hook:
|
2018-06-18 03:58:22 +08:00
|
|
|
rm -rf $(DESTDIR)$(pkgincludedir)
|
2012-03-03 21:22:51 +08:00
|
|
|
|
2007-03-08 04:03:40 +08:00
|
|
|
dist-hook:
|
2011-08-19 05:33:28 +08:00
|
|
|
# Need to remove .svn directories from directories
|
2007-03-08 04:03:40 +08:00
|
|
|
# added using EXTRA_DIST. $(distdir)/tessdata would in
|
|
|
|
# theory suffice.
|
2018-10-13 02:10:39 +08:00
|
|
|
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
|
2013-09-27 04:23:17 +08:00
|
|
|
|
2012-03-16 05:05:12 +08:00
|
|
|
ScrollView.jar:
|
|
|
|
@cd "$(top_builddir)/java" && $(MAKE) $@
|
|
|
|
|
2013-10-04 05:26:35 +08:00
|
|
|
install-jars:
|
|
|
|
@cd "$(top_builddir)/java" && $(MAKE) $@
|
|
|
|
|
2018-02-18 22:25:31 +08:00
|
|
|
doc:
|
2013-09-27 04:23:17 +08:00
|
|
|
-srcdir="$(top_srcdir)" builddir="$(top_builddir)" \
|
|
|
|
version="@PACKAGE_VERSION@" name="@PACKAGE_NAME@" \
|
|
|
|
doxygen $(top_srcdir)/doc/Doxyfile
|
2012-03-16 05:05:12 +08:00
|
|
|
|
|
|
|
doc-pack: doc
|
2019-03-23 15:18:19 +08:00
|
|
|
-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;
|
2012-03-16 05:05:12 +08:00
|
|
|
|
|
|
|
doc-clean:
|
2019-03-23 15:18:19 +08:00
|
|
|
rm -rf $(top_builddir)/doc/html/*
|
2012-07-29 05:17:20 +08:00
|
|
|
|
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
pkgconfig_DATA = tesseract.pc
|
2019-03-25 21:41:47 +08:00
|
|
|
|
|
|
|
# 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.
|
2019-08-30 21:32:19 +08:00
|
|
|
|
|
|
|
# LIB_FUZZING_ENGINE can be overridden by the caller.
|
|
|
|
# This is used by OSS-Fuzz.
|
|
|
|
LIB_FUZZING_ENGINE ?= -fsanitize=fuzzer
|
|
|
|
|
2019-03-25 21:41:47 +08:00
|
|
|
fuzzer-api: all
|
|
|
|
fuzzer-api: $(top_srcdir)/unittest/fuzzers/fuzzer-api.cpp
|
2019-08-30 21:32:19 +08:00
|
|
|
$(CXX) $(CXXFLAGS) -g $(LIB_FUZZING_ENGINE) \
|
2019-03-25 21:41:47 +08:00
|
|
|
-I $(top_srcdir)/src/api \
|
|
|
|
-I $(top_srcdir)/src/ccmain \
|
|
|
|
-I $(top_srcdir)/src/ccstruct \
|
|
|
|
-I $(top_srcdir)/src/ccutil \
|
|
|
|
-I src/api \
|
|
|
|
$< \
|
2019-08-30 20:38:07 +08:00
|
|
|
src/api/.libs/libtesseract.a \
|
|
|
|
$(LEPTONICA_LIBS) \
|
|
|
|
$(TENSORFLOW_LIBS) \
|
|
|
|
$(libarchive_LIBS) \
|
|
|
|
-o $@
|