]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: clean the wolfssl include and lib generation rules
authorWilly Tarreau <w@1wt.eu>
Wed, 14 Dec 2022 17:18:41 +0000 (18:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Dec 2022 15:53:35 +0000 (16:53 +0100)
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

index 5f09c835d733c93a12769fc9f367d847d9110bdc..e68f3f766c4fe9579c5e80d2670823b914de6596 100644 (file)
--- 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),)