Providing build option to disable BLE server
[platform/upstream/iotivity.git] / resource / csdk / connectivity / build / SConscript
index 4b71fd8..05be021 100644 (file)
@@ -21,7 +21,7 @@ os_arch_map = {
                'darwin': ['i386', 'x86_64'],
                'ios': ['i386', 'x86_64', 'armv7', 'armv7s', 'arm64'],
                'arduino': ['avr', 'arm'],
-                'yocto': ['i586', 'x86_64', 'arm', 'powerpc', 'powerpc64', 'mips', 'mipsel'],
+                'yocto': ['i586', 'i686', 'x86_64', 'arm', 'aarch64', 'powerpc', 'powerpc64', 'mips', 'mipsel'],
                }
 
 host = platform.system().lower()
@@ -66,6 +66,9 @@ help_vars.Add(BoolVariable('UPLOAD', 'Upload binary ? (For Arduino)', require_up
 help_vars.Add(EnumVariable('ROUTING', 'Enable routing', 'EP', allowed_values=('GW', 'EP')))
 help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
 help_vars.Add(BoolVariable('WITH_TCP', 'Enable TCP', False))
+help_vars.Add(BoolVariable('DISABLE_TCP_SERVER', 'Disable TCP server', False))
+help_vars.Add(BoolVariable('DISABLE_BLE_SERVER', 'Disable BLE server', False))
+help_vars.Add(ListVariable('WITH_MQ', 'Build with MQ publisher/subscriber/broker', 'OFF', ['OFF', 'SUB', 'PUB', 'BROKER']))
 
 help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device', 'OIC-DEVICE', None, None),)
 
@@ -173,10 +176,10 @@ def __install(ienv, targets, name):
 def __installlib(ienv, targets, name):
        user_prefix = env.get('PREFIX')
        if user_prefix:
-               i_n = ienv.Install(user_prefix + '/lib', targets)
-               ienv.Alias("install", i_n)
+               install_lib_dir = os.path.join(user_prefix, 'lib')
        else:
-               i_n = ienv.Install(env.get('BUILD_DIR') + '/lib', targets)
+               install_lib_dir = os.path.join(env.get('BUILD_DIR'), 'lib')
+       i_n = ienv.Install(install_lib_dir, targets)
        ienv.Alias("install", i_n)
 
 def __installbin(ienv, targets, name):
@@ -271,7 +274,8 @@ if target_os == "yocto":
     env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__', '_GNU_SOURCE'])
     env.AppendUnique(CFLAGS = ['-std=gnu99'])
     env.AppendUnique(CCFLAGS = ['-Wall', '-fPIC'])
-    env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread'])
+    if target_os in ['linux']:
+        env.AppendUnique(LIBS = ['dl', 'pthread'])
     Export('env')
 else:
     '''