Commit aac77352 authored by Harish Kumara Marappa's avatar Harish Kumara Marappa Committed by Uze Choi

Adding the build script changes from master for tizen build.

Change-Id: I712868f1f948aec37d26e304df33bb5aae4e3a9a
Signed-off-by: default avatarHarish Kumara Marappa <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1119Reviewed-by: default avatarRadhaBhavani <radha.p@samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent 3ded2ddf
##
# This script set linux specific flags (GNU GCC)
#
##
Import('env')
print "Reading linux configuration script"
# Set release/debug flags
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS = ['-Os'])
env.AppendUnique(CPPDEFINES = ['NDEBUG'])
else:
env.AppendUnique(CCFLAGS = ['-g'])
if env.get('LOGGING'):
env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
env.AppendUnique(CFLAGS = ['-std=gnu99'])
env.AppendUnique(CCFLAGS = ['-Wall', '-fPIC'])
env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread'])
if env.get('TARGET_OS') == 'tizen':
env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-DSLP_SDK_LOG', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'])
env.ParseConfig("pkg-config dlog --cflags --libs")
# Set arch flags
target_arch = env.get('TARGET_ARCH')
if target_arch in ['x86']:
env.AppendUnique(CCFLAGS = ['-m32'])
env.AppendUnique(LINKFLAGS = ['-m32'])
elif target_arch in ['x86_64']:
env.AppendUnique(CCFLAGS = ['-m64'])
env.AppendUnique(LINKFLAGS = ['-m64'])
elif target_arch.find('v7a-hard') > 0:
env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
env.AppendUnique(CPPFLAGS = ['-mfloat-abi=hard'])
env.AppendUnique(CCFLAGS = ['-mfloat-abi=hard'])
env.AppendUnique(LINKFLAGS = ['-mfloat-abi=hard'])
elif target_arch.find('v7a') > 0:
env.AppendUnique(CPPFLAGS = ['-march=armv7-a'])
elif target_arch.find('arm64') >= 0:
env.AppendUnique(CPPFLAGS = ['-march=armv8-a'])
else:
env.AppendUnique(CPPFLAGS = ['-march=armv5te'])
Name: iotivity
Version: 0.9.0
Version: 0.9.1
Release: 0
Summary: IoTivity Base Stack & IoTivity Services
Group: System Environment/Libraries
......@@ -19,6 +19,7 @@ BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(capi-network-wifi)
BuildRequires: pkgconfig(capi-network-bluetooth)
BuildRequires: pkgconfig(capi-appfw-app-common)
Requires(postun): /sbin/ldconfig
Requires(post): /sbin/ldconfig
......@@ -68,9 +69,11 @@ mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_sbindir}
cp out/tizen/*/release/lib*.so %{buildroot}%{_libdir}
cp out/tizen/*/release/lib*.a %{buildroot}%{_libdir}
cp out/tizen/*/release/libSSMSDK.a %{buildroot}%{_libdir}
cp out/tizen/*/release/libppm.a %{buildroot}%{_libdir}
cp out/tizen/*/release/service/protocol-plugin/plugins/mqtt-fan/*.so %{buildroot}%{_libdir}
cp out/tizen/*/release/service/protocol-plugin/plugins/mqtt-light/*.so %{buildroot}%{_libdir}
cp /usr/lib/libuuid.so %{buildroot}%{_libdir}
cp resource/csdk/stack/include/ocstack.h %{buildroot}%{_includedir}
cp resource/csdk/stack/include/ocstackconfig.h %{buildroot}%{_includedir}
......
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