If the `_prelink_enable` is defined, the app_launcher tool will be
compiled without -pie option.
Change-Id: I0ece66dd0dbd040c8493d39376ba09b6045a55e2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
%description test
Application utility library (test tools)
+%if "%{?_prelink_enable}" == "y"
+%define tizen_feature_prelink 1
+%else
+%define tizen_feature_prelink 0
+%endif
+
%prep
%setup -q
sed -i 's|TZ_SYS_DB|%{TZ_SYS_DB}|g' %{SOURCE1001}
CFLAGS="%{optflags} -D__emul__"; export CFLAGS
%endif
+%if 0%{?tizen_feature_prelink}
+_TIZEN_FEATURE_PRELINK=ON
+%endif
+
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake -DFULLVER=%{version} \
-DMAJORVER=${MAJORVER} \
+ -D_TIZEN_FEATURE_PRELINK:BOOL=${_TIZEN_FEATURE_PRELINK} \
.
%__make %{?_smp_mflags}
add_executable(app_launcher
app_launcher.c)
+
+IF(_TIZEN_FEATURE_PRELINK)
+message(STATUS "[__PRELINK__] Enable")
+target_link_libraries(app_launcher aul ${pkgs_LDFLAGS})
+ELSE(_TIZEN_FEATURE_PRELINK)
+message(STATUS "[__PRELINK__] Disable")
target_link_libraries(app_launcher aul ${pkgs_LDFLAGS} "-pie")
+ENDIF(_TIZEN_FEATURE_PRELINK)
+
INSTALL(TARGETS app_launcher DESTINATION bin)
add_executable(appgroup_info