Fix MacOS-silicon compile

Use the right Homebrew prefix — not hard-coded any more.
This commit is contained in:
Tokarak 2024-04-16 17:09:59 +01:00
parent fbea2d91ce
commit fd128d24c6
1 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# This Makefile works for Mac OS X (El Capitan), MinGW, and Linux. # This Makefile works for Mac OS X (El Capitan), MinGW, and Linux.
# #
# For Mac OS X: # 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_gfx".
# Run "brew install sdl_mixer". # Run "brew install sdl_mixer".
# Run "brew install sdl_ttf". # Run "brew install sdl_ttf".
@ -13,7 +13,7 @@
# Run "make" to build HyperRogue as ./hyperrogue.exe. # Run "make" to build HyperRogue as ./hyperrogue.exe.
# #
# For Ubuntu Linux: # 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. # Run "make" to build HyperRogue as ./hyperrogue.
@ -68,9 +68,10 @@ ifeq (${OS},mingw)
endif endif
ifeq (${OS},osx) ifeq (${OS},osx)
CXXFLAGS_EARLY += -DMAC -I/usr/local/include HOMEBREW_PREFIX := $(shell brew --prefix)
CXXFLAGS_EARLY += -DMAC -I$(HOMEBREW_PREFIX)/include
EXE_EXTENSION := EXE_EXTENSION :=
LDFLAGS_EARLY += -L/usr/local/lib LDFLAGS_EARLY += -L$(HOMEBREW_PREFIX)/lib
LDFLAGS_GL := -framework AppKit -framework OpenGL LDFLAGS_GL := -framework AppKit -framework OpenGL
LDFLAGS_GLEW := -lGLEW LDFLAGS_GLEW := -lGLEW
LDFLAGS_PNG := -lpng LDFLAGS_PNG := -lpng