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