summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Utzig <utzig@utzig.org>2015-01-08 09:54:28 -0200
committerFabio Utzig <utzig@utzig.org>2015-01-08 09:54:28 -0200
commitb16ed78b4317448828ce4b3163ab8a5f94ef1891 (patch)
treeb68cfc1b3225ee92a5566f014b9ae2239279f661
parent0ca889a4331b4439444a64b4b1fde9a31472fd1a (diff)
Add homebrew's libffi paths
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 546f5722..970c11b8 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,9 @@ ifeq (Darwin,$(findstring Darwin,$(shell uname)))
# add macports/homebrew include and library path to search directories, don't use '-rdynamic' and '-lrt':
CXXFLAGS += -I/opt/local/include -I/usr/local/opt/readline/include
LDFLAGS += -L/opt/local/lib -L/usr/local/opt/readline/lib
+ # add homebrew's libffi include and library path
+ CXXFLAGS += $(shell PKG_CONFIG_PATH=$$(brew list libffi | grep pkgconfig | xargs dirname) pkg-config --silence-errors --cflags libffi)
+ LDFLAGS += $(shell PKG_CONFIG_PATH=$$(brew list libffi | grep pkgconfig | xargs dirname) pkg-config --silence-errors --libs libffi)
SED = gsed
else
LDFLAGS += -rdynamic