withtcp=0
withcloud=0
-if [ "WITH_TCP" = "$1" ] || [ "WITH_TCP" = "$2" ];then
+withproxy=0
+if [ "WITH_TCP" = "$1" ] || [ "WITH_TCP" = "$2" ] || [ "WITH_TCP" = "$3" ];then
withtcp=1
fi
-if [ "WITH_CLOUD" = "$1" ] || [ "WITH_CLOUD" = "$2" ];then
+if [ "WITH_CLOUD" = "$1" ] || [ "WITH_CLOUD" = "$2" ] || [ "WITH_CLOUD" = "$3" ];then
withcloud=1
fi
+if [ "WITH_PROXY" = "$1" ] || [ "WITH_PROXY" = "$2" ] || [ "WITH_PROXY" = "$3" ];then
+ withproxy=1
+fi
echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' -B ~/GBS-ROOT-OIC --include-all --repository ./"
+gbscommand="gbs build -A armv7l --define 'WITH_TCP $withtcp' --define 'WITH_CLOUD $withcloud' --define 'WITH_PROXY $withproxy' -B ~/GBS-ROOT-OIC --include-all --repository ./"
echo $gbscommand
if eval $gbscommand; then
echo "Build is successful"
#SConscript('resource-directory/SConscript')
# Build coap-http-proxy project
- if target_os in ['linux'] and env.get('WITH_PROXY', False):
+ if target_os in ['linux', 'tizen'] and env.get('WITH_PROXY', False):
SConscript('coap-http-proxy/SConscript')
# Build EasySetup module
if target_os not in ['windows']:
local_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra'])
-if target_os in ['linux']:
+if target_os in ['linux', 'tizen']:
local_env.AppendUnique(LIBS = ['pthread', 'curl'])
if target_os == 'android':
######################################################################
# Samples for the proxy
######################################################################
-if target_os in ['linux']:
+if target_os in ['linux', 'tizen']:
SConscript('samples/SConscript')
{
OIC_LOG_V(INFO, TAG, "StackResult: %u", clientResponse->result);
OIC_LOG_PAYLOAD(INFO, clientResponse->payload);
- OIC_LOG(INFO, TAG, ("=============> Put Response"));
+ OIC_LOG(INFO, TAG, "=============> Put Response");
}
else
{
{
OIC_LOG_V(INFO, TAG, "StackResult: %u", clientResponse->result);
OIC_LOG_PAYLOAD(INFO, clientResponse->payload);
- OIC_LOG(INFO, TAG, ("=============> Post Response"));
+ OIC_LOG(INFO, TAG, "=============> Post Response");
}
else
{
{
OIC_LOG_V(INFO, TAG, "StackResult: %d", clientResponse->result);
OIC_LOG_PAYLOAD(INFO, clientResponse->payload);
- OIC_LOG(INFO, TAG, ("=============> Delete Response"));
+ OIC_LOG(INFO, TAG, "=============> Delete Response");
}
else
{
OIC_LOG_V(INFO, TAG, "StackResult: %d", clientResponse->result);
OIC_LOG_V(INFO, TAG, "SEQUENCE NUMBER: %d", clientResponse->sequenceNumber);
OIC_LOG_PAYLOAD(INFO, clientResponse->payload);
- OIC_LOG(INFO, TAG, ("=============> Get Response"));
+ OIC_LOG(INFO, TAG, "=============> Get Response");
if (clientResponse->numRcvdVendorSpecificHeaderOptions > 0)
{
cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_server.dat %{ex_install_dir}
cp out/tizen/*/%{build_mode}/resource/examples/oic_svr_db_client.dat %{ex_install_dir}
cp out/tizen/*/%{build_mode}/libcoap.a %{buildroot}%{_libdir}
+
+%if 0%{?WITH_PROXY} == 1
+mkdir -p %{ex_install_dir}/proxy-sample
+cp out/tizen/*/%{build_mode}/service/coap-http-proxy/samples/proxy_main %{ex_install_dir}/proxy-sample/
+cp out/tizen/*/%{build_mode}/service/coap-http-proxy/samples/proxy_client %{ex_install_dir}/proxy-sample/
+%endif
%if 0%{?SECURED} == 1
mkdir -p %{ex_install_dir}/provisioning
mkdir -p %{ex_install_dir}/provision-sample
%{_libdir}/librcs_container.so
%{_libdir}/librcs_server.so
%{_libdir}/libESEnrolleeSDK.so
+%if 0%{?WITH_PROXY} == 1
+%{_libdir}/libcoap_http_proxy.so
+%endif
%if 0%{?SECURED} == 1
%{_libdir}/libocpmapi.so
%{_libdir}/libocprovision.so