SCsub 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. env_mbed_tls = env_modules.Clone()
  5. # Thirdparty source files
  6. thirdparty_obj = []
  7. if env["builtin_mbedtls"]:
  8. thirdparty_sources = [
  9. "aes.c",
  10. "aesni.c",
  11. "arc4.c",
  12. "aria.c",
  13. "asn1parse.c",
  14. "asn1write.c",
  15. "base64.c",
  16. "bignum.c",
  17. "blowfish.c",
  18. "camellia.c",
  19. "ccm.c",
  20. "certs.c",
  21. "chacha20.c",
  22. "chachapoly.c",
  23. "cipher.c",
  24. "cipher_wrap.c",
  25. "cmac.c",
  26. "ctr_drbg.c",
  27. "constant_time.c",
  28. "debug.c",
  29. "des.c",
  30. "dhm.c",
  31. "ecdh.c",
  32. "ecdsa.c",
  33. "ecjpake.c",
  34. "ecp.c",
  35. "ecp_curves.c",
  36. "entropy.c",
  37. "entropy_poll.c",
  38. "error.c",
  39. "gcm.c",
  40. "havege.c",
  41. "hkdf.c",
  42. "hmac_drbg.c",
  43. "md2.c",
  44. "md4.c",
  45. "md5.c",
  46. "md.c",
  47. "memory_buffer_alloc.c",
  48. "mps_reader.c",
  49. "mps_trace.c",
  50. "net_sockets.c",
  51. "nist_kw.c",
  52. "oid.c",
  53. "padlock.c",
  54. "pem.c",
  55. "pk.c",
  56. "pkcs11.c",
  57. "pkcs12.c",
  58. "pkcs5.c",
  59. "pkparse.c",
  60. "pk_wrap.c",
  61. "pkwrite.c",
  62. "platform.c",
  63. "platform_util.c",
  64. "poly1305.c",
  65. "ripemd160.c",
  66. "rsa.c",
  67. "rsa_internal.c",
  68. "sha1.c",
  69. "sha256.c",
  70. "sha512.c",
  71. "ssl_cache.c",
  72. "ssl_ciphersuites.c",
  73. "ssl_cli.c",
  74. "ssl_cookie.c",
  75. "ssl_msg.c",
  76. "ssl_srv.c",
  77. "ssl_ticket.c",
  78. "ssl_tls.c",
  79. "ssl_tls13_keys.c",
  80. "threading.c",
  81. "timing.c",
  82. "version.c",
  83. "version_features.c",
  84. "x509.c",
  85. "x509_create.c",
  86. "x509_crl.c",
  87. "x509_crt.c",
  88. "x509_csr.c",
  89. "x509write_crt.c",
  90. "x509write_csr.c",
  91. "xtea.c",
  92. ]
  93. thirdparty_dir = "#thirdparty/mbedtls/library/"
  94. thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
  95. env_mbed_tls.Prepend(CPPPATH=["#thirdparty/mbedtls/include/"])
  96. env_thirdparty = env_mbed_tls.Clone()
  97. env_thirdparty.disable_warnings()
  98. env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
  99. env.modules_sources += thirdparty_obj
  100. # Godot source files
  101. module_obj = []
  102. env_mbed_tls.add_source_files(module_obj, "*.cpp")
  103. env.modules_sources += module_obj
  104. # Needed to force rebuilding the module files when the thirdparty library is updated.
  105. env.Depends(module_obj, thirdparty_obj)