From fd128d24c67f3890cf6588b2511c74c60e61c009 Mon Sep 17 00:00:00 2001 From: Tokarak <63452145+Tokarak@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:09:59 +0100 Subject: [PATCH] Fix MacOS-silicon compile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the right Homebrew prefix — not hard-coded any more. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ea56c282..68e947d4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This Makefile works for Mac OS X (El Capitan), MinGW, and Linux. # # For Mac OS X: -# Run "brew install sdl" to install SDL in /usr/local. +# Run "brew install sdl" to install SDL in $(HOMEBREW_PREFIX). # Run "brew install sdl_gfx". # Run "brew install sdl_mixer". # Run "brew install sdl_ttf". @@ -13,7 +13,7 @@ # Run "make" to build HyperRogue as ./hyperrogue.exe. # # For Ubuntu Linux: -# Run "sudo apt-get install libsdl-dev" to install SDL in /usr/local. +# Run "sudo apt-get install libsdl-dev" to install SDL in $(HOMEBREW_PREFIX). # Run "make" to build HyperRogue as ./hyperrogue. @@ -68,9 +68,10 @@ ifeq (${OS},mingw) endif ifeq (${OS},osx) - CXXFLAGS_EARLY += -DMAC -I/usr/local/include + HOMEBREW_PREFIX := $(shell brew --prefix) + CXXFLAGS_EARLY += -DMAC -I$(HOMEBREW_PREFIX)/include EXE_EXTENSION := - LDFLAGS_EARLY += -L/usr/local/lib + LDFLAGS_EARLY += -L$(HOMEBREW_PREFIX)/lib LDFLAGS_GL := -framework AppKit -framework OpenGL LDFLAGS_GLEW := -lGLEW LDFLAGS_PNG := -lpng