From 492819380f202ab330a5092f38142f7473189f99 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 22 Jun 2021 03:48:23 -0700 Subject: [PATCH] makefile: Generalize HomeBrew dependency checking for MacOS M1 systems As discussed in #1050 --- makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 4fcef2c9..640c6279 100644 --- a/makefile +++ b/makefile @@ -356,8 +356,8 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) else HBPATH = /opt/homebrew endif - INCPATH += $(foreach dir,$(wildcard $(HBPATH)/Cellar/*/*),$(dir)/include) - LIBPATH += $(foreach dir,$(wildcard $(HBPATH)/Cellar/*/*),$(dir)/lib) + INCPATH += $(foreach dir,$(wildcard $(HBPATH)/Cellar/*/*),$(realpath $(dir)/include)) + LIBPATH += $(foreach dir,$(wildcard $(HBPATH)/Cellar/*/*),$(realpath $(dir)/lib)) endif else ifeq (Linux,$(OSTYPE)) @@ -492,6 +492,8 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) LIBPATH += /usr/lib/ endif endif + export CPATH = $(subst $() $(),:,$(INCPATH)) + export LIBRARY_PATH = $(subst $() $(),:,$(LIBPATH)) # Some gcc versions don't support LTO, so only use LTO when the compiler is known to support it ifeq (,$(NO_LTO)) ifneq (,$(GCC_VERSION))