From e26042e2e79b0e37a7943fefaf2a3514b588287d Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Fri, 17 Oct 2025 11:29:26 +0200 Subject: [PATCH] Allowing switching HTTPS builds on/off using the HTTPS Makefile parameter --- Makefile | 12 ++++++++---- misc/TODO.md | 4 +--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 63b7808..83b9936 100644 --- a/Makefile +++ b/Makefile @@ -21,10 +21,14 @@ else LFLAGS += -lssl -lcrypto endif -HTTPS = 1 -ifeq ($(HTTPS),1) - CFLAGS += -DHTTPS_ENABLED - LFLAGS += -lssl -lcrypto +HTTPS ?= 0 +ifneq ($(HTTPS),0) + ifeq ($(OS),Windows_NT) + $(error "HTTPS not supported on Windows") + else + CFLAGS += -DHTTPS_ENABLED + LFLAGS += -lssl -lcrypto + endif endif # Installation directories diff --git a/misc/TODO.md b/misc/TODO.md index 8eb3b9e..ad65462 100644 --- a/misc/TODO.md +++ b/misc/TODO.md @@ -5,7 +5,5 @@ handle 3xx client redirections add discussion on string management add discussion on error management check that virtual hosts over HTTPS work - add timers -add debug and release builds -make it easy to switch on and off HTTPS when building +add debug and release builds \ No newline at end of file