summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2013-09-25 07:36:33 (GMT)
committerHwanKyu Jhun <h.jhun@samsung.com>2019-07-15 23:57:07 (GMT)
commit6444bbde0ac4e34accab7fb6f93c3d589a183193 (patch)
tree625433340a2758245c329544956b70b2bf1126b2
parent4599fec6707f0a7b4d6327617210eefe576a8ed7 (diff)
downloadminicontrol-6444bbde0ac4e34accab7fb6f93c3d589a183193.zip
minicontrol-6444bbde0ac4e34accab7fb6f93c3d589a183193.tar.gz
minicontrol-6444bbde0ac4e34accab7fb6f93c3d589a183193.tar.bz2
Don't build the libminicontrol-inter.a libraryrefs/changes/31/10231/4
Instead of building libminicontrol-inter.a library mark its sources as sources for lib-minicontrol-*.so libraries. Static libraries like the internal libminicontrol-inter.a should not be used to build shared libraries like libminicontrol-monitor.so.0.0.1. To build static libraries sources are compiled without -fPIC while for shared libraries it is required to build with the -fPIC option. Change-Id: I593152d3d0ad2cadc0d4279ffc8f8671783e74d9 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
-rwxr-xr-xCMakeLists.txt9
-rw-r--r--packaging/minicontrol.spec1
2 files changed, 2 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54279a9..5c8afbd 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,14 +52,9 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DMINICTRL_USE_DLOG")
-ADD_LIBRARY(${PROJECT_NAME}-inter STATIC
- src/minicontrol-internal.c
-)
-TARGET_LINK_LIBRARIES(${PROJECT_NAME}-inter ${pkgs_LDFLAGS})
-
FOREACH(lib_file ${SUBMODULES})
- ADD_LIBRARY(${lib_file} SHARED src/${lib_file}.c)
- TARGET_LINK_LIBRARIES(${lib_file} ${pkgs_LDFLAGS} ${PROJECT_NAME}-inter)
+ ADD_LIBRARY(${lib_file} SHARED src/${lib_file}.c src/minicontrol-internal.c)
+ TARGET_LINK_LIBRARIES(${lib_file} ${pkgs_LDFLAGS})
SET_TARGET_PROPERTIES(${lib_file} PROPERTIES SOVERSION ${VERSION_MAJOR})
SET_TARGET_PROPERTIES(${lib_file} PROPERTIES VERSION ${VERSION})
INSTALL(TARGETS ${lib_file} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
diff --git a/packaging/minicontrol.spec b/packaging/minicontrol.spec
index e1122d0..644fb85 100644
--- a/packaging/minicontrol.spec
+++ b/packaging/minicontrol.spec
@@ -47,7 +47,6 @@ export FFLAGS+=" -fprofile-arcs -ftest-coverage"
export LDFLAGS+=" -lgcov"
%endif
-export CFLAGS+=" -fPIC "
export LDFLAGS+=" -Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
LDFLAGS="$LDFLAGS"