src = $(filter-out %_w32.c,$(wildcard src/*.c)) obj = $(src:.c=.o) dep = $(src:.c=.d) bin = vktest sdr = $(wildcard sdr/*.glsl) spirv = $(sdr:.glsl=.spv) warn = -pedantic -Wall -Wno-unused-variable CFLAGS = $(warn) -g -MMD LDFLAGS = -lvulkan -lX11 -lX11-xcb $(bin): $(obj) $(spirv) $(CC) -o $@ $(obj) $(LDFLAGS) %.v.spv: %.v.glsl glslangValidator -o $@ -S vert -V $< %.p.spv: %.p.glsl glslangValidator -o $@ -S frag -V $< -include $(dep) .PHONY: clean clean: rm -f $(bin) $(obj) $(spirv)