BUILD.gn 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright (c) 2020  Jinan Bosai Network 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. mqtt_paho_inc = [
  14. "paho_mqtt/paho/MQTTClient-C/src",
  15. "paho_mqtt/paho/MQTTPacket/src",
  16. "paho_mqtt/port",
  17. "../../inc",
  18. "//kernel/liteos_m/components/cmsis/2.0",
  19. "//vendor/hisi/hi3861/hi3861/third_party/lwip_sack/include/",
  20. ]
  21. mqtt_paho_src = [
  22. "mqtt_al/mqtt_al.c",
  23. "paho_mqtt/port/paho_mqtt_port.c",
  24. "paho_mqtt/port/paho_osdepends.c",
  25. "paho_mqtt/paho/MQTTClient-C/src/MQTTClient.c",
  26. "paho_mqtt/paho/MQTTPacket/src/MQTTConnectClient.c",
  27. "paho_mqtt/paho/MQTTPacket/src/MQTTConnectServer.c",
  28. "paho_mqtt/paho/MQTTPacket/src/MQTTDeserializePublish.c",
  29. "paho_mqtt/paho/MQTTPacket/src/MQTTFormat.c",
  30. "paho_mqtt/paho/MQTTPacket/src/MQTTPacket.c",
  31. "paho_mqtt/paho/MQTTPacket/src/MQTTSerializePublish.c",
  32. "paho_mqtt/paho/MQTTPacket/src/MQTTSubscribeClient.c",
  33. "paho_mqtt/paho/MQTTPacket/src/MQTTSubscribeServer.c",
  34. "paho_mqtt/paho/MQTTPacket/src/MQTTUnsubscribeClient.c",
  35. "paho_mqtt/paho/MQTTPacket/src/MQTTUnsubscribeServer.c",
  36. ]
  37. mqtt_paho_defs = [
  38. "MQTTCLIENT_PLATFORM_HEADER=paho_osdepends.h",
  39. ]
  40. mqtt_cflags = [
  41. "-Wno-sign-compare",
  42. "-Wno-unused-parameter",
  43. "-Wno-unused-function",
  44. ]
  45. static_library("mqtt") {
  46. cflags = mqtt_cflags
  47. defines = mqtt_paho_defs
  48. sources = mqtt_paho_src
  49. include_dirs = mqtt_paho_inc
  50. }