commit 995b6b8586a6ec44884f6690355baf1b79a1ab71
parent 98d5909b7d57aa68e8514d2fdc2c67d120fc3261
Author: Joris Vink <joris@gotyon.local>
Date: Wed, 27 Oct 2021 14:34:06 +0200
On macos use pkg-config for openssl.
Diffstat:
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
@@ -132,10 +132,8 @@ ifneq ("$(SANITIZE)", "")
endif
ifeq ("$(OSNAME)", "darwin")
- CFLAGS+=-I/opt/local/include/ -I/usr/local/opt/openssl/include
- LDFLAGS+=-L/opt/local/lib -L/usr/local/opt/openssl/lib
- CFLAGS+=-I/opt/homebrew/opt/openssl/include
- LDFLAGS+=-L/opt/homebrew/opt/openssl/lib
+ CFLAGS+=$(shell pkg-config openssl --cflags)
+ LDFLAGS=$(shell pkg-config openssl --libs)
S_SRC+=src/bsd.c
else ifeq ("$(OSNAME)", "linux")
CFLAGS+=-D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
diff --git a/kodev/Makefile b/kodev/Makefile
@@ -28,10 +28,8 @@ endif
OSNAME=$(shell uname -s | sed -e 's/[-_].*//g' | tr A-Z a-z)
ifeq ("$(OSNAME)", "darwin")
- CFLAGS+=-I/opt/local/include/ -I/usr/local/opt/openssl/include
- LDFLAGS+=-L/opt/local/lib -L/usr/local/opt/openssl/lib
- CFLAGS+=-I/opt/homebrew/opt/openssl/include
- LDFLAGS+=-L/opt/homebrew/opt/openssl/lib
+ CFLAGS+=$(shell pkg-config openssl --cflags)
+ LDFLAGS=$(shell pkg-config openssl --libs)
else ifeq ("$(OSNAME)", "linux")
CFLAGS+=-D_GNU_SOURCE=1
endif