Skip to content

Commit

Permalink
upd makefile for macos: check if brew installed, check openssl path
Browse files Browse the repository at this point in the history
  • Loading branch information
vixentael committed Sep 7, 2017
1 parent 71085eb commit b941dcc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Expand Up @@ -157,8 +157,18 @@ PREFIX = /usr/local

# add openssl headers for MacOS
ifeq ($(CRYPTO_ENGINE_PATH),openssl)
CFLAGS += -I$(PREFIX)/opt/openssl/include
LDFLAGS += -L$(PREFIX)/opt/openssl/lib

# if brew is installed, if openssl is installed
PACKAGELIST := $(shell brew list | grep 'openssl')
ifeq ($(PACKAGELIST),openssl)

# path to openssl (usually "/usr/local/opt/openssl")
OPENSSL_PATH := $(shell brew --prefix openssl)
ifneq ($(OPENSSL_PATH),)
CFLAGS += -I$(OPENSSL_PATH)/include
LDFLAGS += -L$(OPENSSL_PATH)/lib
endif
endif
endif

ifneq ($(SDK),)
Expand Down

0 comments on commit b941dcc

Please sign in to comment.