Provide a way to pass Make commands to TFLite build scripts

example)
$ tensorflow/lite/tools/make/build_lib.sh clean # To clean objects
$ tensorflow/lite/tools/make/build_lib.sh -j 32 # To override number of jobs
$ tensorflow/lite/tools/make/build_rpi_lib.sh TARGET_ARCH=armv6 # Override make variable

PiperOrigin-RevId: 298980823
Change-Id: Iad419264b1bf428452b588ed371618fe35c585f0
This commit is contained in:
Terry Heo 2020-03-04 17:26:52 -08:00 committed by TensorFlower Gardener
parent 5e75da01ee
commit 2b83647652
5 changed files with 5 additions and 9 deletions

View File

@ -55,7 +55,7 @@ This should compile a static library in:
To build ARMv6 binary for Raspberry Pi Zero:
```bash
TARGET_ARCH=armv6 ./tensorflow/lite/tools/make/build_rpi_lib.sh
./tensorflow/lite/tools/make/build_rpi_lib.sh TARGET_ARCH=armv6
```
This should compile a static library in:

View File

@ -28,5 +28,5 @@ else
NO_JOB=1
fi
make -j ${NO_JOB} TARGET=aarch64 -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile
make -j ${NO_JOB} TARGET=aarch64 -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile $@

View File

@ -19,4 +19,4 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/../../../.."
CC_PREFIX=arm-linux-gnueabihf- make -j 3 -f tensorflow/lite/tools/make/Makefile TARGET=bbb TARGET_ARCH=armv7l
CC_PREFIX=arm-linux-gnueabihf- make -j 3 -f tensorflow/lite/tools/make/Makefile TARGET=bbb TARGET_ARCH=armv7l $@

View File

@ -20,5 +20,5 @@ set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TENSORFLOW_DIR="${SCRIPT_DIR}/../../../.."
make -j 4 -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile
make -j 4 -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile $@

View File

@ -28,8 +28,4 @@ else
NO_JOB=1
fi
if [[ ! -z "${TARGET_ARCH}" ]]; then
make -j ${NO_JOB} TARGET=rpi -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile TARGET_ARCH=${TARGET_ARCH}
else
make -j ${NO_JOB} TARGET=rpi -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile
fi
make -j ${NO_JOB} TARGET=rpi -C "${TENSORFLOW_DIR}" -f tensorflow/lite/tools/make/Makefile $@