SCsub 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_webp = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. if env["builtin_libwebp"]:
  8. thirdparty_dir = "#thirdparty/libwebp/"
  9. thirdparty_sources = [
  10. "dec/alpha_dec.c",
  11. "dec/buffer_dec.c",
  12. "dec/frame_dec.c",
  13. "dec/idec_dec.c",
  14. "dec/io_dec.c",
  15. "dec/quant_dec.c",
  16. "dec/tree_dec.c",
  17. "dec/vp8_dec.c",
  18. "dec/vp8l_dec.c",
  19. "dec/webp_dec.c",
  20. "demux/anim_decode.c",
  21. "demux/demux.c",
  22. "dsp/alpha_processing.c",
  23. "dsp/alpha_processing_mips_dsp_r2.c",
  24. "dsp/alpha_processing_neon.c",
  25. "dsp/alpha_processing_sse2.c",
  26. "dsp/alpha_processing_sse41.c",
  27. "dsp/cost.c",
  28. "dsp/cost_mips32.c",
  29. "dsp/cost_mips_dsp_r2.c",
  30. "dsp/cost_neon.c",
  31. "dsp/cost_sse2.c",
  32. "dsp/cpu.c",
  33. "dsp/dec.c",
  34. "dsp/dec_clip_tables.c",
  35. "dsp/dec_mips32.c",
  36. "dsp/dec_mips_dsp_r2.c",
  37. "dsp/dec_msa.c",
  38. "dsp/dec_neon.c",
  39. "dsp/dec_sse2.c",
  40. "dsp/dec_sse41.c",
  41. "dsp/enc.c",
  42. "dsp/enc_mips32.c",
  43. "dsp/enc_mips_dsp_r2.c",
  44. "dsp/enc_msa.c",
  45. "dsp/enc_neon.c",
  46. "dsp/enc_sse2.c",
  47. "dsp/enc_sse41.c",
  48. "dsp/filters.c",
  49. "dsp/filters_mips_dsp_r2.c",
  50. "dsp/filters_msa.c",
  51. "dsp/filters_neon.c",
  52. "dsp/filters_sse2.c",
  53. "dsp/lossless.c",
  54. "dsp/lossless_enc.c",
  55. "dsp/lossless_enc_mips32.c",
  56. "dsp/lossless_enc_mips_dsp_r2.c",
  57. "dsp/lossless_enc_msa.c",
  58. "dsp/lossless_enc_neon.c",
  59. "dsp/lossless_enc_sse2.c",
  60. "dsp/lossless_enc_sse41.c",
  61. "dsp/lossless_mips_dsp_r2.c",
  62. "dsp/lossless_msa.c",
  63. "dsp/lossless_neon.c",
  64. "dsp/lossless_sse2.c",
  65. "dsp/rescaler.c",
  66. "dsp/rescaler_mips32.c",
  67. "dsp/rescaler_mips_dsp_r2.c",
  68. "dsp/rescaler_msa.c",
  69. "dsp/rescaler_neon.c",
  70. "dsp/rescaler_sse2.c",
  71. "dsp/ssim.c",
  72. "dsp/ssim_sse2.c",
  73. "dsp/upsampling.c",
  74. "dsp/upsampling_mips_dsp_r2.c",
  75. "dsp/upsampling_msa.c",
  76. "dsp/upsampling_neon.c",
  77. "dsp/upsampling_sse2.c",
  78. "dsp/upsampling_sse41.c",
  79. "dsp/yuv.c",
  80. "dsp/yuv_mips32.c",
  81. "dsp/yuv_mips_dsp_r2.c",
  82. "dsp/yuv_neon.c",
  83. "dsp/yuv_sse2.c",
  84. "dsp/yuv_sse41.c",
  85. "enc/alpha_enc.c",
  86. "enc/analysis_enc.c",
  87. "enc/backward_references_cost_enc.c",
  88. "enc/backward_references_enc.c",
  89. "enc/config_enc.c",
  90. "enc/cost_enc.c",
  91. "enc/filter_enc.c",
  92. "enc/frame_enc.c",
  93. "enc/histogram_enc.c",
  94. "enc/iterator_enc.c",
  95. "enc/near_lossless_enc.c",
  96. "enc/picture_csp_enc.c",
  97. "enc/picture_enc.c",
  98. "enc/picture_psnr_enc.c",
  99. "enc/picture_rescale_enc.c",
  100. "enc/picture_tools_enc.c",
  101. "enc/predictor_enc.c",
  102. "enc/quant_enc.c",
  103. "enc/syntax_enc.c",
  104. "enc/token_enc.c",
  105. "enc/tree_enc.c",
  106. "enc/vp8l_enc.c",
  107. "enc/webp_enc.c",
  108. "mux/anim_encode.c",
  109. "mux/muxedit.c",
  110. "mux/muxinternal.c",
  111. "mux/muxread.c",
  112. "utils/bit_reader_utils.c",
  113. "utils/bit_writer_utils.c",
  114. "utils/color_cache_utils.c",
  115. "utils/filters_utils.c",
  116. "utils/huffman_encode_utils.c",
  117. "utils/huffman_utils.c",
  118. "utils/quant_levels_dec_utils.c",
  119. "utils/quant_levels_utils.c",
  120. "utils/random_utils.c",
  121. "utils/rescaler_utils.c",
  122. "utils/thread_utils.c",
  123. "utils/utils.c",
  124. ]
  125. thirdparty_sources = [thirdparty_dir + "src/" + file for file in thirdparty_sources]
  126. env_webp.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "src/"])
  127. env_thirdparty = env_webp.Clone()
  128. env_thirdparty.disable_warnings()
  129. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  130. env.modules_sources += thirdparty_obj
  131. # Godot source files
  132. module_obj = []
  133. env_webp.add_source_files(module_obj, "*.cpp")
  134. env.modules_sources += module_obj
  135. # Needed to force rebuilding the module files when the thirdparty library is updated.
  136. env.Depends(module_obj, thirdparty_obj)