2016-10-17 06:50:25 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2014-02-10 01:10:30 +00:00
|
|
|
Import('env')
|
|
|
|
|
|
|
|
javascript_files = [
|
|
|
|
"os_javascript.cpp",
|
|
|
|
"audio_driver_javascript.cpp",
|
2015-09-10 03:10:54 +00:00
|
|
|
"javascript_main.cpp",
|
2016-04-11 21:22:14 +00:00
|
|
|
"audio_server_javascript.cpp",
|
|
|
|
"javascript_eval.cpp"
|
2014-02-10 01:10:30 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
#obj = env.SharedObject('godot_javascript.cpp')
|
|
|
|
|
|
|
|
env_javascript = env.Clone()
|
|
|
|
if env['target'] == "profile":
|
|
|
|
env_javascript.Append(CPPFLAGS=['-DPROFILER_ENABLED'])
|
|
|
|
|
|
|
|
javascript_objects=[]
|
|
|
|
for x in javascript_files:
|
|
|
|
javascript_objects.append( env_javascript.Object( x ) )
|
|
|
|
|
2015-09-12 13:54:47 +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
|
|
|
|
|
|
|
|
#env_javascript.SharedLibrary("#platform/javascript/libgodot_javascript.so",[javascript_objects])
|
|
|
|
|
2014-10-07 04:31:49 +00:00
|
|
|
env.Program('#bin/godot',javascript_objects,PROGSUFFIX=env["PROGSUFFIX"]+".html")
|