aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-16 18:55:58 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-16 18:55:58 +0200
commit107684b00d65eac84e4bf2dfd34073d309230d50 (patch)
tree131215f9b95d1a8a24fa92c99982ee691a7b4724 /makefile
parent766a817a23403ea2aeb325bea9f340f54a3e7987 (diff)
move shader compilation from runtime to compile-time
Diffstat (limited to 'makefile')
-rw-r--r--makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/makefile b/makefile
index e024267..34c19bf 100644
--- a/makefile
+++ b/makefile
@@ -5,6 +5,7 @@ LDFLAGS += -lGLEW
CFLAGS += -g
.PHONY: FORCE
+.SECONDARY: # do not remove intermediate files
all: main FORCE
@@ -18,12 +19,13 @@ main: hello_vert.o
main.o: hello_vert.h
main.o: hello_frag.h
-%_frag.o %_frag.h &: %.frag
- ld -r -b binary -o $*_frag.o $<
- ./blobheader $< > $*_frag.h
-%_vert.o %_vert.h &: %.vert
- ld -r -b binary -o $*_vert.o $<
- ./blobheader $< > $*_vert.h
+%.s %.h &: %.spv
+ ./blob $< $*
+
+%_frag.spv: %.frag
+ glslc -o $@ $<
+%_vert.spv: %.vert
+ glslc -o $@ $<
clean: FORCE
git clean -fxdi