SCsub 5.0 KB

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