Skip to content

Commit

Permalink
Fix autotools build
Browse files Browse the repository at this point in the history
  • Loading branch information
amitdo committed Oct 28, 2019
1 parent e1bae15 commit 2f8884a
Show file tree
Hide file tree
Showing 18 changed files with 82 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif

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
SUBDIRS += src/ccmain src/api . tessdata doc unittest include/tesseract

EXTRA_DIST = README.md LICENSE
EXTRA_DIST += aclocal.m4 config configure.ac autogen.sh
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,10 @@ fi
# ----------------------------------------
# Output files
AC_CONFIG_FILES([include/tesseract/Makefile])
AC_CONFIG_FILES([include/tesseract/tess_version.h])
AC_CONFIG_FILES([Makefile tesseract.pc])
AC_CONFIG_FILES([src/api/Makefile])
AC_CONFIG_FILES([src/api/tess_version.h])
AC_CONFIG_FILES([src/arch/Makefile])
AC_CONFIG_FILES([src/ccmain/Makefile])
AC_CONFIG_FILES([src/opencl/Makefile])
Expand Down
54 changes: 54 additions & 0 deletions include/tesseract/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
AM_CPPFLAGS += \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/api \
-I$(top_srcdir)/src/arch \
-I$(top_srcdir)/src/classify \
-I$(top_srcdir)/src/ccmain \
-I$(top_srcdir)/src/ccstruct \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/cutil \
-I$(top_srcdir)/src/dict \
-I$(top_srcdir)/src/lstm \
-I$(top_srcdir)/src/opencl \
-I$(top_srcdir)/src/textord \
-I$(top_srcdir)/src/viewer \
-I$(top_srcdir)/src/wordrec

if !NO_TESSDATA_PREFIX
AM_CPPFLAGS += -DTESSDATA_PREFIX=@datadir@
endif

if DISABLED_LEGACY_ENGINE
AM_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif

if VISIBILITY
AM_CPPFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
endif


pkginclude_HEADERS = \
apitypes.h \
baseapi.h \
capi.h renderer.h \
tess_version.h

pkginclude_HEADERS += \
thresholder.h \
osdetect.h \
ltrresultiterator.h \
pageiterator.h \
resultiterator.h

pkginclude_HEADERS += publictypes.h

pkginclude_HEADERS += \
genericvector.h \
helpers.h \
ocrclass.h \
platform.h \
serialis.h \
strngs.h \
unichar.h

6 changes: 3 additions & 3 deletions src/api/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\" \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/arch \
-I$(top_srcdir)/src/lstm \
-I$(top_srcdir)/src/ccutil \
Expand All @@ -10,8 +12,7 @@ AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\" \
-I$(top_srcdir)/src/ccmain \
-I$(top_srcdir)/src/wordrec \
-I$(top_srcdir)/src/cutil \
-I$(top_srcdir)/src/opencl \
-I$(top_builddir)/api
-I$(top_srcdir)/src/opencl

AM_CPPFLAGS += $(OPENCL_CPPFLAGS)

Expand All @@ -23,7 +24,6 @@ if VISIBILITY
AM_CPPFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
endif

pkginclude_HEADERS = apitypes.h baseapi.h capi.h renderer.h tess_version.h
lib_LTLIBRARIES =

noinst_LTLIBRARIES = libtesseract_api.la
Expand Down
6 changes: 5 additions & 1 deletion src/arch/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
AM_CPPFLAGS += -I$(top_srcdir)/src/ccstruct -I$(top_srcdir)/src/ccutil -I$(top_srcdir)/src/viewer
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccstruct \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/viewer

AM_CXXFLAGS =

Expand Down
8 changes: 1 addition & 7 deletions src/ccmain/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/ccstruct \
-I$(top_srcdir)/src/arch \
Expand All @@ -23,13 +24,6 @@ AM_CPPFLAGS += -DTESS_EXPORTS \
-fvisibility=hidden -fvisibility-inlines-hidden
endif

pkginclude_HEADERS = \
thresholder.h \
osdetect.h \
ltrresultiterator.h \
pageiterator.h \
resultiterator.h

noinst_HEADERS = \
control.h \
equationdetect.h \
Expand Down
2 changes: 1 addition & 1 deletion src/ccstruct/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/cutil \
-I$(top_srcdir)/src/dict \
Expand All @@ -16,7 +17,6 @@ AM_CPPFLAGS += -DTESS_EXPORTS \
-fvisibility=hidden -fvisibility-inlines-hidden
endif

pkginclude_HEADERS = publictypes.h
noinst_HEADERS = \
blamer.h blobbox.h blobs.h blread.h boxread.h boxword.h \
ccstruct.h coutln.h crakedge.h \
Expand Down
7 changes: 1 addition & 6 deletions src/ccutil/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AM_CXXFLAGS =
AM_CPPFLAGS =
AM_CPPFLAGS += -I$(top_srcdir)/include

if !NO_TESSDATA_PREFIX
AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@
Expand All @@ -14,11 +14,6 @@ if DISABLED_LEGACY_ENGINE
AM_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif

pkginclude_HEADERS = \
genericvector.h helpers.h \
ocrclass.h platform.h serialis.h strngs.h \
unichar.h

noinst_HEADERS = \
bits16.h ccutil.h clst.h doubleptr.h elst2.h \
elst.h errcode.h fileerr.h \
Expand Down
1 change: 1 addition & 0 deletions src/classify/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/cutil \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/ccstruct \
Expand Down
1 change: 1 addition & 0 deletions src/cutil/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/viewer

Expand Down
1 change: 1 addition & 0 deletions src/dict/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/cutil \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/ccstruct \
Expand Down
1 change: 1 addition & 0 deletions src/lstm/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/cutil \
-I$(top_srcdir)/src/ccstruct \
Expand Down
1 change: 1 addition & 0 deletions src/opencl/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += $(OPENCL_CFLAGS) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/ccstruct \
-I$(top_srcdir)/src/ccmain
Expand Down
1 change: 1 addition & 0 deletions src/textord/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccstruct \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/viewer \
Expand Down
3 changes: 2 additions & 1 deletion src/training/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AM_CPPFLAGS += \
-DPANGO_ENABLE_ENGINE \
-I$(top_builddir)/src/api \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/api \
-I$(top_srcdir)/src/ccmain \
-I$(top_srcdir)/src/ccutil \
Expand Down
4 changes: 3 additions & 1 deletion src/viewer/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
AM_CPPFLAGS += -I$(top_srcdir)/src/ccutil
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccutil

if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \
Expand Down
1 change: 1 addition & 0 deletions src/wordrec/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/ccstruct \
-I$(top_srcdir)/src/ccutil \
-I$(top_srcdir)/src/cutil \
Expand Down
3 changes: 2 additions & 1 deletion unittest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ AM_CPPFLAGS += -DPANGO_ENABLE_ENGINE
if DISABLED_LEGACY_ENGINE
AM_CPPFLAGS += -DDISABLED_LEGACY_ENGINE
endif # DISABLED_LEGACY_ENGINE
AM_CPPFLAGS += -I$(top_builddir)/src/api
AM_CPPFLAGS += -I$(top_builddir)/include
AM_CPPFLAGS += -I$(top_srcdir)/include
AM_CPPFLAGS += -I$(top_srcdir)/src/api
AM_CPPFLAGS += -I$(top_srcdir)/src/arch
AM_CPPFLAGS += -I$(top_srcdir)/src/ccmain
Expand Down

0 comments on commit 2f8884a

Please sign in to comment.