From 4f1890e882860942549a137d8e60dfc62ea23b93 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 14 Dec 2022 18:18:41 +0100 Subject: [PATCH] BUILD: makefile: clean the wolfssl include and lib generation rules The default include paths for wolfssl didn't match the explicit pattern one. This was causing some confusion about what to look for, complexifying the rules and making /usr/local/include to be automatically included if a path was not set. Let's just proceed as we usually do, i.e. pass -I only when a path is specified, so that it works similarly to openssl. Let's also simplify the LDFLAG rule at the same time. This may be backported to 2.7 to ease testing of wolfssl. --- Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5f09c835d..e68f3f766 100644 --- a/Makefile +++ b/Makefile @@ -579,15 +579,8 @@ OPTIONS_OBJS += src/ssl_sock.o src/ssl_ckch.o src/ssl_sample.o src/ssl_crtlist. endif ifneq ($(USE_OPENSSL_WOLFSSL),) -ifneq ($(WOLFSSL_INC),) -OPTIONS_CFLAGS += -I$(WOLFSSL_INC) -I$(WOLFSSL_INC)/wolfssl -else -OPTIONS_CFLAGS += -I/usr/local/include/wolfssl -I/usr/local/include/wolfssl/openssl -I/usr/local/include -endif -ifneq ($(WOLFSSL_LIB),) -OPTIONS_LDFLAGS += -L$(WOLFSSL_LIB) -endif -OPTIONS_LDFLAGS += -lwolfssl +OPTIONS_CFLAGS += $(if $(WOLFSSL_INC),-I$(WOLFSSL_INC) -I$(WOLFSSL_INC)/wolfssl) +OPTIONS_LDFLAGS += $(if $(WOLFSSL_LIB),-L$(WOLFSSL_LIB)) -lwolfssl endif ifneq ($(USE_ENGINE),)