diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-05-16 18:55:58 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-05-16 18:55:58 +0200 |
commit | 107684b00d65eac84e4bf2dfd34073d309230d50 (patch) | |
tree | 131215f9b95d1a8a24fa92c99982ee691a7b4724 /makefile | |
parent | 766a817a23403ea2aeb325bea9f340f54a3e7987 (diff) |
move shader compilation from runtime to compile-time
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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 |