2019-08-01 10:30:53 +08:00
|
|
|
include make.settings
|
|
|
|
include tools/scripts/default_settings.mk
|
|
|
|
include tools/scripts/parse_make_settings.mk
|
|
|
|
|
|
|
|
# IoT SDK sources files defination
|
|
|
|
COMP_LIB := libiot_sdk.a
|
|
|
|
COMP_LIB_COMPONENTS := \
|
|
|
|
src/utils \
|
|
|
|
src/certs \
|
|
|
|
src/sdk-impl \
|
|
|
|
|
|
|
|
$(call CompLib_Map, MQTT_COMM_ENABLED, src/mqtt/src)
|
|
|
|
|
|
|
|
$(call CompLib_Map, DEVICE_SHADOW_ENABLED, src/shadow/src)
|
|
|
|
|
|
|
|
$(call CompLib_Map, OTA_ENABLED, src/ota/src)
|
|
|
|
|
|
|
|
$(call CompLib_Map, DEVICE_MODEL_ENABLED, src/dev_model/src)
|
|
|
|
|
2019-11-22 17:38:06 +08:00
|
|
|
$(call CompLib_Map, FILE_UPLOAD_ENABLED, src/upload_file)
|
2019-08-29 17:31:02 +08:00
|
|
|
|
2020-02-18 19:44:27 +08:00
|
|
|
$(call CompLib_Map, SUPPORT_AT_CMD, src/at/src src/at/class/$(PLATFORM_MODULE) platform/module)
|
2019-08-01 10:30:53 +08:00
|
|
|
IOTSDK_SRC_FILES := \
|
|
|
|
|
|
|
|
$(foreach v, \
|
|
|
|
$(COMP_LIB_COMPONENTS), \
|
|
|
|
$(eval \
|
|
|
|
export IOTSDK_SRC_FILES += \
|
|
|
|
$(wildcard $(TOP_DIR)/$(v)/*.c) \
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
|
|
|
# IoT Platform sources files defination
|
|
|
|
PLATFORM_LIB := libiot_platform.a
|
|
|
|
PLATFORM_LIB_COMPONENTS := \
|
|
|
|
platform/os/$(PLATFORM_OS) \
|
|
|
|
|
|
|
|
ifneq (,$(filter -DSUPPORT_TLS,$(CFLAGS)))
|
|
|
|
PLATFORM_LIB_COMPONENTS += \
|
|
|
|
platform/ssl/$(PLATFORM_SSL)
|
|
|
|
endif
|
2020-02-18 19:44:27 +08:00
|
|
|
|
2019-08-01 10:30:53 +08:00
|
|
|
IOTPLATFORM_SRC_FILES := \
|
|
|
|
|
|
|
|
$(foreach v, \
|
|
|
|
$(PLATFORM_LIB_COMPONENTS), \
|
|
|
|
$(eval \
|
|
|
|
export IOTPLATFORM_SRC_FILES += \
|
|
|
|
$(wildcard $(TOP_DIR)/$(v)/*.c) \
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
|
|
|
# IoT Include files defination
|
|
|
|
COMP_LIB_COMPONENTS_INCLUDES := \
|
|
|
|
src/utils \
|
|
|
|
src/certs \
|
|
|
|
src/sdk-impl \
|
|
|
|
platform/os/$(PLATFORM_OS)
|
|
|
|
|
|
|
|
$(call CompInc_Map, MQTT_COMM_ENABLED, \
|
|
|
|
src/mqtt/include \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(call CompInc_Map, DEVICE_SHADOW_ENABLED, \
|
|
|
|
src/shadow/include \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(call CompInc_Map, OTA_ENABLED, \
|
|
|
|
src/ota/include \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(call CompInc_Map, DEVICE_MODEL_ENABLED, \
|
|
|
|
src/dev_model/include \
|
|
|
|
)
|
|
|
|
|
|
|
|
$(call CompInc_Map, SUPPORT_TLS, \
|
|
|
|
external_libs/mbedtls/include \
|
|
|
|
)
|
|
|
|
|
2020-02-18 19:44:27 +08:00
|
|
|
$(call CompInc_Map, SUPPORT_AT_CMD, \
|
|
|
|
src/at/include \
|
|
|
|
)
|
|
|
|
|
2019-08-01 10:30:53 +08:00
|
|
|
IOTSDK_INCLUDE_FILES := \
|
|
|
|
|
|
|
|
$(foreach v, \
|
|
|
|
$(COMP_LIB_COMPONENTS_INCLUDES), \
|
|
|
|
$(eval \
|
|
|
|
export IOTSDK_INCLUDE_FILES += \
|
|
|
|
-I$(TOP_DIR)/$(v) \
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
|
|
|
CFLAGS += -Werror -Wall -Wno-error=sign-compare -Wno-error=format -Os ${IOTSDK_INCLUDE_FILES} -pthread
|
|
|
|
|
|
|
|
include tools/scripts/rules.mk
|
|
|
|
include samples/samples.mk
|
|
|
|
|
|
|
|
ifneq (,$(filter -DSDK_TESTS_ENABLED, $(CFLAGS)))
|
|
|
|
include tests/unit_test/unit_test.mk
|
|
|
|
endif
|