aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))