BUILD.gn 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright (c) 2020 Nanjing Xiaoxiongpai Intelligent Technology Co., Ltd.
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS,
  10. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. # See the License for the specific language governing permissions and
  12. # limitations under the License.
  13. dtls_inc = [
  14. "mbedtls/mbedtls_port",
  15. "../../inc",
  16. "../../link_misc",
  17. "//kernel/liteos_m/components/cmsis/2.0",
  18. "//third_party/mbedtls/include/",
  19. ]
  20. dtls_src = [
  21. "dtls_al/dtls_al.c",
  22. "mbedtls/mbedtls_port/dtls_interface.c",
  23. "mbedtls/mbedtls_port/mbed_port.c",
  24. "mbedtls/mbedtls_port/timing_alt.c",
  25. ]
  26. dtls_def = [
  27. "WITH_DTLS",
  28. "MBEDTLS_AES_ROM_TABLES",
  29. "MBEDTLS_CONFIG_FILE=\"los_mbedtls_config_dtls.h\"",
  30. "CONFIG_DTLS_MBEDTLS_CERT",
  31. "CONFIG_DTLS_MBEDTLS_PSK",
  32. "CFG_MBEDTLS_MODE=PSK_CERT",
  33. ]
  34. dtls_cflags = [
  35. "-Wno-sign-compare",
  36. "-Wno-unused-parameter",
  37. ]
  38. static_library("dtls") {
  39. cflags = dtls_cflags
  40. defines = dtls_def
  41. sources = dtls_src
  42. include_dirs = dtls_inc
  43. }