Пример #1
0
def load_win_x64_android_arm_gcc_common_settings(conf):
    """Setup all compiler and linker settings shared over all win_x64_arm_linux_androideabi_4_8 configurations
	"""

    v = conf.env

    # Setup Tools for GCC Cross Compile Toolchain
    if not conf.is_option_true('auto_detect_compiler'):
        android_sdk_home = conf.CreateRootRelativePath('Code/SDKs/android-sdk')
        android_ndk_home = conf.CreateRootRelativePath('Code/SDKs/android-ndk')
        android_java_home = conf.CreateRootRelativePath('Code/SDKs/jdk')
        android_ant_home = conf.CreateRootRelativePath('Code/SDKs/apache-ant')

        # Validate paths
        for path in [
                android_sdk_home, android_ndk_home, android_java_home,
                android_ant_home
        ]:
            if not os.path.exists(path):
                conf.cry_error(
                    "Requiered Android SDK path does not exist: %s. Fix path or try running WAF with 'auto_detect_compiler' option enabled."
                    % path)
    else:
        android_sdk_home = os.getenv('ANDROID_HOME', "")
        android_ndk_home = os.getenv('NDK_ROOT', "")
        android_java_home = os.getenv('JAVA_HOME', "")
        android_ant_home = os.getenv('ANT_HOME', "")

        # Validate paths
        if not os.path.exists(android_sdk_home):
            conf.cry_error(
                "Unable to locate ANDROID SDK. Environment variable 'ANDROID_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )
        if not os.path.exists(android_ndk_home):
            conf.cry_error(
                "Unable to locate ANDROID NDK. Environment variable 'NDK_ROOT' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )
        if not os.path.exists(android_java_home):
            conf.cry_error(
                "Unable to locate JAVA. Environment variable 'JAVA_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )
        if not os.path.exists(android_ant_home):
            conf.cry_error(
                "Unable to locate APACHE ANT. Environment variable 'ANT_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )

    # Configure platform and compiler mutations
    platform_target = '/platforms/android-' + str(android_target_version)
    compiler_target = '/arch-arm'
    compiler_version = str(android_compiler_version)
    toolchain = 'arm-linux-androideabi-' + compiler_version

    android_sdk_platform_target = android_sdk_home + platform_target
    android_ndk_platform_compiler_target = android_ndk_home + platform_target + compiler_target
    android_ndk_toolchain_target = android_ndk_home + '/toolchains/' + toolchain + '/prebuilt/windows-x86_64'
    if not os.path.exists(android_ndk_toolchain_target
                          ):  # Fallback if the 64 bit compiler is not found
        android_ndk_toolchain_target = android_ndk_home + '/toolchains/' + toolchain + '/prebuilt/windows'

    android_stl_home = android_ndk_home + '/sources/cxx-stl/gnu-libstdc++/' + compiler_version

    v['AR'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-ar'
    v['CC'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-gcc.exe'
    v['CXX'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-g++.exe'
    v['LINK'] = v['LINK_CC'] = v[
        'LINK_CXX'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-g++.exe'
    v['STRIP'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-strip.exe'

    v['JAR'] = android_java_home + '/bin/jar.exe'
    v['JAVAC'] = android_java_home + '/bin/javac.exe'
    v['ANDROID_CLASSPATH'] = android_sdk_platform_target + '/android.jar'
    v['ANDROID_TARGET_VERSION'] = android_target_version

    v['ANT'] = android_ant_home + '/bin/ant.bat'

    v['ANDROID_NDK_HOME'] = android_ndk_home
    v['ANDROID_SDL_HOME'] = android_stl_home
    v['ANDROID_SDK_HOME'] = android_sdk_home
    v['ANDROID_JAVA_HOME'] = android_java_home

    v['cprogram_PATTERN'] = '%s'
    v['cxxprogram_PATTERN'] = '%s'
    v['cshlib_PATTERN'] = 'lib%s.so'
    v['cxxshlib_PATTERN'] = 'lib%s.so'
    v['cstlib_PATTERN'] = 'lib%s.a'
    v['cxxstlib_PATTERN'] = 'lib%s.a'

    v['DEFINES'] += ['_LINUX', 'LINUX', 'LINUX32', 'ANDROID', '_HAS_C9X']

    # Setup global include paths
    v['INCLUDES'] += [
        android_ndk_platform_compiler_target + '/usr/include',
        android_stl_home + '/include',
        android_stl_home + '/libs/armeabi-v7a/include',
        android_ndk_home + '/sources/android/support/include',
        android_ndk_home + '/sources/android/native_app_glue',
        conf.CreateRootRelativePath('Code/Tools/SDLExtension/src/include'),
    ]

    # Setup global library search path
    v['LIBPATH'] += [
        android_stl_home + 'libs/armeabi-v7a', platform_target + '/usr/lib'
    ]
    # Introduce the compiler to generate 32 bit code
    v['CFLAGS'] += ['-mfpu=neon', '-mfloat-abi=softfp', '-march=armv7-a']
    v['CXXFLAGS'] += ['-mfpu=neon', '-mfloat-abi=softfp', '-march=armv7-a']

    v['CFLAGS'] += ['--sysroot=' + android_ndk_platform_compiler_target]
    v['CXXFLAGS'] += ['--sysroot=' + android_ndk_platform_compiler_target]
    v['LINKFLAGS'] += [
        '--sysroot=' + android_ndk_platform_compiler_target,
        android_stl_home + '/libs/armeabi-v7a/libgnustl_shared.so'
    ]
def load_win_x64_android_arm_common_settings(conf):
    """Setup all compiler and linker settings shared over all win_x64_arm_linux_androideabi_4_8 configurations
	"""

    v = conf.env

    # Setup Tools for GCC Cross Compile Toolchain
    if not conf.is_option_true('auto_detect_compiler'):
        android_sdk_home = conf.CreateRootRelativePath('Code/SDKs/android-sdk')
        android_ndk_home = conf.CreateRootRelativePath('Code/SDKs/android-ndk')
        android_java_home = conf.CreateRootRelativePath('Code/SDKs/jdk')
        android_ant_home = conf.CreateRootRelativePath('Code/SDKs/apache-ant')

        # Validate paths
        for path in [
                android_sdk_home, android_ndk_home, android_java_home,
                android_ant_home
        ]:
            if not os.path.exists(path):
                conf.cry_error(
                    "Requiered Android SDK path does not exist: %s. Fix path or try running WAF with 'auto_detect_compiler' option enabled."
                    % path)
    else:
        android_sdk_home = os.getenv('ANDROID_HOME', "")
        android_ndk_home = os.getenv('NDK_ROOT', "")
        android_java_home = os.getenv('JAVA_HOME', "")
        android_ant_home = os.getenv('ANT_HOME', "")

        # Validate paths
        if not os.path.exists(android_sdk_home):
            conf.cry_error(
                "Unable to locate ANDROID SDK. Environment variable 'ANDROID_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )
        if not os.path.exists(android_ndk_home):
            conf.cry_error(
                "Unable to locate ANDROID NDK. Environment variable 'NDK_ROOT' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )
        if not os.path.exists(android_java_home):
            conf.cry_error(
                "Unable to locate JAVA. Environment variable 'JAVA_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )
        if not os.path.exists(android_ant_home):
            conf.cry_error(
                "Unable to locate APACHE ANT. Environment variable 'ANT_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?"
            )

    # Configure platform and compiler mutations
    platform_target = '/platforms/android-' + str(android_target_version)
    compiler_target = '/arch-arm'

    clang_toolchain = 'llvm'
    gnu_toolchain = 'arm-linux-androideabi-' + str(android_gcc_version)

    android_sdk_platform_target = android_sdk_home + platform_target
    android_ndk_platform_compiler_target = android_ndk_home + platform_target + compiler_target

    # Clang
    android_ndk_clang_toolchain_target = android_ndk_home + '/toolchains/' + clang_toolchain + '/prebuilt/windows-x86_64'

    # GNU
    android_ndk_gcc_toolchain_target = android_ndk_home + '/toolchains/' + gnu_toolchain + '/prebuilt/windows-x86_64'

    # LLVM STL
    #android_stl_home = android_ndk_home + '/sources/cxx-stl/llvm-libc++'
    #android_stl_include_paths =  [android_stl_home + '/libcxx/include']
    #android_stl_lib_name = 'c++_shared'

    # GNU STL
    android_stl_home = android_ndk_home + '/sources/cxx-stl/gnu-libstdc++/' + str(
        android_gcc_version)
    android_stl_include_paths = [
        android_stl_home + '/include',
        android_stl_home + 'libs/armeabi-v7a/include',
        android_stl_home + 'include/backward'
    ]
    android_stl_lib_name = 'gnustl_shared'

    android_stl_lib = android_stl_home + '/libs/armeabi-v7a/lib' + android_stl_lib_name + '.so'

    v['AR'] = android_ndk_gcc_toolchain_target + '/arm-linux-androideabi/bin/ar.exe'
    v['CC'] = android_ndk_clang_toolchain_target + '/bin/clang.exe'
    v['CXX'] = android_ndk_clang_toolchain_target + '/bin/clang++.exe'
    v['LINK'] = v['LINK_CC'] = v[
        'LINK_CXX'] = android_ndk_clang_toolchain_target + '/bin/clang++.exe'
    v['STRIP'] = android_ndk_gcc_toolchain_target + '/arm-linux-androideabi/bin/strip.exe'

    v['JAR'] = android_java_home + '/bin/jar.exe'
    v['JAVAC'] = android_java_home + '/bin/javac.exe'
    v['ANDROID_CLASSPATH'] = android_sdk_platform_target + '/android.jar'
    v['ANDROID_TARGET_VERSION'] = android_target_version

    v['ANT'] = android_ant_home + '/bin/ant.bat'

    v['ANDROID_NDK_HOME'] = android_ndk_home
    v['ANDROID_SDL_HOME'] = android_stl_home
    v['ANDROID_SDK_HOME'] = android_sdk_home
    v['ANDROID_JAVA_HOME'] = android_java_home
    v['ANDROID_ANT_HOME'] = android_ant_home

    v['ANDROID_SDL_LIB_PATH'] = android_stl_lib
    v['ANDROID_SDL_LIB_NAME'] = android_stl_lib_name

    v['cprogram_PATTERN'] = '%s'
    v['cxxprogram_PATTERN'] = '%s'
    v['cshlib_PATTERN'] = 'lib%s.so'
    v['cxxshlib_PATTERN'] = 'lib%s.so'
    v['cstlib_PATTERN'] = 'lib%s.a'
    v['cxxstlib_PATTERN'] = 'lib%s.a'

    v['DEFINES'] += ['_LINUX', 'LINUX', 'LINUX32', 'ANDROID', '_HAS_C9X']

    if android_target_version >= 21:
        v['DEFINES'] += ['HAS_STPCPY=1']

    # Setup global include paths
    v['INCLUDES'] += android_stl_include_paths + [
        android_ndk_platform_compiler_target + '/usr/include', android_stl_home
        + '/include', android_stl_home + '/libs/armeabi-v7a/include',
        android_ndk_home + '/sources/android/support/include',
        android_ndk_home + '/sources/android/native_app_glue'
    ]

    # Setup global library search path
    v['LIBPATH'] += [
        android_stl_home + '/libs/armeabi-v7a',
        android_ndk_home + platform_target + '/arch-arm/usr/lib'
    ]

    v['LIB'] = [
        'c',
        android_stl_lib_name,
        'log',
        'm',
        'android',
    ] + v['LIB']
    # Introduce the compiler to generate 32 bit code
    #-ffunction-sections
    #-funwind-tables
    #-fstack-protector-strong
    #-no-canonical-prefixes
    #-march=armv7-a
    #-mfloat-abi=softfp
    #-mfpu=vfpv3-d16
    #-fno-integrated-as
    #-mthumb
    #-Wa,--noexecstack
    #-Wformat -Werror=format-security
    #-fno-exceptions
    #-fno-rtti -g
    #
    #-DANDROID
    #-ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=c++11 -O0 -fno-limit-debug-info -O0 -fno-limit-debug-info  -fPIC -MD

    common_flag = [
        '-target', 'armv7-none-linux-androideabi', '-gcc-toolchain',
        android_ndk_gcc_toolchain_target,
        '--sysroot=' + android_ndk_platform_compiler_target, '-march=armv7-a'
    ]

    compiler_flags = common_flag + ['-g', '-mfpu=neon', '-fpic']

    # LINKER
    #-DANDROID
    #-ffunction-sections
    #-funwind-tables
    #-fstack-protector-strong
    #-no-canonical-prefixes
    #-march=armv7-a
    #-mfloat-abi=softfp
    #-mfpu=vfpv3-d16
    #-fno-integrated-as
    #-mthumb
    #-Wa,--noexecstack -Wformat
    #-Werror=format-security
    #-Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--gc-sections -Wl,-z,nocopyreloc
    #-pie
    #-fPIE  -lm

    # Compiler
    #cxx_flags = [
    #-cc1
    #-triple armv7-none-linux-android
    #-S -disable-free
    #-disable-llvm-verifier
    #-main-file-name Cry3DEngine_main_2_uber.cpp
    #-mrelocation-model pic
    #-pic-level 2
    #-mthread-model posix
    #-mdisable-fp-elim
    #-relaxed-aliasing
    #-fmath-errno
    #-masm-verbose
    #-no-integrated-as
    #-mconstructor-aliases
    #-munwind-tables
    #-fuse-init-array
    #-target-cpu cortex-a8
    #-target-feature
    #+soft-float-abi
    #-target-feature
    #-fp-only-sp
    #-target-feature
    #-d16
    #-target-feature +vfp3
    #-target-feature -fp16
    #-target-feature -vfp4
    #-target-feature -fp-armv8
    #-target-feature +neon
    #-target-feature -crypto
    #-target-abi aapcs-linux
    #-mfloat-abi soft
    #-target-linker-version 2.24
    #-dwarf-column-info
    #-debug-info-kind=standalone
    #-dwarf-version=4
    #-debugger-tuning=gdb
    #-ffunction-sections
    #-fdata-sections
    #-resource-dir "C:\NVPACK\android-sdk-windows\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\..\lib64\clang\3.8.256229"
    #-dependency-file "Code\CryEngine\Cry3DEngine\CMakeFiles\Cry3DEngine.dir\Cry3DEngine_main_2_uber.cpp.o.d"
    #-sys-header-deps
    #-MT Code/CryEngine/Cry3DEngine/CMakeFiles/Cry3DEngine.dir/Cry3DEngine_main_2_uber.cpp.o
    #-isystem D:/code/marioc_FRWP1MARIOC_cemain/Code/CryEngine/CryCommon
    #-isystem D:/code/marioc_FRWP1MARIOC_cemain/Code/SDKs/boost
    #-isystem C:/NVPACK/android-sdk-windows/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include
    #-isystem C:/NVPACK/android-sdk-windows/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include
    #-isystem C:/NVPACK/android-sdk-windows/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
    #-D ANDROID
    #-D ANDROID_NDK
    #-D CRY_IS_MONOLITHIC_BUILD
    #-D CRY_MOBILE
    #-D DISABLE_IMPORTGL
    #-D HAS_STPCPY=1 -D LINUX -D LINUX32 -D PROFILE -D _DLL -D _LIB -D _LINUX -D _MT -D _PROFILE -D __ANDROID__ -D __ARM_ARCH_7A__ -I D:/code/marioc_FRWP1MARIOC_cemain/Code/CryEngine/Cry3DEngine -I D:/code/marioc_FRWP1MARIOC_cemain/Code/Libs/yasli -I D:/code/marioc_FRWP1MARIOC_cemain/Code/Libs/yasli/../../SDKs/yasli -I D:/code/marioc_FRWP1MARIOC_cemain/Code/Libs/lz4/../../SDKs/lz4/lib -D ANDROID -D ANDROID -isysroot C:/NVPACK/android-sdk-windows/ndk-bundle/platforms/android-21/arch-arm -internal-isystem C:/NVPACK/android-sdk-windows/ndk-bundle/platforms/android-21/arch-arm/usr/local/include -internal-isystem "C:\NVPACK\android-sdk-windows\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\..\lib64\clang\3.8.256229\include" -internal-externc-isystem C:/NVPACK/android-sdk-windows/ndk-bundle/platforms/android-21/arch-arm/include -internal-externc-isystem C:/NVPACK/android-sdk-windows/ndk-bundle/platforms/android-21/arch-arm/usr/include -O0 -Wformat -Werror=format-security -Wformat -Werror=format-security -Wno-switch -Wno-parentheses -Wno-multichar -Wno-format-security -Wno-unused-value -Wno-comment -Wno-sizeof-pointer-memaccess -Wno-empty-body -Wno-writable-strings -Wno-logical-op-parentheses -Wno-invalid-offsetof -Wno-tautological-compare -Wno-shift-negative-value -Wno-null-conversion -Wno-c++11-narrowing -Wno-write-strings -Wno-narrowing -std=c++11 -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir "E:\AndroidStudioProjects\MyFirstCmakeTest\app\.externalNativeBuild\cmake\debug\armeabi-v7a"
    #-ferror-limit 19 -fmessage-length 0 -femulated-tls -stack-protector 2 -fallow-half-arguments-and-returns -fno-rtti -fobjc-runtime=gcc
    #-fdiagnostics-show-option

    v['CFLAGS'] += compiler_flags
    v['CXXFLAGS'] += compiler_flags

    #v['CFLAGS'] += ['-march=armeabi-v7a']
    #v['CXXFLAGS'] += ['-march=armeabi-v7a']

    #v['CFLAGS'] += [ '--sysroot=' + android_ndk_platform_compiler_target ]
    #v['CXXFLAGS'] += [ '--sysroot=' + android_ndk_platform_compiler_target ]
    v['LINKFLAGS'] += common_flag + [v['ANDROID_SDL_LIB_PATH']]
def load_win_x64_android_arm_gcc_common_settings(conf):
	"""
	Setup all compiler and linker settings shared over all win_x64_arm_linux_androideabi_4_8 configurations
	"""
	
	v = conf.env
	
	# Setup Tools for GCC Cross Compile Toolchain
	if not conf.is_option_true('auto_detect_compiler'):	
		android_sdk_home		= conf.CreateRootRelativePath('Code/SDKs/android-sdk')
		android_ndk_home		= conf.CreateRootRelativePath('Code/SDKs/android-ndk')
		android_java_home		= conf.CreateRootRelativePath('Code/SDKs/jdk')
		android_ant_home 		= conf.CreateRootRelativePath('Code/SDKs/apache-ant')
		
		# Validate paths
		for path in [android_sdk_home, android_ndk_home, android_java_home, android_ant_home]:
			if not os.path.exists(path):
				conf.cry_error("Requiered Android SDK path does not exist: %s. Fix path or try running WAF with 'auto_detect_compiler' option enabled." % path)
	else:
		android_sdk_home 		= os.getenv('ANDROID_HOME', "")	
		android_ndk_home 		= os.getenv('NDK_ROOT', "")
		android_java_home 	= os.getenv('JAVA_HOME', "")
		android_ant_home 		= os.getenv('ANT_HOME', "")

		# Validate paths
		if not os.path.exists(android_sdk_home):
			conf.cry_error("Unable to locate ANDROID SDK. Environment variable 'ANDROID_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?")
		if not os.path.exists(android_ndk_home):
			conf.cry_error("Unable to locate ANDROID NDK. Environment variable 'NDK_ROOT' not set? Do you have Tegra Android Development Pack (TADP) installed?")
		if not os.path.exists(android_java_home):
			conf.cry_error("Unable to locate JAVA. Environment variable 'JAVA_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?")
		if not os.path.exists(android_ant_home):
			conf.cry_error("Unable to locate APACHE ANT. Environment variable 'ANT_HOME' not set? Do you have Tegra Android Development Pack (TADP) installed?")

	# Configure platform and compiler mutations		
	platform_target = '/platforms/android-' + str(android_target_version)
	compiler_target = '/arch-arm'
	compiler_version = str(android_compiler_version)
	toolchain = 'arm-linux-androideabi-' + compiler_version
	
	android_sdk_platform_target 	= android_sdk_home + platform_target
	android_ndk_platform_compiler_target 	= android_ndk_home + platform_target + compiler_target
	android_ndk_toolchain_target 	= android_ndk_home + '/toolchains/' + toolchain + '/prebuilt/windows-x86_64'
	if not os.path.exists(android_ndk_toolchain_target): # Fallback if the 64 bit compiler is not found
		android_ndk_toolchain_target 	= android_ndk_home + '/toolchains/' + toolchain + '/prebuilt/windows'

	android_stl_home = android_ndk_home + '/sources/cxx-stl/gnu-libstdc++/' + compiler_version
	
	v['AR'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-ar'
	v['CC'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-gcc.exe'
	v['CXX'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-g++.exe'
	v['LINK'] = v['LINK_CC'] = v['LINK_CXX'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-g++.exe'
	v['STRIP'] = android_ndk_toolchain_target + '/bin/arm-linux-androideabi-strip.exe'
	
	v['JAR'] = android_java_home + '/bin/jar.exe'
	v['JAVAC'] = android_java_home +'/bin/javac.exe'
	v['ANDROID_CLASSPATH'] = android_sdk_platform_target + '/android.jar'
	v['ANDROID_TARGET_VERSION'] = android_target_version
	
	v['ANT'] = android_ant_home + '/bin/ant.bat'
	
	v['ANDROID_NDK_HOME'] = android_ndk_home 
	v['ANDROID_SDL_HOME'] = android_stl_home 
	v['ANDROID_SDK_HOME'] = android_sdk_home 
	v['ANDROID_JAVA_HOME'] = android_java_home
	
	v['cprogram_PATTERN'] 	= '%s'
	v['cxxprogram_PATTERN'] = '%s'
	v['cshlib_PATTERN'] 	= 'lib%s.so'
	v['cxxshlib_PATTERN'] 	= 'lib%s.so'
	v['cstlib_PATTERN']     = 'lib%s.a'
	v['cxxstlib_PATTERN']   = 'lib%s.a'
	
	v['DEFINES'] += ['_LINUX', 'LINUX', 'LINUX32', 'ANDROID', '_HAS_C9X' ]

	# Setup global include paths
	v['INCLUDES'] += [ 
		android_ndk_platform_compiler_target + '/usr/include', 
		android_stl_home + '/include', 
		android_stl_home + '/libs/armeabi-v7a/include',
		android_ndk_home + '/sources/android/support/include',
		android_ndk_home + '/sources/android/native_app_glue',
		conf.CreateRootRelativePath('Code/Tools/SDLExtension/src/include'),
		]
	
	# Setup global library search path
	v['LIBPATH'] += [		
		android_stl_home + 'libs/armeabi-v7a',
		platform_target + '/usr/lib'
	]	 
	# Introduce the compiler to generate 32 bit code
	v['CFLAGS'] += [ '-mfpu=neon', '-mfloat-abi=softfp', '-march=armv7-a' ]
	v['CXXFLAGS'] += [ '-mfpu=neon', '-mfloat-abi=softfp', '-march=armv7-a' ]	
	
	v['CFLAGS'] += [ '--sysroot=' + android_ndk_platform_compiler_target ]
	v['CXXFLAGS'] += [ '--sysroot=' + android_ndk_platform_compiler_target ]
	v['LINKFLAGS'] += [ '--sysroot=' + android_ndk_platform_compiler_target, android_stl_home + '/libs/armeabi-v7a/libgnustl_shared.so']