Remove unnecessary flags in script files when building iotivity & easy setup targeted...
authorsy01.youn <sy01.youn@samsung.com>
Tue, 23 Aug 2016 22:57:59 +0000 (07:57 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Wed, 24 Aug 2016 05:43:22 +0000 (05:43 +0000)
Also remove unused tizen script files.
In addtion, security related function is activated in Tizen Enrolle Sample App. (which was commented before)
Tested on Tizen Mobile Z3, and it works well.

Change-Id: If70424c31949aa22210b64c45003983ea56a8594
Signed-off-by: sy01.youn <sy01.youn@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10833
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
13 files changed:
build_common/tizen/SConscript
gbsbuild.sh
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/Makefile [deleted file]
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConstruct [deleted file]
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/gbsbuild.sh [new file with mode: 0644]
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/enrolleewifi.cpp
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/packaging/com.oic.es.sample.spec
service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/scons/SConscript
service/easy-setup/sampleapp/enrollee/tizen-sdb/README.txt
tools/tizen/iotivity.spec

index fe06f8f..88e95dd 100644 (file)
@@ -1,4 +1,3 @@
-# -*- mode: python; python-indent-offset: 4; indent-tabs-mode: nil -*-
 ##
 # This script set linux specific flags (GNU GCC)
 #
@@ -15,7 +14,7 @@ if env.get('RELEASE'):
        env.AppendUnique(CPPDEFINES = ['NDEBUG'])
 
 if env.get('LOGGING'):
-    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+    env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
 
 env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', ""))
 env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
index aedbd1e..f2d61c7 100755 (executable)
@@ -10,9 +10,6 @@ name=iotivity
 
 rm -rf $name-$version
 
-echo $1
-export ES_SAMPLE=$1
-
 builddir=`pwd`
 sourcedir=`pwd`
 
@@ -72,37 +69,10 @@ echo "Calling core gbs build command"
 gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
 echo $gbscommand
 if eval $gbscommand; then
-   echo "Build is successful"
-else
-   echo "Build failed!"
-   exit 1
-fi
-
-# Build EasySetup App. if ES_ON is entered on command prompt
-if echo $ES_SAMPLE|grep -qi '^ES_ON$'; then
-    cd service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
-    echo `pwd`
-    echo "EasySetup Sample Build is enabled"
-
-    # Initialize Git repository for EnrolleeSample
-    if [ ! -d .git ]; then
-      git init ./
-      git config user.email "you@example.com"
-      git config user.name "Your Name"
-      git add ./
-      git commit -m "Initial commit"
-    fi
-    echo "Calling EasySetup Sample gbs build command"
-    gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC --include-all --repository ./"
-    echo $gbscommand
-    if eval $gbscommand; then
-      echo "EasySetup Sample build is successful"
-    else
-      echo "EasySetup Sample build is failed."
-      exit 1
-    fi
+    echo "Build is successful"
 else
-    echo "EasySetup Sample Build is not enabled"
+    echo "Build failed!"
+    exit 1
 fi
 
 rm -rf tmp
index cfb1695..1c9271b 100644 (file)
@@ -192,10 +192,6 @@ env.SetDir(env.GetLaunchDir())
 env['ROOT_DIR']=env.GetLaunchDir()
 
 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-if env.get('ROUTING') == 'GW':
-    env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
-elif env.get('ROUTING') == 'EP':
-    env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
 env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
 
 Export('env')
index e9333a7..b20dc4e 100644 (file)
@@ -24,18 +24,10 @@ os_arch_map = {
                 'yocto': ['i586', 'x86_64', 'arm', 'powerpc', 'powerpc64', 'mips', 'mipsel'],
                }
 
-es_role_map = {
-               'enrollee', 'mediator'
-               }
-
 es_target_enrollee_map = {
                'arduino', 'tizen', 'linux'
                }
 
-es_softap_mode_map = {
-               'ENROLLEE_SOFTAP', 'MEDIATOR_SOFTAP'
-               }
-
 host = platform.system().lower()
 
 if not host_target_map.has_key(host):
@@ -64,13 +56,6 @@ require_upload = ARGUMENTS.get('UPLOAD', True)
 # Get the device name
 device_name = ARGUMENTS.get('DEVICE_NAME', "OIC-DEVICE")
 
-# Get es_role
-es_role = ARGUMENTS.get('ES_ROLE')
-
-if es_role not in es_role_map:
-       print "\nError: Unknown ES_ROLE: %s (Allow values: %s)\n" % (es_role, es_role_map)
-       Exit(1)
-
 # Get es_target_enrollee
 es_target_enrollee = ARGUMENTS.get('ES_TARGET_ENROLLEE')
 
@@ -78,12 +63,6 @@ if es_target_enrollee not in es_target_enrollee_map:
        print "\nError: Unknown ES_TARGET_ENROLLEE: %s (Allow values: %s)\n" % (es_target_enrollee, es_target_enrollee_map)
        Exit(1)
 
-# Get es_soft_mode
-es_soft_mode = ARGUMENTS.get('ES_SOFTAP_MODE')
-
-if es_soft_mode not in es_softap_mode_map:
-       print "\nError: Unknown ES_SOFTAP_MODE: %s (Allow values: %s)\n" % (es_soft_mode, es_softap_mode_map)
-       Exit(1)
 
 ######################################################################
 # Common build options (release, target os, target arch)
@@ -103,10 +82,6 @@ help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device', 'OIC-D
 
 #ES_TARGET_ENROLLEE is for specifying what is our target enrollee (Arduino or rest of platforms which support Multicast)
 help_vars.Add(EnumVariable('ES_TARGET_ENROLLEE', 'Target Enrollee', 'arduino', allowed_values=('arduino', 'tizen', 'linux')))
-#ES_ROLE is for specifying the role (Enrollee or Mediator) for which scons is being executed
-help_vars.Add(EnumVariable('ES_ROLE', 'Target build mode', 'mediator', allowed_values=('mediator', 'enrollee')))
-#ES_SOFT_MODE is for specifying MODE (Mode 1 : Enrollee with  Soft AP or Mode 2  : Mediator with Soft AP)
-help_vars.Add(EnumVariable('ES_SOFTAP_MODE', 'Target build mode', 'ENROLLEE_SOFTAP', allowed_values=('ENROLLEE_SOFTAP', 'MEDIATOR_SOFTAP')))
 
 AddOption('--prefix',
                   dest='prefix',
@@ -133,7 +108,7 @@ if target_os in ['android', 'arduino']: # Android/Arduino always uses GNU compil
                        tools = ['gnulink', 'gcc', 'g++', 'ar', 'as']
                        )
 else:
-       env = Environment(variables = help_vars, TARGET_ARCH = target_arch, TARGET_OS = target_os, ES_ROLE = es_role, ES_TARGET_ENROLLEE = es_target_enrollee, ES_SOFTAP_MODE = es_soft_mode, ESPREFIX = GetOption('prefix'))
+       env = Environment(variables = help_vars, TARGET_ARCH = target_arch, TARGET_OS = target_os, ES_TARGET_ENROLLEE = es_target_enrollee, ESPREFIX = GetOption('prefix'))
 
 Help(help_vars.GenerateHelpText(env))
 
diff --git a/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/Makefile b/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/Makefile
deleted file mode 100644 (file)
index 726faee..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-##
-# override with `make BUILD=debug`
-# override with `make PLATFORM=arduinomega` or `make PLATFORM=arduinodue`
-# default to release build
-# default to build for linux
-BUILD   := debug
-PLATFORM := tizen
-OBJ_DIR := ./bin
-ROOT_DIR := .
-VERSION_MAJOR := 0
-VERSION_MINOR := 1
-VERSION_PATCH := 0
-ADAPTER_MACRO := -DWIFI_ADAPTER
-
-$(info *******************tizen Build !!******************)
-
-CC=gcc
-LIBCOAP=./lib/libcoap-4.1.1/
-LIBCOAP_OBJ_DIR=./lib/libcoap-4.1.1/obj
-
-TINYDTLS=./lib/extlibs/tinydtls
-TINYDTLS_OBJ_DIR=./lib/extlibs/tinydtls/obj
-
-# TODO : Currently Hardcoded WIFI_ADAPTER. Change it to generic
-CFLAGS.debug = -DWITH_POSIX -D__TIZEN__ -Wall -std=c99 -DSLP_SDK_LOG -g -D_GNU_SOURCE -DTIZEN_DEBUG_ENABLE -DTB_LOG $(ADAPTER_MACRO)
-CFLAGS.release = -DWITH_POSIX -D__TIZEN__ -Wall -std=c99 -DSLP_SDK_LOG -D_GNU_SOURCE -DTIZEN_DEBUG_ENABLE -DTB_LOG $(ADAPTER_MACRO)
-COMPILEFLAG = `pkg-config --cflags --libs capi-network-wifi dlog capi-network-bluetooth glib-2.0`
-
-# Include files will be copied into a single folder on gbsbuild.
-# NO NEED to mention the path explicitly.
-
-CA_INC              = $(ROOT_DIR)/
-DTLS_INC           = $(ROOT_DIR)/dtls/
-
-INC_DIRS        := -I$(CA_INC)
-INC_DIRS        += -I$(DTLS_INC)
-
-SRC = $(wildcard *.c)
-OBJECTS = $(patsubst %.c, %.o, $(SRC))
-
-#Currently compiling libcoap objects. If it's provided by external party.
-#Then don't compile, Instead directly extract objects and create liboicinterface.a
-all: $(OBJECTS)
-       $(MAKE) -C $(LIBCOAP) clean
-       $(MAKE) -C $(LIBCOAP)
-       -mkdir $(LIBCOAP_OBJ_DIR)
-       @cd $(LIBCOAP_OBJ_DIR) && $(AR) -x ../libcoap.a
-       ar rcs liboicinterface.a $(OBJECTS) $(LIBCOAP_OBJ_DIR)/*.o
-
-%.o : %.c
-       $(CC) -c $(CFLAGS.$(BUILD)) $(COMPILEFLAG) $(INC_DIRS) $< -o $@
-
-
-pack:
-#$(CC) $(CFLAGS) $(COMPILEFLAG) WiFiInterface.c bt_interface.c tc_interface.c sample_main.c -o sample /usr/lib/liboctbstack.a -lm -pthread
-       $(info **************************************TEST***************************)
-install:
-#cp -rf sample ./usr/apps/com.samsung.oicca/bin/sample
-
-clean:
-       rm -rf *.o sample
-       rm -f *.o *.d *.elf *.eep core.a *.hex *.bin *.map *-
-       rm -rf $(OBJ_DIR)
-       rm -rf $(LIBCOAP_OBJ_DIR)
-
index 3831d79..5980501 100644 (file)
@@ -8,25 +8,19 @@ Import('env')
 
 target_os = env.get('TARGET_OS')
 transport = env.get('TARGET_TRANSPORT')
-buildsample = env.get('BUILD_SAMPLE')
 release_mode = env.get('RELEASE')
 secured = env.get('SECURED')
 logging = env.get('LOGGING')
 routing = env.get('ROUTING')
-es_role = env.get('ES_ROLE')
 es_target_enrollee = env.get('ES_TARGET_ENROLLEE')
-es_softap_mode = env.get('ES_SOFTAP_MODE')
 
 print "Given Transport is %s" % transport
 print "Given OS is %s" % target_os
-
-print "Given es_role is %s" % es_role
 print "Given es_target_enrollee is %s" % es_target_enrollee
-print "Given es_softap_mode is %s" % es_softap_mode
 
 
 if target_os == 'tizen':
-       command = "sh service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/gbsbuild.sh %s %s %s %s %s %s %s %s %s" % (transport, secured, buildsample, routing, release_mode, logging, es_role, es_target_enrollee, es_softap_mode)
+       command = "sh service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/gbsbuild.sh %s %s %s %s %s %s" % (transport, secured, routing, release_mode, logging, es_target_enrollee)
        print "Created Command is %s" % command
        gbs_script = env.Command('gbs_build', None, command)
        AlwaysBuild ('gbs_script')
\ No newline at end of file
diff --git a/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConstruct b/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConstruct
deleted file mode 100644 (file)
index bc860fb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-##
-# The main build script
-#
-##
-
-# Load common build config
-# Load common build config
-SConscript('SConscript')
-
-Import('env')
-
-target_os = env.get('TARGET_OS')
-transport = env.get('TARGET_TRANSPORT')
-
-print "Given Transport is %s" % transport
-print "Given OS is %s" % target_os
-print "Secured %s" % env.get('SECURED')
-
-if target_os == 'tizen':
-        SConscript('scons/SConscript')
-else:
-       print "Given platform is not supported"
-
diff --git a/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/gbsbuild.sh b/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/gbsbuild.sh
new file mode 100644 (file)
index 0000000..6ff1441
--- /dev/null
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+cur_dir="./service/easy-setup"
+spec=`ls ./service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/packaging/*.spec`
+version=`rpm --query --queryformat '%{version}\n' --specfile $spec`
+
+name=`echo $name|cut -d" " -f 1`
+version=`echo $version|cut -d" " -f 1`
+
+name=iotivity
+
+rm -rf $name-$version
+
+builddir=`pwd`
+sourcedir=`pwd`
+
+echo `pwd`
+
+rm -rf ./tmp
+
+# Create directory structure for GBS Build
+mkdir ./tmp
+mkdir ./tmp/con/
+mkdir ./tmp/extlibs/
+mkdir ./tmp/packaging
+mkdir ./tmp/logger
+cp -R ./build_common $sourcedir/tmp
+cp -R ./examples $sourcedir/tmp
+
+# tinycbor is available as soft-link, so copying with 'dereference' option.
+cp -LR ./extlibs/tinycbor $sourcedir/tmp/extlibs
+rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
+
+cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
+cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
+cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
+cp -R ./extlibs/sqlite3 $sourcedir/tmp/extlibs
+cp -R ./extlibs/timer $sourcedir/tmp/extlibs
+cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
+cp -R ./resource $sourcedir/tmp
+cp -R ./service $sourcedir/tmp
+cp ./extra_options.scons $sourcedir/tmp
+cp ./tools/tizen/*.spec ./tmp/packaging
+cp ./tools/tizen/*.manifest ./tmp/packaging
+cp ./SConstruct ./tmp
+cp ./LICENSE.md ./tmp
+
+# copy dependency RPMs and conf files for tizen build
+cp ./tools/tizen/*.rpm ./tmp
+cp ./tools/tizen/.gbs.conf ./tmp
+cp ./tools/tizen/*.rpm $sourcedir/tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
+cp ./tools/tizen/.gbs.conf ./tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
+cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp
+
+cd $sourcedir/tmp
+
+echo `pwd`
+rm -rf ./extlibs/tinycbor/tinycbor/.git*
+
+whoami
+
+# Build IoTivity
+# Initialize Git repository
+if [ ! -d .git ]; then
+   git init ./
+   git config user.email "you@example.com"
+   git config user.name "Your Name"
+   git add ./
+   git commit -m "Initial commit"
+fi
+
+buildoption="--define 'TARGET_TRANSPORT '$1 --define 'SECURED '$2 --define 'ROUTING '$3 --define 'RELEASE '$4 --define 'LOGGING '$5 --define 'ES_TARGET_ENROLLEE '$6"
+echo "Calling core gbs build command"
+gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC $buildoption --include-all --repository ./"
+echo $gbscommand
+if eval $gbscommand; then
+   echo "Core build is successful"
+else
+   echo "Core build failed."
+   cd $sourcedir
+   rm -rf $sourcedir/tmp
+   exit 1
+fi
+
+# Build Enrollee Sample App
+cd service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
+echo `pwd`
+# Initialize Git repository
+if [ ! -d .git ]; then
+  git init ./
+  git config user.email "you@example.com"
+  git config user.name "Your Name"
+  git add ./
+  git commit -m "Initial commit"
+fi
+echo "Calling sample gbs build command"
+gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC $buildoption --include-all --repository ./"
+echo $gbscommand
+if eval $gbscommand; then
+  echo "Sample build is successful"
+else
+  echo "Sample build is failed."
+  exit 1
+fi
+rm -rf tmp
+cd $sourcedir
+rm -rf $sourcedir/tmp
+
+exit 0
index 94a51cd..ea4dbb2 100755 (executable)
@@ -58,6 +58,18 @@ static bool gWiFiCBflag = false;
 static char gSSID[OIC_STRING_MAX_VALUE];
 static char gPasswd[OIC_STRING_MAX_VALUE];
 
+void PrintMenu()
+{
+    cout << "========================" << endl;
+    cout << "A: Enabled Security" << endl;
+    cout << "B: Init & Start EasySetup" << endl;
+    cout << "C: Set DeviceInfo" << endl;
+    cout << "D: Connect to TargetAP" << endl;
+    cout << "E: Show Menu......." << endl;
+    cout << "Q: Terminate" << endl;
+    cout << "========================" << endl;
+}
+
 void WiFiProvCbInApp(ESWiFiProvData *eventData)
 {
     cout << "WiFiProvCbInApp IN" << endl;
@@ -89,6 +101,7 @@ void WiFiProvCbInApp(ESWiFiProvData *eventData)
     }
 
     cout << "WiFiProvCbInApp OUT" << endl;
+    PrintMenu();
 }
 
 void DevConfProvCbInApp(ESDevConfProvData *eventData)
@@ -103,8 +116,8 @@ void DevConfProvCbInApp(ESDevConfProvData *eventData)
 
     cout << "Language : " << eventData->language << endl;
     cout << "Country : " << eventData->country << endl;
-
     cout << "DevConfProvCbInApp OUT" << endl;
+    PrintMenu();
 }
 
 void CloudDataProvCbInApp(ESCloudProvData *eventData)
@@ -120,9 +133,8 @@ void CloudDataProvCbInApp(ESCloudProvData *eventData)
     cout << "AuthCode : " << eventData->authCode << endl;
     cout << "AuthProvider : " << eventData->authProvider << endl;
     cout << "CI Server : " << eventData->ciServer << endl;
-
     cout << "CloudDataProvCbInApp OUT" << endl;
-
+    PrintMenu();
 }
 
 ESProvisioningCallbacks gCallbacks = {
@@ -131,18 +143,6 @@ ESProvisioningCallbacks gCallbacks = {
     .CloudDataProvCb = &CloudDataProvCbInApp
 };
 
-void PrintMenu()
-{
-    cout << "========================" << endl;
-    cout << "A: Enabled Security" << endl;
-    cout << "B: Init & Start EasySetup" << endl;
-    cout << "C: Set DeviceInfo" << endl;
-    cout << "D: Connect to TargetAP" << endl;
-    cout << "Q: Terminate" << endl;
-    cout << "ENTER : Show Menu......." << endl;
-    cout << "========================" << endl;
-}
-
 FILE* server_fopen(const char *path, const char *mode)
 {
     (void) path;
@@ -312,7 +312,11 @@ gboolean mainThread(GIOChannel *source, GIOCondition condition, gpointer data)
 
         case 'A': // Enable Security
         case 'a':
-            //EnableSecurity();
+#ifdef __WITH_DTLS__
+            EnableSecurity();
+#else
+            cout << "Sample is not built with secured mode" << endl;
+#endif
             PrintMenu();
             break;
 
@@ -334,6 +338,11 @@ gboolean mainThread(GIOChannel *source, GIOCondition condition, gpointer data)
             PrintMenu();
             break;
 
+        case 'E': // Print Menu
+        case 'e':
+            PrintMenu();
+            break;
+
         default:
             cout << "Wrong option" << endl;
             PrintMenu();
index 0429ce5..dda4b40 100644 (file)
@@ -34,12 +34,10 @@ BuildRequires: iotivity-service
 %endif
 
 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
-%{!?SECURED: %define SECURED 0}
+%{!?SECURED: %define SECURED 1}
 %{!?LOGGING: %define LOGGING True}
 %{!?ROUTING: %define ROUTING EP}
 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
-%{!?ES_ROLE: %define ES_ROLE enrollee}
-%{!?ES_SOFTAP_MODE: %define ES_SOFTAP_MODE MEDIATOR_SOFTAP}
 %{!?VERBOSE: %define VERBOSE 1}
 
 %description
@@ -50,7 +48,7 @@ EasySetup Sample application
 
 %build
 
-scons VERBOSE=%{VERBOSE} TARGET_OS=tizen LOGGING=True TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} ROUTING=%{ROUTING} ES_ROLE=%{ES_ROLE} ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} ES_SOFTAP_MODE=%{ES_SOFTAP_MODE}
+scons VERBOSE=%{VERBOSE} TARGET_OS=tizen LOGGING=True TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} ROUTING=%{ROUTING} ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE}
 
 %install
 
index 53ca968..981d6b0 100644 (file)
@@ -33,10 +33,7 @@ env.ParseConfig("pkg-config --cflags --libs capi-network-wifi dlog gobject-2.0 g
 env.AppendUnique(CPPFLAGS = ['-std=c++0x', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE', '-DTB_LOG','`pkg-config', '--cflags', '--libs','dlog','capi-network-wifi',
                 'gobject-2.0', 'gio-2.0', 'gthread-2.0', 'glib-2.0`'])
 
-#env.AppendUnique(CPPFLAGS = ['-std=c++0x', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE', '-DTB_LOG','`pkg-config', '--cflags', '--libs','dlog','capi-network-wifi',
-#                              'gobject-2.0','glib-2.0`'])
-
-env.AppendUnique(CPPDEFINES = ['TB_LOG', 'ESWIFI'])
+env.AppendUnique(CPPDEFINES = ['TB_LOG'])
 
 env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
 
index 3f8efce..550cae7 100644 (file)
 Build Procedure
 ===============
 
-1) If you are building first time, then delete GBS-ROOT folder from home directory.
+1) If you are building first time, then delete GBS-ROOT-OIC folder from home directory.
    Note: Default build server URL for Tizen is set in gbs configuration file @ iotivity/tools/tizen/.gbs.conf.
          If needed, same can be modified as per appropriate target.
 
 2) Go to "iotivity/" folder.
 
-3) Execute following command to build easy setup sample app. :
+3) Execute following command(s) to start build based on some build flags required :
 
-# sh gbsbuild.sh ES_ON
+# scons -f service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP ROUTING=EP RELEASE=0 LOGGING=true ES_TARGET_ENROLLEE=tizen
 
 4) If built for security mode:
         After installing sample RPM on device, copy required .dat files and other applications to the same path where enrollee_wifi(executable) is available
 
 (If needed, modify the parameters accordingly)
 Note :- Upon successful execution of above command(s) RI library and sample console application(for tizen enrollee)
-        will be generated at path "~/GBS-ROOT/local/repos/<target>/armv7l/RPMS".
+        will be generated at path "~/GBS-ROOT-OIC/local/repos/<target>/armv7l/RPMS".
 
 Procedure to Execute Sample App:
 ================================
index 504d5a6..714569d 100644 (file)
@@ -37,10 +37,8 @@ Requires(post): /sbin/ldconfig
 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
 %{!?SECURED: %define SECURED 1}
 %{!?LOGGING: %define LOGGING True}
-%{!?ROUTING: %define ROUTING GW}
+%{!?ROUTING: %define ROUTING EP}
 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
-%{!?ES_ROLE: %define ES_ROLE enrollee}
-%{!?ES_SOFTAP_MODE: %define ES_SOFTAP_MODE MEDIATOR_SOFTAP}
 %{!?VERBOSE: %define VERBOSE 1}
 
 %description
@@ -111,8 +109,7 @@ scons -j2 --prefix=%{_prefix} \
        VERBOSE=%{VERBOSE} \
        TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
        RELEASE=%{RELEASE} SECURED=%{SECURED} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
-       ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} ES_ROLE=%{ES_ROLE} ES_SOFTAP_MODE=%{ES_SOFTAP_MODE} \
-       LIB_INSTALL_DIR=%{_libdir}
+       ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} LIB_INSTALL_DIR=%{_libdir}
 
 
 %install
@@ -121,8 +118,7 @@ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
 scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
        TARGET_OS=tizen TARGET_ARCH=%{RPM_ARCH} TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
        RELEASE=%{RELEASE} SECURED=%{SECURED} LOGGING=%{LOGGING} ROUTING=%{ROUTING} \
-       ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} ES_ROLE=%{ES_ROLE} ES_SOFTAP_MODE=%{ES_SOFTAP_MODE} \
-       LIB_INSTALL_DIR=%{_libdir}
+       ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} LIB_INSTALL_DIR=%{_libdir}
 
 
 # For Example