aboutsummaryrefslogtreecommitdiff
path: root/nuklear/demo/glfw_opengl2/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nuklear/demo/glfw_opengl2/Makefile')
-rw-r--r--nuklear/demo/glfw_opengl2/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/nuklear/demo/glfw_opengl2/Makefile b/nuklear/demo/glfw_opengl2/Makefile
new file mode 100644
index 0000000..c937eb8
--- /dev/null
+++ b/nuklear/demo/glfw_opengl2/Makefile
@@ -0,0 +1,25 @@
+# Install
+BIN = demo
+
+# Flags
+CFLAGS = -std=c99 -pedantic -O2
+
+SRC = main.c
+OBJ = $(SRC:.c=.o)
+
+ifeq ($(OS),Windows_NT)
+BIN := $(BIN).exe
+LIBS = -lglfw3 -lopengl32 -lm -lGLU32
+else
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S),Darwin)
+ LIBS = -lglfw3 -framework OpenGL -lm
+ else
+ LIBS = -lglfw -lGL -lm -lGLU
+ endif
+endif
+
+$(BIN):
+ @mkdir -p bin
+ rm -f bin/$(BIN) $(OBJS)
+ $(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) $(LIBS)