aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Cunningham <cc@local.lan>2025-03-06 16:05:50 -0800
committerChristian Cunningham <cc@local.lan>2025-03-06 16:05:50 -0800
commit7890d2063028457dad0b586caba7b0fa02efea8d (patch)
tree9d7e7c12af1a40f9c969f59f3cc65550b0773f8e /Makefile
parenteeab6b7a01bdd7540557a78a8373fba5108dc296 (diff)
Modularize Visual UX
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7da1156..26be076 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
PKGS=libtiff-4 libpng
-#PKGS+=raylib
+DEFINES=
EXE=prog
BUILD_DIR=build/
OBJ_DIR=$(BUILD_DIR)obj/
@@ -11,6 +11,13 @@ OBJS=$(OBJS_sub:.c=.o)
OBJ_DIRS_sub=$(shell find $(SRC_DIR) -type d)
OBJ_DIRS=$(subst $(SRC_DIR),$(OBJ_DIR),$(OBJ_DIRS_sub))
+# Include raylib if we want a visual experience
+VISUAL?=
+ifdef VISUAL
+PKGS+=raylib
+DEFINES+=-DVISUAL
+endif
+
ifeq ($(shell uname -s),Linux)
PKGCONF=pkgconf
endif
@@ -21,6 +28,7 @@ endif
CFLAGS=
CFLAGS+=$(shell $(PKGCONF) --cflags $(PKGS))
CFLAGS+=-I$(INC_DIR)
+CFLAGS+=$(DEFINES)
LDFLAGS=
LDFLAGS+=$(shell $(PKGCONF) --libs $(PKGS))