SCsub 705 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. import os
  3. Import('env')
  4. def make_debug(target, source, env):
  5. os.system('objcopy --only-keep-debug {0} {0}.debugsymbols'.format(target[0]))
  6. os.system('strip --strip-debug --strip-unneeded {0}'.format(target[0]))
  7. os.system('objcopy --add-gnu-debuglink={0}.debugsymbols {0}'.format(target[0]))
  8. common_x11 = [
  9. "context_gl_x11.cpp",
  10. "crash_handler_x11.cpp",
  11. "os_x11.cpp",
  12. "key_mapping_x11.cpp",
  13. "joypad_linux.cpp",
  14. "power_x11.cpp",
  15. ]
  16. prog = env.add_program('#bin/godot', ['godot_x11.cpp'] + common_x11)
  17. if (env["debug_symbols"] == "full" or env["debug_symbols"] == "yes") and env["separate_debug_symbols"]:
  18. env.AddPostAction(prog, make_debug)