@@ -19,15 +19,20 @@ CPPFLAGS += -I$(SRC)/$(LIBSTB_DIR)/crypto/mbedtls/include
CPPFLAGS += -I$(SRC)/$(LIBSTB_DIR)/ibmtpm20tss/utils
CFLAGS += -DTPM_SKIBOOT
+ifneq ($(SSL_DIR),)
+HOSTCFLAGS += -I$(SSL_DIR)/include
+HOSTLDFLAGS += -L$(SSL_DIR)/lib -Wl,-rpath,$(SSL_DIR)/lib
+endif
+
$(LIBSTB): $(LIBSTB_OBJS:%=$(LIBSTB_DIR)/%) $(DRIVERS) $(SECVAR) $(CRYPTO) $(TSS2)
libstb/create-container: libstb/create-container.c libstb/container-utils.c
- $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) \
+ $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) \
-Wpadded -O0 -g -I$(SRC) -I$(SRC)/include -o $@ $^ -lssl -lcrypto,$<)
libstb/print-container: HOSTCFLAGS += -Wno-error=deprecated-declarations
libstb/print-container: libstb/print-container.c libstb/container-utils.c
- $(call Q, HOSTCC , $(HOSTCC) $(HOSTCFLAGS) \
+ $(call Q, HOSTCC , $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) \
-O0 -g -I$(SRC) -I$(SRC)/include -o $@ $^ -lssl -lcrypto, $<)
clean: container-utils-clean
Respect SSL_DIR if it is set, to use ssl headers and libs that are in a nonstandard location. When skiboot is built by op-build, the system ssl installation is being used instead of the buildroot one. This change will let us fix that. Signed-off-by: Reza Arbab <arbab@linux.ibm.com> --- libstb/Makefile.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)