diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 3b89d6b159..4624801469 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -47,7 +47,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES:$(LOCAL_PATH)/%=%) $(info local src files = $(LOCAL_SRC_FILES)) LOCAL_LDLIBS := -ldl -llog -ljnigraphics -LOCAL_CFLAGS := -DNO_CUBE_BUILD -DGRAPHICS_DISABLED +LOCAL_CFLAGS := -DANDROID_BUILD -DNO_CUBE_BUILD -DGRAPHICS_DISABLED include $(BUILD_SHARED_LIBRARY) diff --git a/api/baseapi.cpp b/api/baseapi.cpp index 3c58f435e0..bdc02bfe86 100644 --- a/api/baseapi.cpp +++ b/api/baseapi.cpp @@ -792,7 +792,7 @@ int CubeAPITest(Boxa* boxa_blocks, Pixa* pixa_blocks, ASSERT_HOST(pr_word == word_count); return 0; } -#endif +#endif // NO_CUBE_BUILD /** * Runs page layout analysis in the mode set by SetPageSegMode. @@ -1029,11 +1029,11 @@ bool TessBaseAPI::ProcessPagesMultipageTiff(const l_uint8 *data, int timeout_millisec, TessResultRenderer* renderer, int tessedit_page_number) { -#ifndef NO_CUBE_BUILD +#ifndef ANDROID_BUILD Pix *pix = NULL; #ifdef USE_OPENCL OpenclDevice od; -#endif +#endif // USE_OPENCL int page = (tessedit_page_number >= 0) ? tessedit_page_number : 0; for (; ; ++page) { if (tessedit_page_number >= 0) @@ -1043,11 +1043,11 @@ bool TessBaseAPI::ProcessPagesMultipageTiff(const l_uint8 *data, // FIXME(jbreiden) Not implemented. pix = od.pixReadMemTiffCl(data, size, page); } else { -#endif +#endif // USE_OPENCL pix = pixReadMemTiff(data, size, page); #ifdef USE_OPENCL } -#endif +#endif // USE_OPENCL if (pix == NULL) break; tprintf("Page %d\n", page + 1); char page_str[kMaxIntSize]; @@ -1098,7 +1098,7 @@ bool TessBaseAPI::ProcessPagesInternal(const char* filename, const char* retry_config, int timeout_millisec, TessResultRenderer* renderer) { -#ifndef NO_CUBE_BUILD +#ifndef ANDROID_BUILD PERF_COUNT_START("ProcessPages") bool stdInput = !strcmp(filename, "stdin") || !strcmp(filename, "-"); if (stdInput) { @@ -1222,10 +1222,10 @@ bool TessBaseAPI::ProcessPage(Pix* pix, int page_index, const char* filename, failed = Recognize(NULL) < 0; } if (tesseract_->tessedit_write_images) { -#ifndef NO_CUBE_BUILD +#ifndef ANDROID_BUILD Pix* page_pix = GetThresholdedImage(); pixWrite("tessinput.tif", page_pix, IFF_TIFF_G4); -#endif +#endif // ANDROID_BUILD } if (failed && retry_config != NULL && retry_config[0] != '\0') { // Save current config variables before switching modes. @@ -2638,7 +2638,7 @@ int TessBaseAPI::NumDawgs() const { CubeRecoContext *TessBaseAPI::GetCubeRecoContext() const { return (tesseract_ == NULL) ? NULL : tesseract_->GetCubeRecoContext(); } -#endif +#endif // NO_CUBE_BUILD /** Escape a char string - remove <>&"' with HTML codes. */ STRING HOcrEscape(const char* text) {