From a705a89e4ad356f6ddb8bac7abcee4551d9c63ee Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Mon, 9 Sep 2024 14:05:39 -0300 Subject: [PATCH] default to built-in TLS without preventing other choices --- tutorials/http/file-upload-single-post/Makefile | 3 ++- tutorials/http/http-client/Makefile | 3 ++- tutorials/http/http-restful-server/Makefile | 3 ++- tutorials/http/http-server/Makefile | 2 +- tutorials/tcpip/pcap-driver/Makefile | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tutorials/http/file-upload-single-post/Makefile b/tutorials/http/file-upload-single-post/Makefile index 26d4af6a..cec10913 100644 --- a/tutorials/http/file-upload-single-post/Makefile +++ b/tutorials/http/file-upload-single-post/Makefile @@ -5,7 +5,8 @@ SOURCES = main.c mongoose.c # Source code files CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/documentation/#build-options -CFLAGS_MONGOOSE ?= -DMG_TLS=MG_TLS_BUILTIN +#CFLAGS_MONGOOSE += +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN 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/http/http-client/Makefile b/tutorials/http/http-client/Makefile index 05606d7a..edd0a154 100644 --- a/tutorials/http/http-client/Makefile +++ b/tutorials/http/http-client/Makefile @@ -6,7 +6,8 @@ SOURCES = main.c mongoose.c packed_fs.c # Source code files, packed_fs.c c CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/documentation/#build-options -CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_PACKED_FS=1 -DMG_TLS=MG_TLS_BUILTIN +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_PACKED_FS=1 +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN 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/http/http-restful-server/Makefile b/tutorials/http/http-restful-server/Makefile index 92c7fe18..1699c092 100644 --- a/tutorials/http/http-restful-server/Makefile +++ b/tutorials/http/http-restful-server/Makefile @@ -5,7 +5,8 @@ SOURCES = main.c mongoose.c # Source code files CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/documentation/#build-options -CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_TLS=MG_TLS_BUILTIN +CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN 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/http/http-server/Makefile b/tutorials/http/http-server/Makefile index b0a6b340..cd80e97b 100644 --- a/tutorials/http/http-server/Makefile +++ b/tutorials/http/http-server/Makefile @@ -8,7 +8,7 @@ CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/documentation/#build-options CFLAGS_MONGOOSE += -DMG_HTTP_DIRLIST_TIME_FMT="%Y/%m/%d %H:%M:%S" CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_IPV6=1 -DMG_ENABLE_SSI=1 -CFLAGS_MONGOOSE += -DMG_TLS=MG_TLS_BUILTIN +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN 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/tcpip/pcap-driver/Makefile b/tutorials/tcpip/pcap-driver/Makefile index 818c9ef5..4a121008 100644 --- a/tutorials/tcpip/pcap-driver/Makefile +++ b/tutorials/tcpip/pcap-driver/Makefile @@ -7,7 +7,8 @@ CFLAGS += -lpcap # Mongoose build options. See https://mongoose.ws/documentation/#build-options CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_TCPIP=1 -DMG_ENABLE_SOCKET=0 -CFLAGS_MONGOOSE += -DMG_ENABLE_TCPIP_DRIVER_INIT=0 -DMG_TLS=MG_TLS_BUILTIN +CFLAGS_MONGOOSE += -DMG_ENABLE_TCPIP_DRIVER_INIT=0 +CFLAGS_EXTRA ?= -DMG_TLS=MG_TLS_BUILTIN 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