Skip to content

Commit

Permalink
Merge pull request #91 from zwoop/MacOSBuild
Browse files Browse the repository at this point in the history
This adds the necessary -L flag for OpenSSL on macOS
  • Loading branch information
hawk259 committed Nov 12, 2018
2 parents 6bbf2d4 + 6fd2222 commit 87c20e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,14 @@ endif
LOCAL_LDADD = -L$(TOPDIR)/src/lib/$(OBJDIR)
COMP_FLAGS += -g -O2 -I/usr/include -I$(INCDIR) -I$(TOPDIR)/include -I. -Wall -fPIC

# OpenSSL is installed by default on macOS, but the headers are not.
# OpenSSL is installed by default on macOS, but the library and headers are not.
# Thus here we'll check for an installation of OpenSSL with Homebrew,
# an unofficial but widely used package manager for macOS.
ifeq ($(UNAME),Darwin)
ifneq (,$(shell command -v brew))
ifneq (,$(shell brew ls --versions openssl))
COMP_FLAGS += -I$(shell brew --prefix openssl)/include
LDADD += -L$(shell brew --prefix openssl)/lib
endif # OpenSSL installed via Homebrew
endif # Homebrew installed
endif # Darwin
Expand Down

0 comments on commit 87c20e2

Please sign in to comment.