예제 #1
0
def configure(conf):
    conf.find_generic_cc()
    conf.find_ar()
    conf.generic_cc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #2
0
def configure(conf):
    conf.find_sxc()
    conf.find_program("sxar", VAR="AR")
    conf.sxc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #3
0
def configure(conf):
    conf.find_pgi_compiler("CC", "pgcc")
    conf.find_ar()
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #4
0
파일: pgicc.py 프로젝트: pablolbap/jlv2
def configure(conf):
    conf.find_pgi_compiler('CC', 'pgcc')
    conf.find_ar()
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #5
0
파일: pgicc.py 프로젝트: AleemDev/waf
def configure(conf):
	conf.find_pgi_compiler('CC', 'pgcc')
	conf.find_ar()
	conf.gcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #6
0
def configure(conf):
    conf.find_sxc()
    conf.find_program('sxar', VAR='AR')
    conf.sxc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #7
0
파일: ticgt.py 프로젝트: ArduPilot/waf
def configure(conf):
    v = conf.env
    v.TI_CGT_DIR = getattr(Options.options, "ti-cgt-dir", "")
    v.TI_DSPLINK_DIR = getattr(Options.options, "ti-dsplink-dir", "")
    v.TI_BIOSUTILS_DIR = getattr(Options.options, "ti-biosutils-dir", "")
    v.TI_DSPBIOS_DIR = getattr(Options.options, "ti-dspbios-dir", "")
    v.TI_XDCTOOLS_DIR = getattr(Options.options, "ti-xdctools-dir", "")
    conf.find_ticc()
    conf.find_tiar()
    conf.find_tild()
    conf.ticc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.find_program(["tconf"], var="TCONF", path_list=v.TI_XDCTOOLS_DIR)

    conf.env.TCONF_INCLUDES += [opj(conf.env.TI_DSPBIOS_DIR, "packages")]

    conf.env.INCLUDES += [opj(conf.env.TI_CGT_DIR, "include")]

    conf.env.LIBPATH += [opj(conf.env.TI_CGT_DIR, "lib")]

    conf.env.INCLUDES_DSPBIOS += [opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "include")]

    conf.env.LIBPATH_DSPBIOS += [opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "lib")]

    conf.env.INCLUDES_DSPLINK += [opj(conf.env.TI_DSPLINK_DIR, "dsplink", "dsp", "inc")]
예제 #8
0
def mkspec_gxx_configure(conf, major, minor, prefix=None, minimum=False):
    """
    :param major:   The major version number of the compiler, e.g. 4
    :param minor:   The minor version number of the compiler, e.g. 6
    :param prefix:  Prefix to the compiler name, e.g. 'arm-linux-androideabi'
    :param minimum: Only check for a minimum compiler version, if true
    """
    # Where to look for the compiler
    paths = conf.mkspec_get_toolchain_paths()

    # Find g++ first
    gxx_names = conf.mkspec_get_gnu_binary_name('g++', major, minor, prefix)
    if minimum:
        gxx_names = 'g++'
    cxx = conf.find_program(gxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Also find gcc
    gcc_names = conf.mkspec_get_gnu_binary_name('gcc', major, minor, prefix)
    if minimum:
        gcc_names = 'gcc'
    cc = conf.find_program(gcc_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_gxx_cxxflags()
    # Add our own cc flags
    conf.mkspec_set_gcc_ccflags()
예제 #9
0
def mkspec_gxx_configure(conf, major, minor, prefix=None, minimum=False):
    """
    :param major:   The major version number of the compiler, e.g. 4
    :param minor:   The minor version number of the compiler, e.g. 6
    :param prefix:  Prefix to the compiler name, e.g. 'arm-linux-androideabi'
    :param minimum: Only check for a minimum compiler version, if true
    """
    # Where to look for the compiler
    paths = conf.mkspec_get_toolchain_paths()

    # Find g++ first
    gxx_names = conf.mkspec_get_gnu_binary_name('g++', major, minor, prefix)
    if minimum:
        gxx_names = 'g++'
    cxx = conf.find_program(gxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Also find gcc
    gcc_names = conf.mkspec_get_gnu_binary_name('gcc', major, minor, prefix)
    if minimum:
        gcc_names = 'gcc'
    cc = conf.find_program(gcc_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_gxx_cxxflags()
    # Add our own cc flags
    conf.mkspec_set_gcc_ccflags()
예제 #10
0
파일: xlc.py 프로젝트: derjolni/osmbrowser
def configure(conf):
    conf.find_xlc()
    conf.find_ar()
    conf.xlc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #11
0
def configure(conf):
    v = conf.env
    v.TI_CGT_DIR = getattr(Options.options, "ti-cgt-dir", "")
    v.TI_DSPLINK_DIR = getattr(Options.options, "ti-dsplink-dir", "")
    v.TI_BIOSUTILS_DIR = getattr(Options.options, "ti-biosutils-dir", "")
    v.TI_DSPBIOS_DIR = getattr(Options.options, "ti-dspbios-dir", "")
    v.TI_XDCTOOLS_DIR = getattr(Options.options, "ti-xdctools-dir", "")
    conf.find_ticc()
    conf.find_tiar()
    conf.find_tild()
    conf.ticc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.find_program(["tconf"], var="TCONF", path_list=v.TI_XDCTOOLS_DIR)

    conf.env.TCONF_INCLUDES += [opj(conf.env.TI_DSPBIOS_DIR, "packages")]

    conf.env.INCLUDES += [opj(conf.env.TI_CGT_DIR, "include")]

    conf.env.LIBPATH += [opj(conf.env.TI_CGT_DIR, "lib")]

    conf.env.INCLUDES_DSPBIOS += [
        opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "include")
    ]

    conf.env.LIBPATH_DSPBIOS += [
        opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "lib")
    ]

    conf.env.INCLUDES_DSPLINK += [
        opj(conf.env.TI_DSPLINK_DIR, "dsplink", "dsp", "inc")
    ]
예제 #12
0
파일: xlc.py 프로젝트: blablack/ams-lv2
def configure(conf):
	conf.find_xlc()
	conf.find_ar()
	conf.xlc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #13
0
파일: c_nec.py 프로젝트: AleemDev/waf
def configure(conf):
	conf.find_sxc()
	conf.find_program('sxar',VAR='AR')
	conf.sxc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #14
0
파일: emcc.py 프로젝트: pixpil/gii
def configure(conf):
	conf.find_emcc()
	conf.load('emar', tooldir="waf-tools")
	conf.emcc_common_flags()
	conf.emcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #15
0
파일: android-gcc.py 프로젝트: pixpil/gii
def configure(conf):
	conf.find_android_gcc()
	conf.load('android-ar', tooldir="waf-tools")
	conf.gcc_common_flags()
	conf.android_gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #16
0
def configure(conf):
    conf.find_gcc()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #17
0
def configure(conf):
    conf.find_android_gcc()
    conf.load('android-ar', tooldir="waf-tools")
    conf.gcc_common_flags()
    conf.android_gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #18
0
def configure(conf):
    conf.find_emcc()
    conf.load('emar', tooldir="waf-tools")
    conf.emcc_common_flags()
    conf.emcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #19
0
def configure(conf):
	conf.find_gcc()
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #20
0
파일: irixcc.py 프로젝트: PseudoSky/voodoo
def configure(conf):
	conf.find_irixcc()
	conf.find_cpp()
	conf.find_ar()
	conf.irixcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #21
0
def configure(conf):
	conf.find_irixcc()
	conf.find_cpp()
	conf.find_ar()
	conf.irixcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #22
0
파일: c_bgxlc.py 프로젝트: afeldman/waf
def configure(conf):
	conf.find_bgxlc()
	conf.find_ar()
	conf.xlc_common_flags()
	conf.env.LINKFLAGS_cshlib = ['-G','-Wl,-bexpfull']
	conf.env.LINKFLAGS_cprogram = []
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #23
0
파일: dcc.py 프로젝트: GrahamDennis/xpdeint
def configure(conf):
	conf.find_dcc()
	conf.find_dar()
	conf.find_dld()
	conf.find_ddump()
	conf.dcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #24
0
파일: clang.py 프로젝트: hakiri/sdn-ns-3
def configure(conf):
	conf.find_clang()
	conf.find_program(['llvm-ar','ar'],var='AR')
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
예제 #25
0
def configure(conf):
    conf.find_bgxlc()
    conf.find_ar()
    conf.xlc_common_flags()
    conf.env.LINKFLAGS_cshlib = ['-G', '-Wl,-bexpfull']
    conf.env.LINKFLAGS_cprogram = []
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #26
0
def configure(conf):
    conf.find_clang()
    conf.find_program(['llvm-ar', 'ar'], var='AR')
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #27
0
def configure(conf):
    conf.find_dcc()
    conf.find_dar()
    conf.find_dld()
    conf.find_ddump()
    conf.dcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #28
0
def configure(conf):
	conf.autodetect()
	conf.find_msvc()
	conf.msvc_common_flags()
	conf.cc_load_tools()
	conf.cxx_load_tools()
	conf.cc_add_flags()
	conf.cxx_add_flags()
	conf.link_add_flags()
예제 #29
0
def configure(conf):
    conf.find_clang()
    conf.find_program(["llvm-ar", "ar"], var="AR")
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
def setup_gnu_gcc_toolchain(conf, prefix, compiler = None, cxxcompiler = None, path_list=None):
    env = conf.env

    env.stash()
    try:
        env['GNU_GCC_PREFIX']      = prefix
        env['GNU_BINUTILS_PREFIX'] = prefix

        conf.setup_gnu_binutils(path_list)

        compiler    = compiler or (env['GNU_GCC_PREFIX'] + 'gcc')
        cxxcompiler = cxxcompiler or (env['GNU_GCC_PREFIX'] + 'g++')

        cc = conf.find_program(compiler, var='CC', path_list=path_list)
        cc = conf.cmd_to_list(cc)

        cxx = conf.find_program(cxxcompiler, var='CXX', mandatory=False, path_list=path_list)
        cxx = conf.cmd_to_list(cxx)

        conf.env.CC  = cc
        conf.env.AS  = cc

        env['CC_NAME']    = 'gcc'
        env['CC_VERSION'] = conf.cmd_and_log(env.CC + ["-dumpversion"]).strip().split('.')
        env['MACHINE']    = env['MACHINE'] or conf.cmd_and_log(env.CC +["-dumpmachine"]).strip()
        env['DEST_OS']    = 'Unknown'

        # backwards compat. Since we support clang now as well,
        # there is no common CC_PREFIX anymore. (CLANG is not prefixed)
        # please use 'MACHINE' for future developments
        env['CC_PREFIX']  = prefix.strip('-')

        conf.cc_load_tools()
        conf.gcc_common_flags()
        conf.cc_add_flags()

        conf.env.AS_TGT_F = '-o'

        if(cxx):
            env['CXX_NAME'] = 'gcc'
            env['CXX'] = cxx

            conf.cxx_load_tools()
            conf.gxx_common_flags()
            conf.cxx_add_flags()

        conf.link_add_flags()

        # we have to use gnu99 because we use some non standard gnu extensions conditionally
        # when __GNUC__ is defined
        env.append_value('CFLAGS_standard_c99', [ "-std=gnu99" ])

    except conf.errors.ConfigurationError:
        env.revert()
        raise
예제 #31
0
def configure(conf):
	"""
	Configuration for arm-linux-gnueabi-gcc
	"""
	conf.find_arm_gcc()
        conf.find_arm_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
def configure(conf):
    conf.find_arm_none_eabi_gcc()
    conf.load("arm-none-eabi-ar", tooldir=os.path.dirname(os.path.realpath(__file__)))
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    v = conf.env
    v["SHLIB_MARKER"] = []
    v["STLIB_MARKER"] = []
예제 #33
0
def configure(conf):
    conf.find_owcc()
    conf.owcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.env.append_unique('CFLAGS', '-Wc,-xx')
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.env.append_unique('CXXFLAGS', '-Wc,-xx')
    conf.link_add_flags()
    conf.owcc_detect_platform()
예제 #34
0
def configure(conf):
    """
    Configuration for clang
    """
    conf.find_clang()
    conf.find_ar()
    conf.clang_common_flags()
    conf.clang_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #35
0
파일: msvc.py 프로젝트: jrossi/waf
def configure(conf):
	"""
	Configuration methods to call for detecting msvc
	"""
	conf.autodetect()
	conf.find_msvc()
	conf.msvc_common_flags()
	conf.cc_load_tools()
	conf.cxx_load_tools()
	conf.cc_add_flags()
	conf.cxx_add_flags()
	conf.link_add_flags()
예제 #36
0
def configure(conf):
    """
	Configuration for gcc
	"""
    conf.find_gcc()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.check_gcc_o_space()
예제 #37
0
def configure(conf):
    conf.find_clang()
    conf.find_program(['llvm-ar', 'ar'], var='AR')
    conf.find_ar()
    conf.gcc_common_flags()
    # Allow the user to provide flags for the target platform.
    conf.gcc_modifier_platform()
    # And allow more fine grained control based on the compiler's triplet.
    conf.clang_modifier_target_triple()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
예제 #38
0
파일: gcc.py 프로젝트: blablack/ams-lv2
def configure(conf):
	"""
	Configuration for gcc
	"""
	conf.find_gcc()
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
	conf.check_gcc_o_space()
예제 #39
0
def configure(conf):
    """
	Configuration methods to call for detecting msvc
	"""
    conf.autodetect(True)
    conf.find_msvc()
    conf.msvc_common_flags()
    conf.cc_load_tools()
    conf.cxx_load_tools()
    conf.cc_add_flags()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.visual_studio_add_flags()
def configure(conf):
	conf.find_emscripten()
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gxx_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.cxx_load_tools()
	conf.cxx_add_flags()
	conf.link_add_flags()
	conf.env.ARFLAGS = ['rcs']
	conf.env.cshlib_PATTERN = '%s.js'
	conf.env.cxxshlib_PATTERN = '%s.js'
	conf.env.cstlib_PATTERN = '%s.bc'
	conf.env.cxxstlib_PATTERN = '%s.bc'
	conf.env.cprogram_PATTERN = '%s.html'
	conf.env.cxxprogram_PATTERN = '%s.html'
	conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
예제 #41
0
def configure(conf):
    """
	Configuration for gcc
	"""
    conf.find_gcc()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    #conf.link_add_flags()

    conf.find_gxx()
    #conf.find_ar()
    conf.gxx_common_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.find_gas()
예제 #42
0
def configure(conf):
    conf.find_emscripten()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gxx_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.env.ARFLAGS = ['rcs']
    conf.env.cshlib_PATTERN = '%s.js'
    conf.env.cxxshlib_PATTERN = '%s.js'
    conf.env.cstlib_PATTERN = '%s.bc'
    conf.env.cxxstlib_PATTERN = '%s.bc'
    conf.env.cprogram_PATTERN = '%s.html'
    conf.env.cxxprogram_PATTERN = '%s.html'
    conf.env.append_value('LINKFLAGS', ['-Wl,--enable-auto-import'])
예제 #43
0
def configure(conf):
	v = conf.env
	v.TI_CGT_DIR = getattr(Options.options, 'ti-cgt-dir', "")
	v.TI_DSPLINK_DIR = getattr(Options.options, 'ti-dsplink-dir', "")
	v.TI_BIOSUTILS_DIR = getattr(Options.options, 'ti-biosutils-dir', "")
	v.TI_DSPBIOS_DIR = getattr(Options.options, 'ti-dspbios-dir', "")
	v.TI_XDCTOOLS_DIR = getattr(Options.options, 'ti-xdctools-dir', "")
	conf.find_ticc()
	conf.find_tiar()
	conf.find_tild()
	conf.ticc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
	conf.find_program(['tconf'], var='TCONF', path_list=v.TI_XDCTOOLS_DIR)
	
	conf.env.TCONF_INCLUDES += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages'),
	]
	
	conf.env.INCLUDES += [
	 opj(conf.env.TI_CGT_DIR, 'include'),
	]
	
	conf.env.LIBPATH += [
	 opj(conf.env.TI_CGT_DIR, "lib"),
	]

	conf.env.INCLUDES_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'include'),
	]
	
	conf.env.LIBPATH_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'lib'),
	]

	conf.env.INCLUDES_DSPLINK += [
	 opj(conf.env.TI_DSPLINK_DIR, 'dsplink', 'dsp', 'inc'),
	]
예제 #44
0
파일: ticgt.py 프로젝트: afeldman/waf
def configure(conf):
	v = conf.env
	v.TI_CGT_DIR = getattr(Options.options, 'ti-cgt-dir', "")
	v.TI_DSPLINK_DIR = getattr(Options.options, 'ti-dsplink-dir', "")
	v.TI_BIOSUTILS_DIR = getattr(Options.options, 'ti-biosutils-dir', "")
	v.TI_DSPBIOS_DIR = getattr(Options.options, 'ti-dspbios-dir', "")
	v.TI_XDCTOOLS_DIR = getattr(Options.options, 'ti-xdctools-dir', "")
	conf.find_ticc()
	conf.find_tiar()
	conf.find_tild()
	conf.ticc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
	conf.find_program(['tconf'], var='TCONF', path_list=v.TI_XDCTOOLS_DIR)

	conf.env.TCONF_INCLUDES += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages'),
	]

	conf.env.INCLUDES += [
	 opj(conf.env.TI_CGT_DIR, 'include'),
	]

	conf.env.LIBPATH += [
	 opj(conf.env.TI_CGT_DIR, "lib"),
	]

	conf.env.INCLUDES_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'include'),
	]

	conf.env.LIBPATH_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'lib'),
	]

	conf.env.INCLUDES_DSPLINK += [
	 opj(conf.env.TI_DSPLINK_DIR, 'dsplink', 'dsp', 'inc'),
	]
예제 #45
0
def configure(conf):
    conf.find_emscripten()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gxx_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.env.ARFLAGS = ["rcs"]
    conf.env.cshlib_PATTERN = "%s.js"
    conf.env.cxxshlib_PATTERN = "%s.js"
    conf.env.cstlib_PATTERN = "%s.a"
    conf.env.cxxstlib_PATTERN = "%s.a"
    conf.env.cprogram_PATTERN = "%s.html"
    conf.env.cxxprogram_PATTERN = "%s.html"
    conf.env.CXX_TGT_F = ["-c", "-o", ""]
    conf.env.CC_TGT_F = ["-c", "-o", ""]
    conf.env.CXXLNK_TGT_F = ["-o", ""]
    conf.env.CCLNK_TGT_F = ["-o", ""]
    conf.env.append_value("LINKFLAGS", ["-Wl,--enable-auto-import"])
예제 #46
0
def mkspec_emscripten_configure(conf, major, minor, minimum=False, force_debug=False):
    """
    :param force_debug: Always compile with debugging flags, if true
    """
    conf.set_mkspec_platform("emscripten")

    # The path to the emscripten compiler
    paths = conf.get_tool_option("emscripten_path")

    # The node.js binary can be "nodejs" or simply "node"
    conf.find_program(["nodejs", "node"], var="NODEJS")

    # Find the clang++ compiler
    cxx = conf.find_program(["em++"], path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env["CXX"] = cxx
    conf.env["CXX_NAME"] = os.path.basename(conf.env.get_flat("CXX"))

    conf.check_emscripten_version(cxx, major, minor, minimum)

    # Find clang as the C compiler
    cc = conf.find_program(["emcc"], path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env["CC"] = cc
    conf.env["CC_NAME"] = os.path.basename(conf.env.get_flat("CC"))

    conf.check_emscripten_version(cc, major, minor, minimum)

    # Find the archiver
    conf.find_program("emar", path_list=paths, var="AR")
    conf.env.ARFLAGS = ["rcs"]

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add the special flags required for emscripten
    conf.env.cshlib_PATTERN = "%s.js"
    conf.env.cxxshlib_PATTERN = "%s.js"
    conf.env.cstlib_PATTERN = "%s.a"
    conf.env.cxxstlib_PATTERN = "%s.a"
    conf.env.cprogram_PATTERN = conf.env.cxxprogram_PATTERN = "%s.js"
    conf.env.CXX_TGT_F = ["-c", "-o", ""]
    conf.env.CC_TGT_F = ["-c", "-o", ""]
    conf.env.CXXLNK_TGT_F = ["-o", ""]
    conf.env.CCLNK_TGT_F = ["-o", ""]
    conf.env.append_value("LINKFLAGS", ["-Wl,--enable-auto-import"])

    # Add our own cxx flags
    conf.env["CXXFLAGS"] += ["-Wextra", "-Wall", "-Wno-warn-absolute-paths"]

    if conf.has_tool_option("cxx_debug") or force_debug:
        conf.env["CXXFLAGS"] += ["-g"]
        conf.env["LINKFLAGS"] += ["-s"]

        # Don't add any optimization flags
        conf.env["MKSPEC_DISABLE_OPTIMIZATION"] = True

    cxxoptflags = ["-O2"]

    if not conf.env["MKSPEC_DISABLE_OPTIMIZATION"]:
        conf.env["CXXFLAGS"] += cxxoptflags

    if conf.has_tool_option("cxx_nodebug"):
        conf.env["DEFINES"] += ["NDEBUG"]

    conf.env["CXXFLAGS"] += ["-std=c++11"]

    if conf.has_tool_option("cxx_debug") or force_debug:
        conf.env["CFLAGS"] += ["-g"]
        # Don't add any optimization flags
        conf.env["MKSPEC_DISABLE_OPTIMIZATION"] = True

    coptflags = ["-O2"]

    if not conf.env["MKSPEC_DISABLE_OPTIMIZATION"]:
        conf.env["CFLAGS"] += coptflags

    # Add our own cc flags
    conf.env["CFLAGS"] += ["-Wextra", "-Wall", "-Wno-warn-absolute-paths"]

    if conf.has_tool_option("cxx_nodebug"):
        conf.env["DEFINES"] += ["NDEBUG"]
예제 #47
0
def mkspec_emscripten_configure(conf, major, minor, minimum=False,
                                force_debug=False):
    """
    :param force_debug: Always compile with debugging flags, if true
    """
    # The path to the emscripten compiler
    paths = conf.get_tool_option('emscripten_path')

    # The node.js binary can be "nodejs" or simply "node"
    conf.find_program(['nodejs', 'node'], var='NODEJS')

    # Find the clang++ compiler
    cxx = conf.find_program(['em++'], path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))

    conf.check_emscripten_version(cxx, major, minor, minimum)

    # Find clang as the C compiler
    cc = conf.find_program(['emcc'], path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))

    conf.check_emscripten_version(cc, major, minor, minimum)

    # Find the archiver
    conf.find_program('emar', path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    #conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    #conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.env['CXXFLAGS'] += ['-O2', '-Wextra', '-Wall']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CXXFLAGS'] += ['-g']
        conf.env['LINKFLAGS'] += ['-s']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']

    conf.env['CXXFLAGS'] += ['-std=c++0x']

    # Add our own cc flags
    conf.env['CFLAGS'] += ['-O2', '-Wextra', '-Wall']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CFLAGS'] += ['-g']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']

    conf.env['cprogram_PATTERN'] = conf.env['cxxprogram_PATTERN'] = '%s.js'

    conf.set_mkspec_platform('emscripten')
예제 #48
0
def mkspec_emscripten_configure(conf, major, minor, minimum=False,
                                force_debug=False):
    """
    :param force_debug: Always compile with debugging flags, if true
    """
    conf.set_mkspec_platform('emscripten')

    # The path to the emscripten compiler
    paths = conf.get_tool_option('emscripten_path')

    # The node.js binary can be "nodejs" or simply "node"
    conf.find_program(['nodejs', 'node'], var='NODEJS')

    # Find the clang++ compiler
    cxx = conf.find_program(['em++'], path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))

    conf.check_emscripten_version(cxx, major, minor, minimum)

    # Find clang as the C compiler
    cc = conf.find_program(['emcc'], path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))

    conf.check_emscripten_version(cc, major, minor, minimum)

    # Find the archiver
    conf.find_program('emar', path_list=paths, var='AR')
    conf.env.ARFLAGS = ['rcs']

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add the special flags required for emscripten
    conf.env.cshlib_PATTERN = '%s.js'
    conf.env.cxxshlib_PATTERN = '%s.js'
    conf.env.cstlib_PATTERN = '%s.a'
    conf.env.cxxstlib_PATTERN = '%s.a'
    conf.env.cprogram_PATTERN = conf.env.cxxprogram_PATTERN = '%s.js'
    conf.env.CXX_TGT_F = ['-c', '-o', '']
    conf.env.CC_TGT_F = ['-c', '-o', '']
    conf.env.CXXLNK_TGT_F = ['-o', '']
    conf.env.CCLNK_TGT_F = ['-o', '']
    conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])

    # Add our own cxx flags
    conf.env['CXXFLAGS'] += \
        ['-O2', '-Wextra', '-Wall', '-Wno-warn-absolute-paths']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CXXFLAGS'] += ['-g']
        conf.env['LINKFLAGS'] += ['-s']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']

    conf.env['CXXFLAGS'] += ['-std=c++11']

    # Add our own cc flags
    conf.env['CFLAGS'] += \
        ['-O2', '-Wextra', '-Wall', '-Wno-warn-absolute-paths']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CFLAGS'] += ['-g']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']
예제 #49
0
def mkspec_clang_configure(conf,
                           major,
                           minor,
                           prefix=None,
                           minimum=False,
                           force_debug=False):
    """
    :param major:       The major version number of the compiler, e.g. 3
    :param minor:       The minor version number of the compiler, e.g. 4
    :param prefix:      Prefix to compiler name, e.g. 'arm-linux-androideabi'
    :param minimum:     Only check for a minimum compiler version, if true
    :param force_debug: Always compile with debugging flags, if true
    """
    # Where to look
    paths = conf.mkspec_get_toolchain_paths()

    # If the user-defined CXX variable is set, then use that compiler
    if "CXX" in os.environ:
        cxx = waflib.Utils.to_list(os.environ["CXX"])
        conf.to_log("Using user defined environment variable CXX=%r" % cxx)
    else:
        # Find the clang++ compiler
        clangxx_names = conf.mkspec_get_compiler_binary_name(
            "clang++", major, minor, prefix)
        if minimum:
            clangxx_names = "clang++"
        cxx = conf.find_program(clangxx_names, path_list=paths)
        cxx = conf.cmd_to_list(cxx)

    conf.env["CXX"] = cxx
    conf.env["CXX_NAME"] = os.path.basename(conf.env.get_flat("CXX"))

    conf.mkspec_check_clang_version(cxx, major, minor, minimum)

    # If the user-defined CC variable is set, then use that compiler
    if "CC" in os.environ:
        cc = waflib.Utils.to_list(os.environ["CC"])
        conf.to_log("Using user defined environment variable CC=%r" % cc)
    else:
        # Find clang as the C compiler
        clang_names = conf.mkspec_get_compiler_binary_name(
            "clang", major, minor, prefix)
        if minimum:
            clang_names = "clang"
        cc = conf.find_program(clang_names, path_list=paths)
        cc = conf.cmd_to_list(cc)

    conf.env["CC"] = cc
    conf.env["CC_NAME"] = os.path.basename(conf.env.get_flat("CC"))

    conf.mkspec_check_clang_version(cc, major, minor, minimum)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var="AR")
    conf.env.ARFLAGS = "rcs"

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_clang_cxxflags(force_debug)
    # Add our own cc flags
    conf.mkspec_set_clang_ccflags(force_debug)
예제 #50
0
def mkspec_clang_configure(conf, major, minor, prefix=None, minimum=False,
                           force_debug=False):
    """
    :param major:       The major version number of the compiler, e.g. 3
    :param minor:       The minor version number of the compiler, e.g. 4
    :param prefix:      Prefix to compiler name, e.g. 'arm-linux-androideabi'
    :param minimum:     Only check for a minimum compiler version, if true
    :param force_debug: Always compile with debugging flags, if true
    """
    # Where to look
    paths = conf.mkspec_get_toolchain_paths()

    # Find the clang++ compiler
    clangxx_names = conf.mkspec_get_clangxx_binary_name(major, minor)
    if minimum:
        clangxx_names = 'clang++'
    cxx = conf.find_program(clangxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))

    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Find clang as the C compiler
    clang_names = conf.mkspec_get_clang_binary_name(major, minor)
    if minimum:
        clang_names = 'clang'
    cc = conf.find_program(clang_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))

    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_clang_cxxflags(force_debug)
    # Add our own cc flags
    conf.mkspec_set_clang_ccflags(force_debug)