-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakeFile
More file actions
28 lines (21 loc) · 700 Bytes
/
MakeFile
File metadata and controls
28 lines (21 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
include .env
CFLAGS = -std=c++17 -I. -I$(VULKAN_SDK_PATH)/include
LDFLAGS = -L$(VULKAN_SDK_PATH)/lib `pkg-config --static --libs glfw3` -lvulkan
# create list of all spv files and set as dependency
vertSources = $(shell find ./Shaders -type f -name "*.vert")
vertObjFiles = $(patsubst %.vert, %.vert.spv, $(vertSources))
fragSources = $(shell find ./Shaders -type f -name "*.frag")
fragObjFiles = $(patsubst %.frag, %.frag.spv, $(fragSources))
TARGET = a.out
$(TARGET): $(vertObjFiles) $(fragObjFiles)
$(TARGET): *.cpp *.hpp
g++ $(CFLAGS) -o $(TARGET) *.cpp $(LDFLAGS)
# make shader targets
%.spv: %
${GLSLC} $< -o $@
.PHONY: test clean
test: a.out
./a.out
clean:
rm -f a.out
rm -f *.spv