This script makes available the tensorflow c++ library.
# add this code to /tensorflow/contrib/lite/BUILD file:
cc_binary(
name = "libtensorflowLite.so",
linkopts=[
"-shared",
"-Wl,-soname=libtensorflowLite.so",
],
linkshared = 1,
copts = tflite_copts(),
deps = [
":framework",
"//tensorflow/contrib/lite/kernels:builtin_ops",
],
)
# real bazel compilation command:
bazel build -c opt //tensorflow/contrib/lite:libtensorflowLite.so \
--crosstool_top=//external:android/crosstool \
--cpu=armeabi-v7a \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
--cxxopt="-std=c++11" --verbose_failures \