bridging: Add explicit dependency to libmpm 11/23411/10
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 22 Nov 2017 17:16:45 +0000 (18:16 +0100)
committerTodd Malsbary <todd.malsbary@intel.com>
Wed, 17 Jan 2018 20:24:53 +0000 (20:24 +0000)
While working on "scons install", static lib were not resolved.
So I found this could be changed separately

Observed issue was:

 Linking shared .../libhueplugin.so
 g++: error: .../out/.../libmpmcommon.a: No such file or directory
 scons: *** [out/.../libhueplugin.so] Error 1

This was needed for ARTIK7 on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ibadd174bd84bcaf48d972fdb3071ba3b03ff1373
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23409
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
bridging/plugins/hue_plugin/SConscript
bridging/plugins/lifx_plugin/SConscript
bridging/plugins/lyric_plugin/SConscript
bridging/plugins/nest_plugin/SConscript

index 1f051b6..9804a7a 100644 (file)
@@ -73,11 +73,13 @@ hue_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
 if hue_env.get('LOGGING'):
     hue_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
+libmpm = hue_env.get('BUILD_DIR') + 'libmpmcommon.a'
 hue_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
 hue_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 hue_env.AppendUnique(LINKFLAGS=[
-    '-Wl,--whole-archive',
-    hue_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    '-Wl,--allow-shlib-undefined',
+    '-Wl,--whole-archive', libmpm,
+    '-Wl,-no-whole-archive',
 ])
 
 hue_env.AppendUnique(LIBS=[
@@ -101,5 +103,6 @@ hue_src = [
 
 hue_env.AppendUnique(HUE_SRC=hue_src)
 huelib = hue_env.SharedLibrary('hueplugin', hue_env.get('HUE_SRC'))
+hue_env.Depends(huelib, libmpm)
 hue_env.InstallTarget(huelib, 'hueplugin')
 hue_env.UserInstallTargetLib(huelib, 'hueplugin')
index 96bb3f2..37bf3f5 100644 (file)
@@ -65,11 +65,13 @@ if 'g++' in lifx_env.get('CXX'):
     lifx_env.AppendUnique(
         CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
 
+libmpm = lifx_env.get('BUILD_DIR') + 'libmpmcommon.a'
 lifx_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
 lifx_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 lifx_env.AppendUnique(LINKFLAGS=[
-    '-Wl,--whole-archive',
-    lifx_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    '-Wl,--allow-shlib-undefined',
+    '-Wl,--whole-archive', libmpm,
+    '-Wl,-no-whole-archive',
 ])
 
 lifx_env.AppendUnique(LIBS=[
@@ -87,5 +89,6 @@ lifx_src = [
 
 lifx_env.AppendUnique(LIFX_SRC=lifx_src)
 lifxlib = lifx_env.SharedLibrary('lifxplugin', lifx_env.get('LIFX_SRC'))
+lifx_env.Depends(lifxlib, libmpm)
 lifx_env.InstallTarget(lifxlib, 'lifxplugin')
 lifx_env.UserInstallTargetLib(lifxlib, 'lifxplugin')
index 8a243a1..20a3637 100644 (file)
@@ -67,11 +67,13 @@ if 'g++' in lyric_env.get('CXX'):
     lyric_env.AppendUnique(
         CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
 
+libmpm = lyric_env.get('BUILD_DIR') + 'libmpmcommon.a'
 lyric_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
 lyric_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 lyric_env.AppendUnique(LINKFLAGS=[
-    '-Wl,--whole-archive',
-    lyric_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    '-Wl,--allow-shlib-undefined',
+    '-Wl,--whole-archive', libmpm,
+    '-Wl,-no-whole-archive'
 ])
 
 lyric_env.AppendUnique(LIBS=[
@@ -92,5 +94,6 @@ lyric_src = [
 
 lyric_env.AppendUnique(LYRIC_SRC=lyric_src)
 lyriclib = lyric_env.SharedLibrary('lyricplugin', lyric_env.get('LYRIC_SRC'))
+lyric_env.Depends(lyriclib, libmpm)
 lyric_env.InstallTarget(lyriclib, 'lyricplugin')
 lyric_env.UserInstallTargetLib(lyriclib, 'lyricplugin')
index 4649159..6fbe9fc 100644 (file)
@@ -75,11 +75,13 @@ if 'g++' in nest_env.get('CXX'):
 if nest_env.get('LOGGING'):
     nest_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
+libmpm = nest_env.get('BUILD_DIR') + 'libmpmcommon.a'
 nest_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
 nest_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
 nest_env.AppendUnique(LINKFLAGS=[
-    '-Wl,--whole-archive',
-    nest_env.get('BUILD_DIR') + 'libmpmcommon.a', '-Wl,-no-whole-archive'
+    '-Wl,--allow-shlib-undefined',
+    '-Wl,--whole-archive', libmpm,
+    '-Wl,-no-whole-archive',
 ])
 
 nest_env.PrependUnique(LIBS=[
@@ -103,5 +105,6 @@ nest_src = [
 
 nest_env.AppendUnique(NEST_SRC=nest_src)
 nestlib = nest_env.SharedLibrary('nestplugin', nest_env.get('NEST_SRC'))
+nest_env.Depends(nestlib, libmpm)
 nest_env.InstallTarget(nestlib, 'nestplugin')
 nest_env.UserInstallTargetLib(nestlib, 'nestplugin')