diff --git a/makefile b/makefile index f0f5101e..4fcef2c9 100644 --- a/makefile +++ b/makefile @@ -350,9 +350,14 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) LIBPATH += /opt/local/lib OS_LDFLAGS += -L/opt/local/lib endif - ifeq (HomeBrew,$(shell if ${TEST} -d /usr/local/Cellar; then echo HomeBrew; fi)) - INCPATH += $(foreach dir,$(wildcard /usr/local/Cellar/*/*),$(dir)/include) - LIBPATH += $(foreach dir,$(wildcard /usr/local/Cellar/*/*),$(dir)/lib) + ifeq (HomeBrew,$(or $(shell if ${TEST} -d /usr/local/Cellar; then echo HomeBrew; fi),$(shell if ${TEST} -d /opt/homebrew/Cellar; then echo HomeBrew; fi))) + ifeq (local,$(shell if $(TEST) -d /usr/local/Cellar; then echo local; fi)) + HBPATH = /usr/local + else + HBPATH = /opt/homebrew + endif + INCPATH += $(foreach dir,$(wildcard $(HBPATH)/Cellar/*/*),$(dir)/include) + LIBPATH += $(foreach dir,$(wildcard $(HBPATH)/Cellar/*/*),$(dir)/lib) endif else ifeq (Linux,$(OSTYPE))