From: Willy Tarreau Date: Wed, 14 Dec 2022 17:18:41 +0000 (+0100) Subject: BUILD: makefile: clean the wolfssl include and lib generation rules X-Git-Tag: v2.8-dev1~56 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f1890e882860942549a137d8e60dfc62ea23b93;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/Makefile b/Makefile index 5f09c835d7..e68f3f766c 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),)