2016-10-17 06:50:25 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
Import('env')
|
|
|
|
|
|
|
|
javascript_files = [
|
2016-11-02 21:26:55 +00:00
|
|
|
"os_javascript.cpp",
|
|
|
|
"audio_driver_javascript.cpp",
|
|
|
|
"javascript_main.cpp",
|
|
|
|
"audio_server_javascript.cpp"
|
2014-02-10 01:10:30 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
#obj = env.SharedObject('godot_javascript.cpp')
|
|
|
|
|
|
|
|
env_javascript = env.Clone()
|
|
|
|
if env['target'] == "profile":
|
2016-11-02 21:26:55 +00:00
|
|
|
env_javascript.Append(CPPFLAGS=['-DPROFILER_ENABLED'])
|
2014-02-10 01:10:30 +00:00
|
|
|
|
2016-11-02 21:28:28 +00:00
|
|
|
javascript_objects = []
|
2014-02-10 01:10:30 +00:00
|
|
|
for x in javascript_files:
|
2016-11-02 21:28:28 +00:00
|
|
|
javascript_objects.append(env_javascript.Object(x))
|
2014-02-10 01:10:30 +00:00
|
|
|
|
2016-11-02 21:28:28 +00:00
|
|
|
env.Append(LINKFLAGS=["-s", "EXPORTED_FUNCTIONS=\"['_main','_audio_server_mix_function','_main_after_fs_sync']\""])
|
2015-09-10 03:10:54 +00:00
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
prog = None
|
|
|
|
|
2017-11-28 20:14:24 +00:00
|
|
|
# env_javascript.add_shared_library("#platform/javascript/libgodot_javascript.so",[javascript_objects])
|
2014-02-10 01:10:30 +00:00
|
|
|
|
2017-11-28 20:14:24 +00:00
|
|
|
prog = env.add_program('#bin/godot', javascript_objects, PROGSUFFIX=env["PROGSUFFIX"] + ".html")
|