Skip to content

Commit

Permalink
Don't compile AdvancedPayloadParser if not requested.
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Mar 24, 2021
1 parent d98b199 commit 046faa7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions Sming/Libraries/OtaUpgradeMqtt/component.mk
Original file line number Diff line number Diff line change
@@ -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
ENABLE_OTA_VARINT_VERSION ?= 1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 046faa7

Please sign in to comment.