forked from JeffersonLab/analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.py
59 lines (56 loc) · 2.14 KB
/
configure.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import platform
import os
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.'
#end configure.py