aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian C <cc@localhost>2025-03-04 17:13:42 -0800
committerChristian C <cc@localhost>2025-03-04 17:13:42 -0800
commita5d4202196086d96a4a2d0e6049bcbeebce10ea5 (patch)
tree31062947deb6f2eb5066e8649968d99b1f7f7b90
parent539f35bdae578037908fe8a01f8af14383bfaa40 (diff)
Detect build platform
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b8f5d73..1fafe0b 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,12 @@ OBJS=$(OBJS_sub:.c=.o)
OBJ_DIRS_sub=$(shell find $(SRC_DIR) -type d)
OBJ_DIRS=$(subst $(SRC_DIR),$(OBJ_DIR),$(OBJ_DIRS_sub))
-PKGCONF=pkgconf
+ifeq ($(shell uname -s),Linux)
+ PKGCONF=pkgconf
+endif
+ifeq ($(shell uname -s),Darwin)
+ PKGCONF=pkg-config
+endif
CFLAGS=
CFLAGS+=$(shell $(PKGCONF) --cflags $(PKGS))