29 lines
792 B
Python
29 lines
792 B
Python
#!/usr/bin/env python
|
|
|
|
Import('env')
|
|
|
|
javascript_files = [
|
|
"os_javascript.cpp",
|
|
"audio_driver_javascript.cpp",
|
|
"javascript_main.cpp",
|
|
"audio_server_javascript.cpp"
|
|
]
|
|
|
|
#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))
|
|
|
|
env.Append(LINKFLAGS=["-s", "EXPORTED_FUNCTIONS=\"['_main','_audio_server_mix_function','_main_after_fs_sync']\""])
|
|
|
|
prog = None
|
|
|
|
# env_javascript.add_shared_library("#platform/javascript/libgodot_javascript.so",[javascript_objects])
|
|
|
|
prog = env.add_program('#bin/godot', javascript_objects, PROGSUFFIX=env["PROGSUFFIX"] + ".html")
|