vulkan_test2

diff Makefile @ 10:8eb3126cc2f1

starting on shaders
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 21 Jun 2018 06:58:58 +0300
parents c31c4115d44a
children
line diff
     1.1 --- a/Makefile	Wed Jun 20 05:57:34 2018 +0300
     1.2 +++ b/Makefile	Thu Jun 21 06:58:58 2018 +0300
     1.3 @@ -2,12 +2,22 @@
     1.4  obj = $(src:.c=.o)
     1.5  bin = test
     1.6  
     1.7 +sdr = $(wildcard sdr/*.glsl)
     1.8 +spv = $(sdr:.glsl=.spv)
     1.9 +
    1.10  CFLAGS = -pedantic -Wall -g
    1.11  LDFLAGS = -lvulkan -lX11
    1.12  
    1.13 -$(bin): $(obj)
    1.14 +$(bin): $(obj) $(spv)
    1.15  	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.16  
    1.17 +sdr/vertex.spv: sdr/vertex.glsl
    1.18 +	glslangValidator -o $@ -S vert -V $<
    1.19 +
    1.20 +sdr/pixel.spv: sdr/pixel.glsl
    1.21 +	glslangValidator -o $@ -S frag -V $<
    1.22 +
    1.23 +
    1.24  .PHONY: clean
    1.25  clean:
    1.26  	rm -f $(obj) $(bin)