DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifeq ($(DEB_HOST_ARCH), arm64)
+ TENSORFLOW_BUILD := yes
+else ifeq ($(DEB_HOST_ARCH), amd64)
+ TENSORFLOW_BUILD := yes
+else
+ TENSORFLOW_BUILD := no
+endif
+
CXXFLAGS = -Wno-sign-compare -Wno-unused-but-set-variable -Wno-format-security -Wno-format -fPIC --std=c++11
CFLAGS = -Wno-sign-compare -Wno-unused-but-set-variable -Wno-format-security -Wno-format -fPIC --std=c++11
build:
dh_testdir
+ echo "[SJ_DEBUG] # 1 ***************************************************************"
+ifeq ($(TENSORFLOW_BUILD), yes)
+ echo "[SJ_DEBUG] # 2 ***************************************************************"
patch -p0 < ${packagingdir}/${SOURCE5001}
cp ${packagingdir}/${SOURCE4001} ${topdir}/tensorflow/contrib/cmake/
mkdir -p ${topdir}/build
cd ${topdir}/build/CMakeFiles/pywrap_tensorflow_internal.dir && ${topdir}/temp.sh
cd ${topdir}/build && make
+endif
ifeq ($(DEB_HOST_ARCH), arm64)
make -f tensorflow/contrib/lite/Makefile TARGET=TIZEN OS=LINUX TIZEN_CXXFLAGS="${CXXFLAGS} -D__ARM_NEON" TIZEN_CFLAGS="${CFLAGS} -D__ARM_NEON"
install -m 0644 tensorflow/contrib/lite/downloads/flatbuffers/include/flatbuffers/*.h ${buildroot}${_includedir}/flatbuffers
install -m 0644 tensorflow/contrib/lite/tensorflow-lite.pc.in ${buildroot}${_libdir}/pkgconfig/tensorflow-lite.pc
+ifeq ($(TENSORFLOW_BUILD), yes)
# Make pkgconfig file
sed -i -e "s:@libdir@:${_libdir}:g" -e "s:@includedir@:${_includedir}:g" ${buildroot}${_libdir}/pkgconfig/tensorflow-lite.pc
cd ${topdir}/build && cp -p nsync/install/include/*.h ${buildroot}${_includedir}/${name}/
cd ${topdir}/build && cp -p tensorflow.pc ${buildroot}${_libdir}/pkgconfig/
+endif
binary-indep: build install
# nothing to do by default
make -f tensorflow/contrib/lite/Makefile TARGET=TIZEN OS=LINUX clean
echo "[SJ_DEBUG] CXXFLAGS: " ${CXXFLAGS}
echo "[SJ_DEBUG] CFLAGS: " ${CFLAGS}
+ echo "[SJ_DEBUG] TENSORFLOW_BUILD: " $(TENSORFLOW_BUILD)
dh_clean