# TFLITE for linux
source: https://stackoverflow.com/questions/55125977/how-to-build-tensorflow-lite-as-a-static-library-and-link-to-it-from-a-separate
First compile the static library:
```
$ ./tensorflow/lite/tools/make/download_dependencies.sh
$ make -f tensorflow/lite/tools/make/Makefile
```
**If the 'download_dependencies.sh' script fails in the tensorflow version you are using, try to download the last version of this file from the [tensorflow repository](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/tools/make).
By default make would just do native build.
The output library will be stored as
```
<tensorflow-root>/tensorflow/lite/tools/make/gen/<platform>/lib/libtensorflow-lite.a
```
And the external dependencies with their headers would go into
```
<tensorflow-root>/tensorflow/tensorflow/lite/tools/make/downloads
```
(for example flatbuffers headers are in <tensorflow-root>/tensorflow/tensorflow/lite/tools/make/downloads/flatbuffers/include).