summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e7e4d85
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+DEBUG=-DVULKAN_VALIDATION -g
+WARN=-Wdouble-promotion
+FEATURE=-DHAVE_MSAA
+
+GLSLC=glslc
+CFLAGS=-I$(VULKAN_SDK)/include $(FEATURE) $(DEBUG) $(WARN)
+LDFLAGS=-L$(VULKAN_SDK)/lib -lvulkan
+
+CFLAGS+=-I../pugl
+LDFLAGS+=-L../pugl/build -lpugl_x11
+
+all: main shaders
+
+main: main.o vk_mem_alloc.o
+ $(CXX) $^ $(LDFLAGS) -o $@
+
+main.o: main.c
+
+vk_mem_alloc.o: vk_mem_alloc.h
+
+shaders: vert.spv frag.spv
+
+vert.spv: shader.vert
+ $(GLSLC) $^ -o $@
+
+frag.spv: shader.frag
+ $(GLSLC) $^ -o $@