commit 20292a40085711c6aa355d6fd4d06b0342e71d2e parent e9157267b1f962a79b7aa9a9c2504b4334bba710 Author: Andrew Kloet <andrew@kloet.net> Date: Thu, 22 Oct 2026 12:35:52 -0400 build: fix on macos Diffstat:
| M | config.mk | | | 15 | +++++++++------ |
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/config.mk b/config.mk @@ -6,17 +6,20 @@ VERSION = 1.2 # paths PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man +PKG_CONFIG = $(shell command -v pkgconf || command -v pkg-config) -# ncurses -NCURSESINC = $(shell pkg-config --cflags-only-I ncursesw) -NCURSESLIB = $(shell pkg-config --libs ncursesw) +NCURSESINC = $(shell ${PKG_CONFIG} --cflags-only-I ncursesw) +NCURSESLIB = $(shell ${PKG_CONFIG} --libs ncursesw) # OpenBSD (uncomment) #NCURSESINC = #NCURSESLIB = -lncursesw +OPENSSLINC = $(shell ${PKG_CONFIG} --cflags-only-I openssl) +OPENSSLLIB = $(shell ${PKG_CONFIG} --libs openssl) + # includes and libs -INCS = ${NCURSESINC} -LIBS = -lssl -lcrypto ${NCURSESLIB} +INCS = ${NCURSESINC} ${OPENSSLINC} +LIBS = ${NCURSESLIB} ${OPENSSLLIB} # flags CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=700L \ @@ -26,4 +29,4 @@ CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} \ #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} LDFLAGS = ${LIBS} -CC = cc +CC ?= cc