[TCT][scripts/templates][NonACR][DPTTIZEN-2148: Updated templates file and Fixed...
authorsatyajit.a <satyajit.a@samsung.com>
Tue, 5 Jul 2016 06:33:34 +0000 (15:33 +0900)
committersatyajit.a <satyajit.a@samsung.com>
Tue, 5 Jul 2016 06:33:34 +0000 (15:33 +0900)
Change-Id: I3e0e5df1d1505ade9b37baa6ad478fbc007ebca8
Signed-off-by: satyajit.a <satyajit.a@samsung.com>
scripts/tcbuild.sh
scripts/tcbuildsdk.sh
templates/src-directory/ctc/CMakeLists.txt
templates/src-directory/ctc/native-[module_name]-ctc.spec
templates/src-directory/itc/CMakeLists.txt
templates/src-directory/itc/native-[module_name]-itc.spec
templates/src-directory/utc/CMakeLists.txt
templates/src-directory/utc/core-[module_name]-tests.spec

index 82bba6a..6391501 100755 (executable)
@@ -103,36 +103,36 @@ if [ "build" == "$1" ] || [ "build_asan" == "$1" ] || [ "install" == "$1" ] || [
                echo "Add argument 'architecture (armv7l or aarch64)'"
                exit
        fi
-fi
 
-if [ $ASAN == "false" ]; then
-       if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE/local/repos/device/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE/local/repos/device/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-TV/local/repos/device/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT/local/repos/device/$ARCH/RPMS"
-       else
-               echo "Add argument 'device build type (mobile or wearable or tv or common_iot)'"
-               exit
-       fi
-else
-       if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE-ASAN/local/repos/device/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE-ASAN/local/repos/device/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-TV-ASAN/local/repos/device/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT-ASAN/local/repos/device/$ARCH/RPMS"
+       if [ $ASAN == "false" ]; then
+               if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE/local/repos/device/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE/local/repos/device/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-TV/local/repos/device/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT/local/repos/device/$ARCH/RPMS"
+               else
+                       echo "Add argument 'device build type (mobile or wearable or tv or common_iot)'"
+                       exit
+               fi
        else
-               echo "Add argument 'device build type (mobile or wearable or tv)'"
-               exit
+               if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE-ASAN/local/repos/device/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE-ASAN/local/repos/device/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-TV-ASAN/local/repos/device/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT-ASAN/local/repos/device/$ARCH/RPMS"
+               else
+                       echo "Add argument 'device build type (mobile or wearable or tv)'"
+                       exit
+               fi
+               ASAN_BUILD_PATH="$RPM_DIR/../../../../BUILD-ROOTS/scratch.$ARCH.0/home/abuild/rpmbuild/BUILD/"
+               ASAN_EXE_PATH="$RPM_DIR/$ASAN_EXE_FOLDER/"
        fi
-       ASAN_BUILD_PATH="$RPM_DIR/../../../../BUILD-ROOTS/scratch.$ARCH.0/home/abuild/rpmbuild/BUILD/"
-       ASAN_EXE_PATH="$RPM_DIR/$ASAN_EXE_FOLDER/"
 fi
 
 if [ "$1" = "install_custom"  ]; then
index bd4bb7c..54523d7 100755 (executable)
@@ -103,36 +103,36 @@ if [ "build" == "$1" ] || [ "build_asan" == "$1" ] || [ "install" == "$1" ] || [
                echo "Add argument 'architecture (i586 or x86_64)'"
                exit
        fi
-fi
 
-if [ $ASAN == "false" ]; then
-       if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE/local/repos/sdk/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE/local/repos/sdk/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-TV/local/repos/sdk/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT/local/repos/sdk/$ARCH/RPMS"
-       else
-               echo "Add argument 'sdk build type (mobile or wearable or tv or common_iot)'"
-               exit
-       fi
-else
-       if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE-ASAN/local/repos/sdk/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE-ASAN/local/repos/sdk/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-TV-ASAN/local/repos/sdk/$ARCH/RPMS"
-       elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
-               RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT-ASAN/local/repos/sdk/$ARCH/RPMS"
+       if [ $ASAN == "false" ]; then
+               if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE/local/repos/sdk/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE/local/repos/sdk/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-TV/local/repos/sdk/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT/local/repos/sdk/$ARCH/RPMS"
+               else
+                       echo "Add argument 'sdk build type (mobile or wearable or tv or common_iot)'"
+                       exit
+               fi
        else
-               echo "Add argument 'device build type (mobile or wearable or tv)'"
-               exit
+               if [ $BUILD_DEVICE_TYPE == "mobile" ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-MOBILE-ASAN/local/repos/sdk/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "wearable"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-WEARABLE-ASAN/local/repos/sdk/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "tv"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-TV-ASAN/local/repos/sdk/$ARCH/RPMS"
+               elif [ $BUILD_DEVICE_TYPE == "common_iot"  ]; then
+                       RPM_DIR="$HOME/GBS-ROOT-TCT-COMMON_IOT-ASAN/local/repos/sdk/$ARCH/RPMS"
+               else
+                       echo "Add argument 'device build type (mobile or wearable or tv)'"
+                       exit
+               fi
+               ASAN_BUILD_PATH="$RPM_DIR/../../../../BUILD-ROOTS/scratch.$ARCH.0/home/abuild/rpmbuild/BUILD/"
+               ASAN_EXE_PATH="$RPM_DIR/$ASAN_EXE_FOLDER/"
        fi
-       ASAN_BUILD_PATH="$RPM_DIR/../../../../BUILD-ROOTS/scratch.$ARCH.0/home/abuild/rpmbuild/BUILD/"
-       ASAN_EXE_PATH="$RPM_DIR/$ASAN_EXE_FOLDER/"
 fi
 
 if [ "$1" = "install_custom"  ]; then
index f5b0115..8bdf896 100755 (executable)
@@ -33,5 +33,10 @@ INSTALL(PROGRAMS ${EXEC_NAME}
     DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
 )
 
+IF( DEFINED ASAN )
+SET(CMAKE_%{LANG_COMPILER_NAME}_FLAGS "${CMAKE_%{LANG_COMPILER_NAME}_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
+ELSE()
 SET(CMAKE_%{LANG_COMPILER_NAME}_FLAGS "${CMAKE_%{LANG_COMPILER_NAME}_FLAGS} -O0 -g -fPIE -Wall")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+ENDIF()
index 85a16a5..daa87d1 100755 (executable)
@@ -28,16 +28,32 @@ Native API Compatibility Test (%{name})
 
 export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
 
-%if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="mobile" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="wearable" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_TV:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="tv" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%if %{?ASAN_BUILD:1}0
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="common_iot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%else
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="ctc" -DDEVICE_BUILD_TYPE="common_iot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
 %endif
 
 make %{?jobs:-j%jobs}
index 0b94a80..c199376 100755 (executable)
@@ -33,5 +33,10 @@ INSTALL(PROGRAMS ${EXEC_NAME}
     DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
 )
 
+IF( DEFINED ASAN )
+SET(CMAKE_%{LANG_COMPILER_NAME}_FLAGS "${CMAKE_%{LANG_COMPILER_NAME}_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
+ELSE()
 SET(CMAKE_%{LANG_COMPILER_NAME}_FLAGS "${CMAKE_%{LANG_COMPILER_NAME}_FLAGS} -O0 -g -fPIE -Wall")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+ENDIF()
index c3b2605..1550756 100755 (executable)
@@ -28,20 +28,32 @@ Native API Integration TC (%{name})
 
 export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
 
-%if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_TV:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="common_iot" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%if %{?ASAN_BUILD:1}0
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="common_iot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%else
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="common_iot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
 %endif
 
 make %{?jobs:-j%jobs}
index 78ee5de..673f385 100755 (executable)
@@ -32,5 +32,10 @@ INSTALL(PROGRAMS ${EXEC_NAME}
     DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
 )
 
+IF( DEFINED ASAN )
+SET(CMAKE_%{LANG_COMPILER_NAME}_FLAGS "${CMAKE_%{LANG_COMPILER_NAME}_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
+ELSE()
 SET(CMAKE_%{LANG_COMPILER_NAME}_FLAGS "${CMAKE_%{LANG_COMPILER_NAME}_FLAGS} -O0 -g -fPIE -Wall")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+ENDIF()
index 97bacc0..ed67ca2 100755 (executable)
@@ -26,20 +26,32 @@ Core API unit TC (%{name})
 
 export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
 
-%if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="mobile" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="wearable" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_TV:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tv" -DCMAKE_INSTALL_PREFIX=%{_prefix}
-%endif
-
-%if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
-cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="common_iot" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%if %{?ASAN_BUILD:1}0
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="common_iot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%else
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_COMMON_IOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="utc" -DDEVICE_BUILD_TYPE="common_iot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
 %endif
 
 make %{?jobs:-j%jobs}