1# Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 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 14static_library("mqtt_led") { 15 # 设置编译选项,指定以下编译警告不当做错误处理 16 cflags = [ 17 "-Wno-sign-compare", # 有符号数和无符号数对比 18 "-Wno-unused-parameter", # 未使用的参数 19 ] 20 21 # Paho-MQTT相关宏定义 22 defines = [ 23 "MQTT_TASK", # 使用线程方式 24 "MQTTCLIENT_PLATFORM_HEADER=mqtt_ohos.h", # 指定OHOS适配接口文件 25 "CMSIS", # 使用CMSIS库 26 ] 27 28 # 指定要编译的程序文件 29 sources = [ 30 "hal_iot_gpio_ex.c", 31 "mqtt_led_demo.c", # 主程序文件 32 ] 33 34 # 设置头文件路径 35 include_dirs = [ 36 "//commonlibrary/utils_lite/include", 37 "//kernel/liteos_m/kal/cmsis", 38 "//base/iothardware/peripheral/interfaces/inner_api", 39 "//device/soc/hisilicon/ws63v100/sdk/drivers/chips/ws63/rom/drivers/chips/ws63/porting/pinctrl", 40 "//applications/sample/wifi-iot/app/paho_mqtt/MQTTPacket/src", # MQTTPacket模块接口 41 "//applications/sample/wifi-iot/app/paho_mqtt/MQTTClient-C/src", # MQTTClient-C模块接口 42 "//applications/sample/wifi-iot/app/paho_mqtt/MQTTClient-C/src/ohos", # MQTTClient-C模块OHOS适配接口 43 ] 44} 45