######################################################################
mpmcommon_env.PrependUnique(CPPPATH=[
- os.path.join(src_dir, 'resource', 'include'),
-])
-mpmcommon_env.AppendUnique(CPPPATH=[
- os.path.join(bridging_path, 'include'),
+ os.path.join(src_dir, 'resource', 'include'),
+ os.path.join(bridging_path, 'include'),
+ os.path.join(src_dir, 'resource', 'c_common'),
+ os.path.join(src_dir, 'resource', 'c_common', 'ocrandom', 'include'),
+ os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
+ os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include')
])
if target_os not in ['arduino', 'windows']:
- mpmcommon_env.AppendUnique(CPPDEFINES=['WITH_POSIX'])
mpmcommon_env.AppendUnique(
CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror', '-fpic'])
-if target_os in ['darwin', 'ios']:
- mpmcommon_env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
-
mpmcommon_env.AppendUnique(RPATH=[mpmcommon_env.get('BUILD_DIR')])
-mpmcommon_env.AppendUnique(LIBPATH=[mpmcommon_env.get('BUILD_DIR')])
-mpmcommon_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
-
-if mpmcommon_env.get('LOGGING'):
- mpmcommon_env.AppendUnique(CPPDEFINES=['TB_LOG'])
+mpmcommon_env['LINKFLAGS'] = maskFlags(mpmcommon_env['LINKFLAGS'])
mpmcommon_env.PrependUnique(LIBS=[
'm',
src_dir = env.get('SRC_DIR')
bridging_path = os.path.join(src_dir, 'bridging')
+manager_env = env.Clone()
+
print "Reading MPM script"
######################################################################
# Build flags
######################################################################
-env.PrependUnique(CPPPATH=[
- os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
- os.path.join(src_dir, 'extlibs', 'rapidjson', 'include', 'rapidjson')
+manager_env.PrependUnique(CPPPATH=[
+ os.path.join(src_dir, 'resource', 'c_common'),
+ os.path.join(src_dir, 'resource', 'c_common', 'ocrandom', 'include'),
+ os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
+ os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
+ os.path.join(src_dir, 'extlibs', 'rapidjson', 'include', 'rapidjson'),
+ os.path.join(bridging_path, 'include')
])
-env.AppendUnique(CPPPATH=[os.path.join(bridging_path, 'include')])
if target_os not in ['arduino', 'windows']:
- env.AppendUnique(CPPDEFINES=['WITH_POSIX'])
- env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
-
-if target_os in ['darwin', 'ios']:
- env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
-
-env.AppendUnique(RPATH=[env.get('BUILD_DIR')])
-env.AppendUnique(LIBPATH=[env.get('BUILD_DIR')])
-
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
+ manager_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
-env.PrependUnique(LIBS=['mpmcommon'])
+manager_env.AppendUnique(RPATH=[manager_env.get('BUILD_DIR')])
+manager_env.PrependUnique(LIBS=['mpmcommon'])
#####################################################################
# Source files and Target(s)
'miniPluginManager.cpp'),
]
-env.AppendUnique(MINIPLUGINMANAGER_SRC=minipluginmanager_src)
+manager_env.AppendUnique(MINIPLUGINMANAGER_SRC=minipluginmanager_src)
if target_os in ['android', 'tizen']:
- mpmlib = env.SharedLibrary('minipluginmanager',
- env.get('MINIPLUGINMANAGER_SRC'))
+ mpmlib = manager_env.SharedLibrary('minipluginmanager',
+ manager_env.get('MINIPLUGINMANAGER_SRC'))
else:
- mpmlib = env.StaticLibrary('minipluginmanager',
- env.get('MINIPLUGINMANAGER_SRC'))
-env.InstallTarget(mpmlib, 'minipluginmanager')
-env.UserInstallTargetLib(mpmlib, 'minipluginmanager')
+ mpmlib = manager_env.StaticLibrary('minipluginmanager',
+ manager_env.get('MINIPLUGINMANAGER_SRC'))
+manager_env.InstallTarget(mpmlib, 'minipluginmanager')
+manager_env.UserInstallTargetLib(mpmlib, 'minipluginmanager')
# Otherwise you will need to prepend LD_LIBRARY_PATH to your execution command.
mpmclient_env.PrependUnique(LIBS=['minipluginmanager'])
mpmclient_env.AppendUnique(LIBS=['pthread'])
-mpmclient_env.AppendUnique(CPPDEFINES=['TB_LOG'])
mpmclient_env.AppendUnique(LIBS=[
- 'm', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap', 'curl'
+ 'm', 'octbstack', 'ocsrm', 'mpmcommon', 'connectivity_abstraction', 'coap', 'curl'
])
-
mpmclient_env.AppendUnique(
RPATH=[os.path.join(env.get('BUILD_DIR'), 'bridging', 'plugins')])
+if target_os in ['linux', 'tizen', 'yocto']:
+ mpmclient_env.AppendUnique(LIBS = ['rt'])
+
if target_os in ['linux', 'tizen']:
mpmclient_env.ParseConfig('pkg-config --cflags --libs sqlite3')
else:
hue_env.AppendUnique(CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
hue_env.AppendUnique(RPATH=[hue_env.get('BUILD_DIR')])
-hue_env.AppendUnique(LIBPATH=[hue_env.get('BUILD_DIR')])
if hue_env.get('LOGGING'):
hue_env.AppendUnique(CPPDEFINES=['TB_LOG'])
os.path.join(bridging_path, 'plugins', 'lifx_plugin', 'lifx_objects')
])
-if target_os not in ['arduino', 'windows']:
- lifx_env.AppendUnique(CPPDEFINES=['WITH_POSIX'])
-
-if target_os in ['darwin', 'ios']:
- lifx_env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
-
if 'g++' in lifx_env.get('CXX'):
lifx_env.AppendUnique(
CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
lifx_env.AppendUnique(RPATH=[lifx_env.get('BUILD_DIR')])
-lifx_env.AppendUnique(LIBPATH=[lifx_env.get('BUILD_DIR')])
-
-if lifx_env.get('LOGGING'):
- lifx_env.AppendUnique(CPPDEFINES=['TB_LOG'])
lifx_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
lifx_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
os.path.join(bridging_path, 'plugins', 'lyric_plugin', 'honeywell_objects')
])
-if target_os not in ['arduino', 'windows']:
- lyric_env.AppendUnique(CPPDEFINES=['WITH_POSIX'])
-
-if target_os in ['darwin', 'ios']:
- lyric_env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
-
if 'g++' in lyric_env.get('CXX'):
lyric_env.AppendUnique(
CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
lyric_env.AppendUnique(RPATH=[lyric_env.get('BUILD_DIR')])
-lyric_env.AppendUnique(LIBPATH=[lyric_env.get('BUILD_DIR')])
-
-if lyric_env.get('LOGGING'):
- lyric_env.AppendUnique(CPPDEFINES=['TB_LOG'])
lyric_env['LINKFLAGS'] = maskFlags(env['LINKFLAGS'])
lyric_env.AppendUnique(LINKFLAGS=['-Wl,--allow-shlib-undefined'])
CXXFLAGS=['-std=c++0x', '-Wall', '-Wextra', '-Werror'])
nest_env.AppendUnique(RPATH=[nest_env.get('BUILD_DIR')])
-nest_env.AppendUnique(LIBPATH=[nest_env.get('BUILD_DIR')])
if nest_env.get('LOGGING'):
nest_env.AppendUnique(CPPDEFINES=['TB_LOG'])