From 1228e8f62016a607d43d66aa39c0dc9f1662986d Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 5 May 2026 13:38:17 -0300 Subject: [PATCH] unbreak tests, MG_TLS _must_ be defined in CFLAGS_EXTRA to allow being overwritten, as documented --- tutorials/device-dashboard/full/Makefile | 3 ++- tutorials/device-dashboard/minimal/Makefile | 3 ++- tutorials/mqtt/mqtt-client/Makefile | 3 ++- tutorials/mqtt/ota-over-mqtt/Makefile | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tutorials/device-dashboard/full/Makefile b/tutorials/device-dashboard/full/Makefile index 0f45ff84..ddfa86cc 100644 --- a/tutorials/device-dashboard/full/Makefile +++ b/tutorials/device-dashboard/full/Makefile @@ -3,8 +3,9 @@ PROG ?= example TOP ?= ../../.. SOURCES = main.c dashboard.c file_data.c $(TOP)/mongoose.c +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN CFLAGS ?= -W -Wall -Wextra -Werror -Wundef -Wshadow -O0 $(CFLAGS_EXTRA) -PFLAGS = -I$(TOP) -DMG_DATA_SIZE=64 -DMG_TLS=MG_TLS_BUILTIN -DMG_ENABLE_LINES=1 +PFLAGS = -I$(TOP) -DMG_DATA_SIZE=64 -DMG_ENABLE_LINES=1 AFLAGS ?= -fsanitize=signed-integer-overflow,address,undefined,alignment all: $(PROG) diff --git a/tutorials/device-dashboard/minimal/Makefile b/tutorials/device-dashboard/minimal/Makefile index 0f45ff84..ddfa86cc 100644 --- a/tutorials/device-dashboard/minimal/Makefile +++ b/tutorials/device-dashboard/minimal/Makefile @@ -3,8 +3,9 @@ PROG ?= example TOP ?= ../../.. SOURCES = main.c dashboard.c file_data.c $(TOP)/mongoose.c +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN CFLAGS ?= -W -Wall -Wextra -Werror -Wundef -Wshadow -O0 $(CFLAGS_EXTRA) -PFLAGS = -I$(TOP) -DMG_DATA_SIZE=64 -DMG_TLS=MG_TLS_BUILTIN -DMG_ENABLE_LINES=1 +PFLAGS = -I$(TOP) -DMG_DATA_SIZE=64 -DMG_ENABLE_LINES=1 AFLAGS ?= -fsanitize=signed-integer-overflow,address,undefined,alignment all: $(PROG) diff --git a/tutorials/mqtt/mqtt-client/Makefile b/tutorials/mqtt/mqtt-client/Makefile index fb051c5d..b868c383 100644 --- a/tutorials/mqtt/mqtt-client/Makefile +++ b/tutorials/mqtt/mqtt-client/Makefile @@ -5,7 +5,8 @@ SOURCES = main.c mongoose.c mongoose_mqtt.c packed_fs.c # Source code files CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/docs/getting-started/build-options/ -CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_TLS=MG_TLS_BUILTIN +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe PROG ?= example.exe # Use .exe suffix for the binary diff --git a/tutorials/mqtt/ota-over-mqtt/Makefile b/tutorials/mqtt/ota-over-mqtt/Makefile index 4d839321..b33b0975 100644 --- a/tutorials/mqtt/ota-over-mqtt/Makefile +++ b/tutorials/mqtt/ota-over-mqtt/Makefile @@ -5,8 +5,8 @@ SOURCES = main.c mongoose.c # Source code files, packed_fs.c contains ca.p CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/documentation/#build-options +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_BUILTIN #CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_OPENSSL -L/opt/homebrew/opt/openssl/lib -I/opt/homebrew/opt/openssl/include -lssl -lcrypto #CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_MBED -L/opt/homebrew/opt/mbedtls/lib -I/opt/homebrew/opt/mbedtls/include -lmbedtls -lmbedcrypto -lmbedx509