wip: bugfix
authorSangjung Woo <sangjung.woo@samsung.com>
Thu, 15 Nov 2018 04:31:19 +0000 (13:31 +0900)
committerSangjung Woo <sangjung.woo@samsung.com>
Thu, 15 Nov 2018 04:53:20 +0000 (13:53 +0900)
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
debian/control
debian/rules

index 34553a7c3ad332da2450a9ea2b61ee27ad18cea1..40fc95b081a485c69d8c669ec0409839fae39cf3 100644 (file)
@@ -7,7 +7,7 @@ Standards-Version: 1.9.0_rc2
 Homepage: https://github.sec.samsung.net/RS7-STAR/Tensorflow
 
 Package: tensorflow-dev
-Architecture: any
+Architecture: arm64 amd64
 Depends: ${shlibs:Depends}
 Description: Tensorflow development headers and object file
  This package contains the Tensorflow development header and
index d550b4c0f4c7c17bb8311858a0006d10da3c4bde..994dcf8f446c926953f688bfc1786b7a16bfa908 100755 (executable)
@@ -2,6 +2,14 @@
 
 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
 
@@ -44,6 +52,9 @@ SOURCE5001=tf_core_framework_patch.txt
 
 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
@@ -139,6 +150,7 @@ 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"
@@ -171,6 +183,7 @@ install: build
        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
 
@@ -201,6 +214,7 @@ install: build
        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
@@ -223,4 +237,5 @@ clean:
        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