Commit c6916eea authored by Philippe Coval's avatar Philippe Coval Committed by Todd Malsbary

bridging: Add explicit dependency to libmpm

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/23409Signed-off-by: default avatarPhilippe Coval <philippe.coval@osg.samsung.com>
parent e0d9f446
......@@ -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')
......@@ -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')
......@@ -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')
......@@ -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')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment