Remove unnecessary flags in script files when building iotivity & easy setup targeted...
[platform/upstream/iotivity.git] / build_common / SConscript
index 38a4c8b..f8085d4 100644 (file)
@@ -29,7 +29,7 @@ os_arch_map = {
 host = platform.system().lower()
 
 # the host string contains version of windows. 6.3, 6.4, 10.0 which is 8.0, 8.1, and 10 respectively.
-# Let's canonicalize the msys_nt-XX.X system name  by stripping version off.
+# Let's canonicalize the msys_nt-XX.X system name by stripping version off.
 if 'msys_nt' in host:
        host = 'msys_nt'
 
@@ -86,8 +86,9 @@ help_vars.Add(EnumVariable('TARGET_OS', 'Target platform', host, host_target_map
 
 help_vars.Add(BoolVariable('WITH_RA', 'Build with Remote Access module', False))
 help_vars.Add(BoolVariable('WITH_TCP', 'Build with TCP adapter', False))
-help_vars.Add(EnumVariable('WITH_RD', 'Build including Resource Directory', '0', allowed_values=('0', '1')))
-help_vars.Add(BoolVariable('WITH_CLOUD', 'Build including Cloud client sample', False))
+help_vars.Add(ListVariable('WITH_MQ', 'Build with MQ publisher/broker', 'OFF', ['OFF', 'SUB', 'PUB', 'BROKER']))
+help_vars.Add(BoolVariable('WITH_CLOUD', 'Build including AccountManager class and Cloud Client sample', False))
+help_vars.Add(ListVariable('RD_MODE', 'Resource Directory build mode', 'CLIENT', ['CLIENT', 'SERVER']))
 
 help_vars.Add(BoolVariable('SIMULATOR', 'Build with simulator module', False))
 
@@ -111,12 +112,6 @@ help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device (For Ard
 help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK path', None, PathVariable.PathAccept))
 help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept))
 help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile))
-#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',
@@ -324,14 +319,14 @@ if not user_lib:
 if user_prefix:
        pc_vars = {'\@PREFIX\@': user_prefix,
                                '\@EXEC_PREFIX\@':user_prefix,
-                               '\@VERSION\@': '1.0.1',
+                               '\@VERSION\@': '1.1.1',
                                '\@LIB_INSTALL_DIR\@': user_lib,
                                '\@ROUTING_DEFINE\@': routing_define
                                }
 else:
        pc_vars = {'\@PREFIX\@': env.get('BUILD_DIR').encode('string_escape'),
                                '\@EXEC_PREFIX\@': env.get('BUILD_DIR').encode('string_escape'),
-                               '\@VERSION\@': '1.0.1',
+                               '\@VERSION\@': '1.1.1',
                                '\@LIB_INSTALL_DIR\@': user_lib,
                                '\@ROUTING_DEFINE\@': routing_define
                                }
@@ -396,8 +391,7 @@ if target_os == "yocto":
     env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__', '_GNU_SOURCE'])
     env.AppendUnique(CFLAGS = ['-std=gnu99'])
     env.AppendUnique(CCFLAGS = ['-Wall', '-Wextra', '-fPIC'])
-    env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread'])
-    env.AppendUnique(LIBS = ['uuid'])
+    env.AppendUnique(LIBS = ['dl', 'pthread', 'uuid'])
     Export('env')
 else:
     '''