summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3826d3e..1b40d7c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,17 @@
all : glslview glslwrite
-USE_INOTIFY = -DUSE_INOTIFY
+ifeq ($(shell uname -s),Linux)
+USE_INOTIFY ?= -DUSE_INOTIFY
+endif
-CFLAGS = -O3 -Wall $(USE_INOTIFY)
-LIBS = -lSDL2 -lGL -lGLEW -lm
+CFLAGS ?= -O3 -Wall
+LIBS := -lSDL2 -lGL -lGLEW -lm
glslview : glslview.c common.c common.h
- $(CC) $(CFLAGS) -o $@ glslview.c common.c $(LIBS)
+ $(CC) $(CFLAGS) $(USE_INOTIFY) -o $@ glslview.c common.c $(LIBS)
glslwrite : glslwrite.c common.c common.h
$(CC) $(CFLAGS) -o $@ glslwrite.c common.c $(LIBS) -lpng
+
+clean :
+ rm -f glslview glslwrite