+export CFLAGS+=" -fpie -fvisibility=hidden"
+export CXXFLAGS+=" -fpie -fvisibility=hidden"
+export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
+
+%if "%{profile}" == "mobile"
+export CFLAGS="$CFLAGS -DTIZEN_MOBILE"
+%else
+%if "%{profile}" == "wearable"
+export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
+%endif
+%endif
+
+%cmake \
+%if "%{profile}" == "mobile"
+ -DTIZEN_MOBILE=YES \
+ -DTIZEN_WEARABLE=NO \
+ -DTIZEN_IVI=NO \
+%else
+%if "%{profile}" == "wearable"
+ -DTIZEN_MOBILE=NO \
+ -DTIZEN_WEARABLE=YES \
+ -DTIZEN_IVI=NO \
+%else
+%if "%{profile}" == "ivi"
+ -DTIZEN_MOBILE=NO \
+ -DTIZEN_WEARABLE=NO \
+ -DTIZEN_IVI=YES \
+%else
+ -DTIZEN_MOBILE=NO \
+ -DTIZEN_WEARABLE=NO \
+ -DTIZEN_IVI=NO \
+%endif
+%endif
+%endif
+
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%__make %{?_smp_mflags}
+#cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+#make %{?jobs:-j%jobs}