From b65b7424030628a73c79999fc7c331a3032dbc96 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 6 Feb 2016 11:07:16 +0100 Subject: Makefile improvements --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3