Added build option to decide whether include libocpmapi.so when build liboctbstack.so
authorChul Lee <chuls.lee@samsung.com>
Thu, 15 Dec 2016 04:07:12 +0000 (13:07 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Wed, 21 Dec 2016 11:58:30 +0000 (11:58 +0000)
This option may helpful in case of only server stack used.

This patch was reviewed from https://gerrit.iotivity.org/gerrit/#/c/15185/

Change-Id: Ibb8eabe3c2e0ffb5370977d11a648886eb4b70ab
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15663
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
build_common/SConscript

index 25fb2fd..d1206c0 100644 (file)
@@ -113,6 +113,7 @@ else:
 help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os]))
 help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1')))
 help_vars.Add(EnumVariable('MULTIPLE_OWNER', 'Enable multiple owner', '0', allowed_values=('0', '1')))
+help_vars.Add(EnumVariable('EXC_PROV_SUPPORT', 'Except OCPMAPI library(libocpmapi.so)', '0', allowed_values=('0', '1')))
 help_vars.Add(EnumVariable('TEST', 'Run unit tests', '0', allowed_values=('0', '1')))
 help_vars.Add(BoolVariable('LOGGING', 'Enable stack logging', logging_default))
 help_vars.Add(BoolVariable('UPLOAD', 'Upload binary ? (For Arduino)', require_upload))
@@ -350,8 +351,9 @@ if env.get('WITH_TCP'):
         defines.append('-D__WITH_TLS__=1')
 
 if env.get('SECURED') == '1':
-    libs.append('-locpmapi')
     defines.append('-D_WITH_DTLS_=1')
+    if not env.get('EXC_PROV_SUPPORT'):
+        libs.append('-locpmapi')
 
 pc_vars = {
     '\@VERSION\@': project_version,