Update Makefile to support separated OpenSSL3 compilation

This commit is contained in:
Grégory Soutadé 2022-06-08 11:39:05 +02:00
parent 4f288f4e24
commit 22880c71c6
2 changed files with 10 additions and 2 deletions

View File

@ -60,7 +60,7 @@ libgourou.so: $(OBJECTS) $(UPDFPARSERLIB)
$(CXX) obj/*.o $(LDFLAGS) -o $@ -shared $(CXX) obj/*.o $(LDFLAGS) -o $@ -shared
build_utils: build_utils:
make -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) make -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) OPENSSL3=$(OPENSSL3)
clean: clean:
rm -rf libgourou.a libgourou.so obj rm -rf libgourou.a libgourou.so obj

View File

@ -3,11 +3,18 @@ TARGETS=acsmdownloader adept_activate adept_remove adept_loan_mgt
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/ CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/
LDFLAGS=
ifneq ($(OPENSSL3),)
# OpenSSL 1.1.0 compat # OpenSSL 1.1.0 compat
CXXFLAGS += -DOPENSSL_API_COMPAT=0x10100000L CXXFLAGS += -DOPENSSL_API_COMPAT=0x10100000L
CXXFLAGS += -I/tmp/openssl3/usr/include/ -I/tmp/openssl3/usr/include/x86_64-linux-gnu
LDFLAGS += -L/tmp/openssl3/usr/lib/x86_64-linux-gnu -L/tmp/openssl3/usr/lib/x86_64-linux-gnu/ossl-modules
endif
STATIC_DEP= STATIC_DEP=
LDFLAGS=-L$(ROOT) -lcrypto -lzip -lz -lcurl LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl
ifneq ($(STATIC_UTILS),) ifneq ($(STATIC_UTILS),)
STATIC_DEP = $(ROOT)/libgourou.a STATIC_DEP = $(ROOT)/libgourou.a
@ -21,6 +28,7 @@ else
CXXFLAGS += -O2 CXXFLAGS += -O2
endif endif
COMMON_DEPS = drmprocessorclientimpl.cpp utils_common.cpp COMMON_DEPS = drmprocessorclientimpl.cpp utils_common.cpp
COMMON_OBJECTS = $(COMMON_DEPS:.cpp=.o) COMMON_OBJECTS = $(COMMON_DEPS:.cpp=.o)
COMMON_LIB = utils.a COMMON_LIB = utils.a