SCsub 4.9 KB

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