On MacOS put the OpenSSL flags under FEATURES_INC.

Use this to pick them up automatically for kodev.
This commit is contained in:
Joris Vink 2021-10-27 22:28:08 +02:00
parent fa97544f01
commit 960730a062
2 changed files with 3 additions and 7 deletions

View File

@ -132,8 +132,10 @@ ifneq ("$(SANITIZE)", "")
endif
ifeq ("$(OSNAME)", "darwin")
CFLAGS+=$(shell pkg-config openssl --cflags)
OSSL_INCL=$(shell pkg-config openssl --cflags)
CFLAGS+=$(OSSL_INCL)
LDFLAGS+=$(shell pkg-config openssl --libs)
FEATURES_INC+=$(OSSL_INCL)
S_SRC+=src/bsd.c
else ifeq ("$(OSNAME)", "linux")
CFLAGS+=-D_GNU_SOURCE=1 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2

View File

@ -2017,12 +2017,6 @@ cli_build_flags_common(struct buildopt *bopt, struct cli_buf *buf)
else
cli_buf_appendf(buf, "-I%s/include ", bopt->kore_source);
#if defined(__MACH__)
/* Add default openssl include path from homebrew / ports under OSX. */
cli_buf_appendf(buf, "-I/opt/local/include ");
cli_buf_appendf(buf, "-I/usr/local/opt/openssl/include ");
cli_buf_appendf(buf, "-I/opt/homebrew/opt/openssl/include ");
#endif
if (bopt == NULL || bopt->single_binary == 0) {
cli_kore_load_file("features", bopt, &data, &len);
cli_buf_append(buf, data, len);