2016-03-14 08:58:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
cd `dirname $0`
|
2017-05-10 09:34:22 +00:00
|
|
|
BLD_FLAGS="-std=gnu99 -Wno-write-strings -DGPAC_CONFIG_DARWIN -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -DENABLE_OCR"
|
|
|
|
BLD_INCLUDE="-I../src/ -I../src/lib_ccx -I../src/gpacmp4 -I../src/lib_hash -I../src/libpng -I../src/utf8proc -I../src/protobuf-c -I../src/zlib -I../src/zvbi `pkg-config --cflags --silence-errors tesseract` `pkg-config --cflags --silence-errors lept`"
|
2016-04-16 23:17:47 +00:00
|
|
|
SRC_CCX="$(find ../src/lib_ccx -name '*.c')"
|
|
|
|
SRC_GPAC="$(find ../src/gpacmp4 -name '*.c')"
|
2016-05-22 01:49:31 +00:00
|
|
|
SRC_LIB_HASH="$(find ../src/lib_hash -name '*.c')"
|
2016-10-11 18:23:31 +00:00
|
|
|
SRC_LIBPNG="$(find ../src/libpng -name '*.c')"
|
|
|
|
SRC_PROTOBUF="$(find ../src/protobuf-c -name '*.c')"
|
2017-05-10 09:34:22 +00:00
|
|
|
SRC_UTF8="../src/utf8proc/utf8proc.c"
|
2016-10-11 18:23:31 +00:00
|
|
|
SRC_ZLIB="$(find ../src/zlib -name '*.c')"
|
|
|
|
SRC_ZVBI="$(find ../src/zvbi -name '*.c')"
|
|
|
|
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_LIB_HASH $SRC_LIBPNG $SRC_PROTOBUF $SRC_UTF8 $SRC_ZLIB $SRC_ZVBI"
|
2017-05-10 09:34:22 +00:00
|
|
|
BLD_LINKER="-lm -liconv `pkg-config --libs --silence-errors tesseract` `pkg-config --libs --silence-errors lept`"
|
2015-05-04 11:39:06 +00:00
|
|
|
|
2016-05-22 07:44:55 +00:00
|
|
|
./pre-build.sh
|
2016-03-14 08:58:22 +00:00
|
|
|
gcc $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER
|