Fixes windows. Probably breaks linux. v8.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3415 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2018-01-18 03:12:25 +00:00
parent cf3fc1ce49
commit 906eeb6b94

View File

@ -23,19 +23,17 @@ Help(options.GenerateHelpText(env))
v8 = env['v8'] v8 = env['v8']
uv = env['uv'] uv = env['uv']
liblmdb = env['lmdb'] liblmdb = env['lmdb']
libs = []
env.Append(CPPPATH=[ env.Append(CPPPATH=[
os.path.join(v8, 'include'), os.path.join(v8, 'include'),
v8, v8,
os.path.join(uv, 'include'), os.path.join(uv, 'include'),
os.path.join(liblmdb, 'libraries', 'liblmdb'), os.path.join(liblmdb, 'libraries', 'liblmdb'),
]) ])
grouped_libs = []
objectSuffix = '.obj' if sys.platform == 'win32' else '.o' objectSuffix = '.obj' if sys.platform == 'win32' else '.o'
raspi = platform.machine() == 'armv7l' raspi = platform.machine() == 'armv7l'
if raspi: if raspi:
libs += [ env.Append(LIBS = [
os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_libplatform.a'), os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_libplatform.a'),
os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_base.a'), os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_base.a'),
os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_libbase.a'), os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_libbase.a'),
@ -43,19 +41,18 @@ if raspi:
os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_nosnapshot.a'), os.path.join(v8, 'out', 'arm.release', 'obj.target', 'src', 'libv8_nosnapshot.a'),
os.path.join(v8, 'out', 'arm.release', 'obj.target', 'third_party', 'icu', 'libicui18n.a'), os.path.join(v8, 'out', 'arm.release', 'obj.target', 'third_party', 'icu', 'libicui18n.a'),
os.path.join(v8, 'out', 'arm.release', 'obj.target', 'third_party', 'icu', 'libicuuc.a'), os.path.join(v8, 'out', 'arm.release', 'obj.target', 'third_party', 'icu', 'libicuuc.a'),
] ])
else: else:
grouped_libs += ['-Wl,--start-group'] env.Append(LIBS = [
grouped_libs += [env.Library('build/bin/v8_libplatform', Glob(os.path.join(v8, 'out', 'obj', 'v8_libplatform', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'v8_libplatform'),
grouped_libs += [env.Library('build/bin/v8_base', Glob(os.path.join(v8, 'out', 'obj', 'v8_base', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'v8_base_0'),
grouped_libs += [env.Library('build/bin/v8_builtins_setup', Glob(os.path.join(v8, 'out', 'obj', 'v8_builtins_setup', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'v8_base_1'),
grouped_libs += [env.Library('build/bin/v8_libbase', Glob(os.path.join(v8, 'out', 'obj', 'v8_libbase', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'v8_libbase'),
grouped_libs += [env.Library('build/bin/v8_builtins_generators', Glob(os.path.join(v8, 'out', 'obj', 'v8_builtins_generators', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'v8_libsampler'),
grouped_libs += [env.Library('build/bin/v8_libsampler', Glob(os.path.join(v8, 'out', 'obj', 'v8_libsampler', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'v8_snapshot'),
grouped_libs += [env.Library('build/bin/v8_snapshot', Glob(os.path.join(v8, 'out', 'obj', 'v8_snapshot', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'third_party', 'icu', 'icui18n'),
grouped_libs += [env.Library('build/bin/icui18n', Glob(os.path.join(v8, 'out', 'obj', 'third_party', 'icu', 'icui18n', '*' + objectSuffix)))] os.path.join(v8, 'out', 'obj', 'third_party', 'icu', 'icuuc'),
grouped_libs += [env.Library('build/bin/icuuc', Glob(os.path.join(v8, 'out', 'obj', 'third_party', 'icu', 'icuuc', '*' + objectSuffix)))] ])
grouped_libs += ['-Wl,--end-group']
if sys.platform == 'win32': if sys.platform == 'win32':
env.Append(LIBS=['libuv', 'advapi32', 'winmm', 'wsock32', 'ws2_32', 'psapi', 'iphlpapi', 'userenv', 'user32', 'dbghelp', 'shlwapi']) env.Append(LIBS=['libuv', 'advapi32', 'winmm', 'wsock32', 'ws2_32', 'psapi', 'iphlpapi', 'userenv', 'user32', 'dbghelp', 'shlwapi'])
@ -102,10 +99,7 @@ if sys.platform == 'darwin':
env.Append(FRAMEWORKS=['CoreFoundation', 'Security']) env.Append(FRAMEWORKS=['CoreFoundation', 'Security'])
elif sys.platform == 'win32': elif sys.platform == 'win32':
env.Append(LIBS=['Crypt32']) env.Append(LIBS=['Crypt32'])
if grouped_libs: env.Program('tildefriends', source)
env.Append(GROUPED_LIBS = grouped_libs)
env.Append(LINKCOM = ' $GROUPED_LIBS')
env.Program('tildefriends', source + libs)
def listAllFiles(root): def listAllFiles(root):
for root, dirs, files in os.walk(root): for root, dirs, files in os.walk(root):