aboutsummaryrefslogtreecommitdiff
path: root/subprojects/nk_pugl/nuklear/example/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/nk_pugl/nuklear/example/Makefile')
-rw-r--r--subprojects/nk_pugl/nuklear/example/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/subprojects/nk_pugl/nuklear/example/Makefile b/subprojects/nk_pugl/nuklear/example/Makefile
new file mode 100644
index 0000000..a3ae6f0
--- /dev/null
+++ b/subprojects/nk_pugl/nuklear/example/Makefile
@@ -0,0 +1,42 @@
+# Flags
+CFLAGS += -std=c99 -pedantic -O2
+LIBS :=
+
+ifeq ($(OS),Windows_NT)
+BIN := $(BIN).exe
+ LIBS := -lglfw3 -lopengl32 -lm -lGLU32 -lGLEW32
+else
+ UNAME_S := $(shell uname -s)
+ GLFW3 := $(shell pkg-config --libs glfw3)
+ ifeq ($(UNAME_S),Darwin)
+ LIBS := $(GLFW3) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
+ CFLAGS += -I/usr/local/include
+ else
+ LIBS := $(GLFW3) -lGL -lm -lGLU -lGLEW
+ endif
+endif
+
+all: generate file_browser extended canvas skinning
+
+generate: clean
+ifeq ($(OS),Windows_NT)
+ @mkdir bin 2> nul || exit 0
+else
+ @mkdir -p bin
+endif
+
+clean:
+ @rm -rf bin
+
+file_browser: generate
+ $(CC) $(CFLAGS) -o bin/file_browser file_browser.c $(LIBS)
+
+extended: generate
+ $(CC) $(CFLAGS) -o bin/extended extended.c $(LIBS)
+
+canvas: generate
+ $(CC) $(CFLAGS) -o bin/canvas canvas.c $(LIBS)
+
+skinning: generate
+ $(CC) $(CFLAGS) -o bin/skinning skinning.c $(LIBS)
+