%description
Watch application
+%if 0%{?gcov:1}
+%package gcov
+Summary: Watch application API(gcov)
+Group: Application Framework/Libraries
+
+%description gcov
+gcov objects of a watch application library
+%endif
%package devel
Summary: appcore watch
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
%if 0%{?sec_build_binary_debug_enable}
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
make %{?jobs:-j%jobs}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
%install
rm -rf %{buildroot}
%make_install
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
+
mkdir -p %{buildroot}%{_libdir}/pkgconfig
cp capi-appfw-watch-application.pc %{buildroot}%{_libdir}/pkgconfig
%{_includedir}/appcore-watch/watch_base.h
%{_libdir}/pkgconfig/appcore-watch-base.pc
%{_libdir}/libappcore-watch-base.so
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif