From 1a061f35d1c1ed3f6f75f37134cb1e13fe10a9c0 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Tue, 9 Dec 2025 17:12:37 -0600 Subject: [PATCH] Makefile: more Darwin hacks --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 1fef323..1431427 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,11 @@ CFLAGS += -Wno-error=unused-const-variable CFLAGS += -Wno-error=unused-but-set-variable CFLAGS += -Wno-error=unused-variable CFLAGS += -I$(MAKEFILE_PATH)/include +ifeq ($(shell uname),Darwin) +CFLAGS += $(shell pkg-config --cflags glfw3) +else CFLAGS += -I$(dir $(GLFW))../include +endif CXXFLAGS += -fno-exceptions #CFLAGS += -DDEBUG_BUTTONS #CFLAGS += -DDEBUG_AXES @@ -27,6 +31,10 @@ endif ifeq ($(OS),Windows_NT) LDFLAGS += -Wl,--subsystem,windows -mwindows endif +ifeq ($(shell uname),Darwin) +LDFLAGS += $(shell pkg-config --libs glfw3) +endif + OBJCOPY ?= objcopy