EXE = LawfulGood

SRC = \
	src/main.cpp \

CXX = g++
CXXFLAGS = \
	-I./lib/include \
	-std=c++17 \
	-O2 \

LD = g++
LDFLAGS = \
	-lglfw \
	-lvulkan \
	-ldl \
	-lpthread \

$(EXE): $(SRC) shaders
	mkdir -p bin
	$(CXX) $(CXXFLAGS) $(SRC) $(LDFLAGS) -o bin/$@

shaders: res/shaders/shader.frag res/shaders/shader.vert
	mkdir -p bin/shaders
	glslc res/shaders/shader.vert -o bin/shaders/vert.spv
	glslc res/shaders/shader.frag -o bin/shaders/frag.spv

.PHONY: test clean

test: $(EXE)
	./bin/$<

clean:
	rm -rf bin/
