diff --git a/Sming/Libraries/OtaUpgradeMqtt/component.mk b/Sming/Libraries/OtaUpgradeMqtt/component.mk index 0bcdef89d0..546a50cf15 100644 --- a/Sming/Libraries/OtaUpgradeMqtt/component.mk +++ b/Sming/Libraries/OtaUpgradeMqtt/component.mk @@ -1,14 +1,16 @@ -COMPONENT_SRCDIRS := src/ -COMPONENT_INCDIRS := src/include +COMPONENT_SRCDIRS := +COMPONENT_SRCFILES := src/PayloadParser.cpp src/RbootPayloadParser.cpp +COMPONENT_INCDIRS := src/include # If enabled (set to 1) then we can use all sofisticated mechanisms to upgrade the firmware using the ``OtaUpgrade`` library. COMPONENT_VARS := ENABLE_OTA_ADVANCED ENABLE_OTA_ADVANCED ?= 0 +ifneq ($(ENABLE_OTA_ADVANCED),0) + COMPONENT_SRCFILES += src/AdvancedPayloadParser.cpp + COMPONENT_DEPENDS := OtaUpgrade +endif + # If enabled (set to 1) then we can use unlimited number of patch versions COMPONENT_VARS += ENABLE_OTA_VARINT_VERSION -ENABLE_OTA_VARINT_VERSION ?= 1 - -ifneq ($(ENABLE_OTA_ADVANCED),0) - COMPONENT_DEPENDS := OtaUpgrade -endif \ No newline at end of file +ENABLE_OTA_VARINT_VERSION ?= 1 \ No newline at end of file diff --git a/Sming/Libraries/OtaUpgradeMqtt/samples/Upgrade/component.mk b/Sming/Libraries/OtaUpgradeMqtt/samples/Upgrade/component.mk index 0d347a2601..806c2b46b6 100644 --- a/Sming/Libraries/OtaUpgradeMqtt/samples/Upgrade/component.mk +++ b/Sming/Libraries/OtaUpgradeMqtt/samples/Upgrade/component.mk @@ -23,7 +23,7 @@ ENABLE_CLIENT_CERTIFICATE ?= 0 CONFIG_VARS += MQTT_URL ifeq ($(MQTT_URL),) MQTT_URL := "mqtt://test.mosquitto.org:1883" - ifneq ($(ENABLE_SSL),) + ifdef ENABLE_SSL ifneq ($(ENABLE_CLIENT_CERTIFICATE),0) MQTT_URL := "mqtts://test.mosquitto.org:8884" else