diff options
author | Steffen Vogel <post@steffenvogel.de> | 2017-01-31 10:06:06 -0300 |
---|---|---|
committer | Steffen Vogel <post@steffenvogel.de> | 2017-01-31 10:06:06 -0300 |
commit | 44b47b57e3825821438460bb7cccd3ff661e4948 (patch) | |
tree | 5c1bfaed458a3a6d97c2d7eae2f849c660ac605e | |
parent | 7481ba4750b5c65c9dc2c64ae29027f328f25bfe (diff) | |
download | yosys-44b47b57e3825821438460bb7cccd3ff661e4948.tar.gz yosys-44b47b57e3825821438460bb7cccd3ff661e4948.tar.bz2 yosys-44b47b57e3825821438460bb7cccd3ff661e4948.zip |
use Homebrew only if installed
-rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -62,15 +62,17 @@ SED = sed BISON = bison ifeq (Darwin,$(findstring Darwin,$(shell uname))) + BREW := $(shell command -v brew 2> /dev/null) + ifdef BREW + export PKG_CONFIG_PATH = $(shell $(BREW) list libffi | grep pkgconfig | xargs dirname) + BISON = $(shell $(BREW) list bison | grep -m1 "bin/bison") + endif # 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) - # use bison installed by homebrew if available - BISON = $(shell (brew list bison | grep -m1 "bin/bison") || echo bison) - SED = sed + # add macports/homebrew's libffi include and library path + CXXFLAGS += $(shell pkg-config --silence-errors --cflags libffi) + LDFLAGS += $(shell pkg-config --silence-errors --libs libffi) else LDFLAGS += -rdynamic LDLIBS += -lrt |