Esempio n. 1
0
def config(env,args):

    if env['PLATFORM'] == 'posix':
        if (platform.machine() == 'x86_64'):
            print ("Got a 64-bit processor, I can do a 64-bit build in theory...")
            for element in platform.architecture():
                if (element == '32bit'):
                    print ('32-bit Linux build')
                    env['MEMORYMODEL'] = '32bit'
                    import linux32
                    linux32.config(env, args)
                    break
                elif (element == '64bit'):
                    print ('64-bit Linux build')
                    env['MEMORYMODEL'] = '64bit'
                    import linux64
                    linux64.config(env, args)
                    break
                else:
                    print ('Memory model not specified, so I\'m building 32-bit...')
                    env['MEMORYMODEL'] = '32bit'
                    import linux32
                    linux32.config(env, args)
        else:
            print ('32-bit Linux Build.')
            env['MEMORYMODEL'] = '32bit'
            import linux32
            linux32.config(env, args)
    elif env['PLATFORM'] == 'darwin':
        print ('OS X Darwin is a 64-bit build.')
        env['MEMORYMODEL'] = '64bit'
        import darwin64
        darwin64.config(env, args)
    else:
        print ('ERROR! unrecognized platform.  Twonk.')
Esempio n. 2
0
def config(env, args):

    if env["PLATFORM"] == "posix":
        if platform.machine() == "x86_64":
            print "Got a 64-bit processor, I can do a 64-bit build in theory..."
            for element in platform.architecture():
                if element == "32bit":
                    print "32-bit Linux build"
                    env["MEMORYMODEL"] = "32bit"
                    import linux32

                    linux32.config(env, args)
                    break
                elif element == "64bit":
                    print "64-bit Linux build"
                    env["MEMORYMODEL"] = "64bit"
                    import linux64

                    linux64.config(env, args)
                    break
                else:
                    print "Memory model not specified, so I'm building 32-bit..."
                    env["MEMORYMODEL"] = "32bit"
                    import linux32

                    linux32.config(env, args)
        else:
            print "32-bit Linux Build."
            env["MEMORYMODEL"] = "32bit"
            import linux32

            linux32.config(env, args)
    # 	elif env['PLATFORM'] == 'win32':
    #      		if (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64')):
    #         		print "Got a 64-bit processor, I can do a 64-bit build in theory..."
    #         		if args.get('32bit', 0):
    #            			print '32-bit Windows build.'
    #            			#import win6432
    #            			#win6432.config(env, args)
    #         		elif args.get('64bit', 0):
    #            			print '64-bit Windows build.'
    #            			#import win64
    #            			#win64.config(env, args)
    #         		else:
    #            			print 'Memory model not specified, so I\'m building 32-bit.'
    #            			#import win6432
    #            			#win6432.config(env, args)
    #      		else:
    # 			print '32-bit Windows build.'
    #         		#import win32
    #         		#win32.config(env, args)
    elif env["PLATFORM"] == "darwin":
        print "OS X Darwin is a 64-bit build."
        env["MEMORYMODEL"] = "64bit"
        import darwin64

        darwin64.config(env, args)
    else:
        print "ERROR! unrecognized platform.  Twonk."
Esempio n. 3
0
def config(env, args):

    if env['PLATFORM'] == 'posix':
        if (platform.machine() == 'x86_64'):
            print "Got a 64-bit processor, I can do a 64-bit build in theory..."
            for element in platform.architecture():
                if (element == '32bit'):
                    print '32-bit Linux build'
                    env['MEMORYMODEL'] = '32bit'
                    import linux32
                    linux32.config(env, args)
                    break
                elif (element == '64bit'):
                    print '64-bit Linux build'
                    env['MEMORYMODEL'] = '64bit'
                    import linux64
                    linux64.config(env, args)
                    break
                else:
                    print 'Memory model not specified, so I\'m building 32-bit...'
                    env['MEMORYMODEL'] = '32bit'
                    import linux32
                    linux32.config(env, args)
        else:
            print '32-bit Linux Build.'
            env['MEMORYMODEL'] = '32bit'
            import linux32
            linux32.config(env, args)
#	elif env['PLATFORM'] == 'win32':
#      		if (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64')):
#         		print "Got a 64-bit processor, I can do a 64-bit build in theory..."
#         		if args.get('32bit', 0):
#            			print '32-bit Windows build.'
#            			#import win6432
#            			#win6432.config(env, args)
#         		elif args.get('64bit', 0):
#            			print '64-bit Windows build.'
#            			#import win64
#            			#win64.config(env, args)
#         		else:
#            			print 'Memory model not specified, so I\'m building 32-bit.'
#            			#import win6432
#            			#win6432.config(env, args)
#      		else:
#			print '32-bit Windows build.'
#         		#import win32
#         		#win32.config(env, args)
    elif env['PLATFORM'] == 'darwin':
        print 'OS X Darwin is a 64-bit build.'
        env['MEMORYMODEL'] = '64bit'
        import darwin64
        darwin64.config(env, args)
    else:
        print 'ERROR! unrecognized platform.  Twonk.'
Esempio n. 4
0
def config(env, args):

    standalone = args.get('standalone', 0)
    cppcheck = args.get('cppcheck', 0)
    srcdist = args.get('srcdist', 0)
    if int(standalone):
        env.Append(STANDALONE='1')
    if int(cppcheck):
        env.Append(CPPCHECK='1')
    if int(srcdist):
        env.Append(SRCDIST='1')

    env.Replace(LIBSUBDIR='lib')
    env.Replace(RPATH_ORIGIN_TAG='$$ORIGIN')

    if env['PLATFORM'] == 'posix':
        import linux32, linux64
        if (platform.machine() == 'x86_64'):
            print(
                "Got a 64-bit processor, I can do a 64-bit build in theory...")
            for element in platform.architecture():
                if (element == '32bit'):
                    print('32-bit Linux build')
                    env['MEMORYMODEL'] = '32bit'
                    linux32.config(env, args)
                    break
                elif (element == '64bit'):
                    print('64-bit Linux build')
                    env['MEMORYMODEL'] = '64bit'
                    linux64.config(env, args)
                    break
                else:
                    print(
                        'Memory model not specified, so I\'m building 32-bit...'
                    )
                    env['MEMORYMODEL'] = '32bit'
                    linux32.config(env, args)
        else:
            print('32-bit Linux Build.')
            env['MEMORYMODEL'] = '32bit'
            linux32.config(env, args)
    elif env['PLATFORM'] == 'darwin':
        import darwin64
        print('OS X Darwin is a 64-bit build.')
        env['MEMORYMODEL'] = '64bit'
        darwin64.config(env, args)
    else:
        print('ERROR! unrecognized platform.  Twonk.')
Esempio n. 5
0
def config(env,args):

    standalone = args.get('standalone',0)
    cppcheck = args.get('cppcheck',0)
    srcdist = args.get('srcdist',0)
    if int(standalone):
        env.Append(STANDALONE= '1')
    if int(cppcheck):
        env.Append(CPPCHECK = '1')
    if int(srcdist):
        env.Append(SRCDIST = '1')

    env.Replace(LIBSUBDIR = 'lib')
    env.Replace(RPATH_ORIGIN_TAG = '$$ORIGIN')

    if env['PLATFORM'] == 'posix':
        import linux32, linux64
        if (platform.machine() == 'x86_64'):
            print ("Got a 64-bit processor, I can do a 64-bit build in theory...")
            for element in platform.architecture():
                if (element == '32bit'):
                    print ('32-bit Linux build')
                    env['MEMORYMODEL'] = '32bit'
                    linux32.config(env, args)
                    break
                elif (element == '64bit'):
                    print ('64-bit Linux build')
                    env['MEMORYMODEL'] = '64bit'
                    linux64.config(env, args)
                    break
                else:
                    print ('Memory model not specified, so I\'m building 32-bit...')
                    env['MEMORYMODEL'] = '32bit'
                    linux32.config(env, args)
        else:
            print ('32-bit Linux Build.')
            env['MEMORYMODEL'] = '32bit'
            linux32.config(env, args)
    elif env['PLATFORM'] == 'darwin':
        import darwin64
        print ('OS X Darwin is a 64-bit build.')
        env['MEMORYMODEL'] = '64bit'
        darwin64.config(env, args)
    else:
        print ('ERROR! unrecognized platform.  Twonk.')