summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-09 22:18:44 -0700
committerKeith Packard <keithp@keithp.com>2017-05-09 22:25:03 -0700
commita695f807289cec3c29caf5cc7ddf39eea8167f66 (patch)
treef5f5cec2b79d9a12cf6627d9b771513f9f96cdd6 /Makefile
Import bare cube demo
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..475c788
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+SRCS=\
+ cube.c
+
+OBJS=$(SRCS:.c=.o)
+
+INCS=\
+ gettime.h\
+ linmath.h
+
+LIBS=-L/local/xorg/lib -lvulkan -lxcb -lm
+
+TARGET=cube
+
+GLSV=glslangValidator
+
+SPV=cube-vert.spv cube-frag.spv
+
+CFLAGS=-O0 -g -DVK_USE_PLATFORM_XCB_KHR -I/local/xorg/include
+
+all: $(TARGET) $(SPV)
+
+$(TARGET): $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
+
+$(OBJS): $(INCS)
+
+cube-vert.spv: cube.vert
+ $(GLSV) -V -o $@ cube.vert
+
+cube-frag.spv: cube.frag
+ $(GLSV) -V -o $@ cube.frag
+
+clean:
+ rm -f $(TARGET) $(OBJS) $(SPV)