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 5f09c83..e68f3f7 100644
--- a/Makefile
+++ b/Makefile
@@ -579,15 +579,8 @@
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),)