From c509bdf7dc77b82c6a76b6bd4459fa4dcb58343b Mon Sep 17 00:00:00 2001 From: John Flanagan Date: Sat, 16 Sep 2023 23:20:27 +0100 Subject: [PATCH] Fix issue with Makefile on MacOS where uname -o is called causing make to error out --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c9c5a5a..6406c1a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ CC ?= gcc EMCC ?= emcc UNAME_S := $(shell uname -s) -UNAME_O := $(shell uname -o) RENDERER ?= GL USE_GLX ?= false DEBUG ?= false @@ -38,8 +37,9 @@ endif # macOS ------------------------------------------------------------------------ ifeq ($(UNAME_S), Darwin) + BREW_HOME := $(shell brew --prefix) C_FLAGS := $(C_FLAGS) -x objective-c -I/opt/homebrew/include -D_THREAD_SAFE -w - L_FLAGS := $(L_FLAGS) -L/opt/homebrew/lib -framework Foundation + L_FLAGS := $(L_FLAGS) -L$(BREW_HOME)/lib -framework Foundation ifeq ($(RENDERER), GL) L_FLAGS := $(L_FLAGS) -lGLEW -GLU -framework OpenGL @@ -68,7 +68,7 @@ else ifeq ($(UNAME_S), Linux) # Windows MSYS ------------------------------------------------------------------ -else ifeq ($(UNAME_O), Msys) +else ifeq ($(shell uname -o), Msys) ifeq ($(RENDERER), GL) L_FLAGS := $(L_FLAGS) -lglew32 -lopengl32 endif