BugID:17646749:[example/iot.mk] fix build error when TLS/iTLS neither on
@@ -13,6 +13,11 @@ ifneq (,$(filter -D_PLATFORM_IS_WINDOWS_,$(CFLAGS)))
LDFLAGS += -lws2_32
CFLAGS := $(filter-out -DCOAP_COMM_ENABLED,$(CFLAGS))
endif
+ifneq (,$(filter -DSUPPORT_ITLS,$(CFLAGS)))
+LDFLAGS += -litls
+else
+LDFLAGS += -liot_tls
+endif
SRCS_mqtt-example-rrpc := app_entry.c mqtt/mqtt_example_rrpc.c
SRCS_mqtt-example := app_entry.c mqtt/mqtt_example.c
@@ -41,11 +46,6 @@ $(call Append_Conditional, TARGET, mqtt-example-rrpc, MQTT_COMM_ENABLE
$(call Append_Conditional, TARGET, mqtt-example, MQTT_COMM_ENABLED)
$(call Append_Conditional, TARGET, mqtt-example-multithread, MQTT_COMM_ENABLED)
-$(call Append_Conditional, LDFLAGS, \
- -liot_tls, \
-SUPPORT_TLS, \
-SUPPORT_ITLS)
-
$(call Append_Conditional, LDFLAGS, \
-litls \
-lid2client \
