From 7addc37da49c01ff4d0dea1b4feb4d0503f932ee Mon Sep 17 00:00:00 2001 From: Gernot Kranz Date: Wed, 4 Jan 2023 16:18:55 +0100 Subject: [PATCH] extend Makefiles --- Makefile.conf | 8 ++++++-- local.conf.example | 2 ++ src/Makefile | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile.conf b/Makefile.conf index 4223512..745fc4f 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -25,6 +25,9 @@ PREFIX?=$(HOME) SYS_PREFIX=/usr CXXFLAGS+=-std=c++17 -fPIC +OPENSSL_INCLUDE=/opt/local/include +OPENSSL_LIB=/opt/local/libexec/openssl3/lib + # Overrides -include $(HERE)local.conf @@ -32,8 +35,9 @@ CXXFLAGS+=-std=c++17 -fPIC CXXFLAGS+=-I$(PREFIX)/include LDFLAGS+=-L$(PREFIX)/lib -CXXFLAGS+=-I$(SYS_PREFIX)/include -LDFLAGS+=-L$(SYS_PREFIX)/lib +CXXFLAGS+=-I$(SYS_PREFIX)/include -I$(OPENSSL_INCLUDE) +LDFLAGS+=-L$(SYS_PREFIX)/lib -L$(OPENSSL_LIB) +# Probably needs a way to add this automatically? ifneq (,$(findstring g++,$(CXX))) CXXFLAGS+=-fdiagnostics-color=always diff --git a/local.conf.example b/local.conf.example index 6c79c23..ae814d8 100644 --- a/local.conf.example +++ b/local.conf.example @@ -8,3 +8,5 @@ # YML2_PATH=$(HOME)/yml2 # YML2_PROC=$(YML2_PATH)/yml2proc $(YML2_OPTS) # YML2_OPTS=--encoding=utf8 +# OPENSSL_INCLUDE=/opt/local/include +# OPENSSL_LIB=/opt/local/libexec/openssl3/lib diff --git a/src/Makefile b/src/Makefile index c30ecb3..dbc231f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,7 +22,9 @@ else LDFLAGS+=-lpEpAdapter endif -LDFLAGS+=-lpEpCxx11 -lpEpEngine -lpthread -ldl -lstdc++ +LDFLAGS+=-lpEpCxx11 -lpEpEngine -lpthread -ldl -lstdc++ -lmailio -lssl -lcrypto +# Don't know if needed. If running into problems, try uncommenting those: +#LDFLAGS+=-lboost_regex-mt -lboost_system-mt -lboost_date_time-mt ifneq ($(MAKECMDGOALS),clean)