Specify proper default SCons parameter build values for Android.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Fri, 29 May 2015 22:07:14 +0000 (18:07 -0400)
committerErich Keane <erich.keane@intel.com>
Fri, 29 May 2015 23:04:01 +0000 (23:04 +0000)
This will allow an end user to simply issue "scons TARGET_OS=android" and
expect the build to work. Before this, end users had to specify
the TARGET_TRANSPORT & TARGET_ARCH parameters every time.

Change-Id: I48cea638a441fa55b1a82d320cd2a65b6cc39c01
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1154
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
build_common/SConscript

index 02cbed3..88b39fb 100644 (file)
@@ -40,7 +40,11 @@ if target_os not in host_target_map[host]:
        print "\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host])
        Exit(1)
 
-default_arch = platform.machine()
+if target_os is 'android':
+       default_arch = 'x86'
+else:
+       default_arch = platform.machine()
+
 if default_arch not in os_arch_map[target_os]:
        default_arch = os_arch_map[target_os][0].lower()
 
@@ -63,7 +67,7 @@ else:
 ######################################################################
 # Common build options (release, target os, target arch)
 ######################################################################
-targets_disallow_multitransport = ['arduino']
+targets_disallow_multitransport = ['arduino', 'android']
 
 help_vars = Variables()
 help_vars.Add(BoolVariable('VERBOSE', 'Show compilation', False))