2016-10-17 14:50:25 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2014-02-10 09:10:30 +08:00
|
|
|
Import('env')
|
|
|
|
|
2018-09-28 19:29:52 +08:00
|
|
|
import os
|
|
|
|
|
2014-02-10 09:10:30 +08:00
|
|
|
iphone_lib = [
|
2017-10-02 23:01:43 +08:00
|
|
|
'godot_iphone.cpp',
|
2016-10-31 01:44:57 +08:00
|
|
|
'os_iphone.cpp',
|
|
|
|
'sem_iphone.cpp',
|
|
|
|
'gl_view.mm',
|
|
|
|
'main.m',
|
|
|
|
'app_delegate.mm',
|
|
|
|
'view_controller.mm',
|
|
|
|
'game_center.mm',
|
|
|
|
'in_app_store.mm',
|
|
|
|
'icloud.mm',
|
|
|
|
'ios.mm',
|
2014-02-10 09:10:30 +08:00
|
|
|
]
|
|
|
|
|
2016-11-01 07:24:30 +08:00
|
|
|
env_ios = env.Clone()
|
2017-11-29 04:27:57 +08:00
|
|
|
ios_lib = env_ios.add_library('iphone', iphone_lib)
|
2014-02-10 09:10:30 +08:00
|
|
|
|
2017-10-02 23:01:43 +08:00
|
|
|
def combine_libs(target=None, source=None, env=None):
|
|
|
|
lib_path = target[0].srcnode().abspath
|
2018-12-22 19:31:43 +08:00
|
|
|
if "osxcross" in env:
|
2018-03-29 00:45:54 +08:00
|
|
|
libtool = '$IPHONEPATH/usr/bin/${ios_triple}libtool'
|
|
|
|
else:
|
|
|
|
libtool = "$IPHONEPATH/usr/bin/libtool"
|
|
|
|
env.Execute(libtool + ' -static -o "' + lib_path + '" ' + ' '.join([('"' + lib.srcnode().abspath + '"') for lib in source]))
|
2014-02-10 09:10:30 +08:00
|
|
|
|
2017-10-02 23:01:43 +08:00
|
|
|
combine_command = env_ios.Command('#bin/libgodot' + env_ios['LIBSUFFIX'], [ios_lib] + env_ios['LIBS'], combine_libs)
|