Nuklear
Nuklear copied to clipboard
Modified makefile flags for examples on macOS Monterey ARM Homebrew
Hi!
I have a macOS monterey system on an M1 with home-brew.
In order to build the examples, I needed to brew install glew and glfw and then make the following modification
diff --git a/example/Makefile b/example/Makefile
index 1f24aea..d440791 100644
--- a/example/Makefile
+++ b/example/Makefile
@@ -11,8 +11,8 @@ else
UNAME_S := $(shell uname -s)
GLFW3 := $(shell pkg-config --libs glfw3)
ifeq ($(UNAME_S),Darwin)
- LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
- CFLAGS += -I/usr/local/include
+ LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm $(shell pkg-config --libs glew)
+ CFLAGS += $(shell pkg-config --cflags glfw3) $(shell pkg-config --cflags glew)
else
LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW
endif
I'm not sure of your workflow. Would you prefer I submit this observation as an issue here or as a pull request? As you can see all I did was move glew to using pkg-config also on darwin.
Thanks!