summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-jae Park <nicesj.park@samsung.com>2014-01-05 18:06:12 +0900
committerSung-jae Park <nicesj.park@samsung.com>2014-01-05 18:06:12 +0900
commit426443037fa8c098a478ecbb8d4c3ed0474b38a7 (patch)
tree909a032bb2d7636a71bd28e1903303c8bb1258a6
parentd41e35de4036c319289f2dc34262ab7f37ccfbfd (diff)
downloadheap-monitor-tizen.tar.gz
heap-monitor-tizen.tar.bz2
heap-monitor-tizen.zip
Change-Id: I61701beff9daa99e816c23852e50c0c552ab98ee
-rw-r--r--CMakeLists.txt12
-rw-r--r--packaging/libheap-monitor.manifest6
-rw-r--r--packaging/libheap-monitor.spec19
3 files changed, 29 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c0600e..7150830 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,17 @@ set(CMAKE_SKIP_BUILD_RPATH true)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
-SET(EXTRA_CFLAGS "-fvisibility=hidden -Wall -fno-builtin-malloc -O3 -g")
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ dlog
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(?EXTRA_CFLAGS "${?EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline -fno-builtin-malloc -O3 -g -Wno-error=deprecated-declarations")
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wno-error=deprecated-declarations")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
diff --git a/packaging/libheap-monitor.manifest b/packaging/libheap-monitor.manifest
index 017d22d..a76fdba 100644
--- a/packaging/libheap-monitor.manifest
+++ b/packaging/libheap-monitor.manifest
@@ -1,5 +1,5 @@
<manifest>
- <request>
- <domain name="_"/>
- </request>
+ <request>
+ <domain name="_" />
+ </request>
</manifest>
diff --git a/packaging/libheap-monitor.spec b/packaging/libheap-monitor.spec
index 3eaeeb1..5fb43f4 100644
--- a/packaging/libheap-monitor.spec
+++ b/packaging/libheap-monitor.spec
@@ -3,16 +3,17 @@ Summary: Library for monitoring the heap usage
Version: 0.0.17
Release: 1
Group: HomeTF/Livebox
-License: Flora License
+License: Flora
Source0: %{name}-%{version}.tar.gz
-Source1001: libheap-monitor.manifest
+Source1001: %{name}.manifest
BuildRequires: cmake, gettext-tools, coreutils
+BuildRequires: pkgconfig(dlog)
%description
Monitoring the heap usage to manage them safely.
%package devel
-Summary: Files for implementaion of the heap monitor.
+Summary: Files for implementaion of the heap monitor
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
@@ -24,15 +25,23 @@ Monitoring the heap usage to manage them safely.(dev)
cp %{SOURCE1001} .
%build
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
+
%if 0%{?tizen_build_binary_release_type_eng}
export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
%endif
-%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+%cmake .
CFLAGS+="${CFLAGS} -fvisibility=hidden -Wall -Werror -Winline -fno-builtin-malloc" make %{?jobs:-j%jobs}
%install
+rm -rf %{buildroot}
%make_install
mkdir -p %{buildroot}/%{_datarootdir}/license
@@ -49,3 +58,5 @@ mkdir -p %{buildroot}/%{_datarootdir}/license
%defattr(-,root,root,-)
%{_includedir}/heap-monitor/heap-monitor.h
%{_libdir}/pkgconfig/*.pc
+
+# End of a file