summaryrefslogtreecommitdiff
path: root/Makefile
blob: 79ccbd75165324800656c201b96a1b84123a6920 (plain)
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
29
30
DEBUG=-DVULKAN_VALIDATION -g
WARN=-Wdouble-promotion
FEATURE=-DHAVE_MSAA

GLSLC=glslc
CFLAGS=-I$(VULKAN_SDK)/include $(FEATURE) $(DEBUG) $(WARN)
#CXXFLAGS=$(CFLAGS) -std=c++14
LDFLAGS=-L$(VULKAN_SDK)/lib -lvulkan

# XXX: Pugl branch location
CFLAGS+=-I../pugl
LDFLAGS+=-L../pugl/build -lpugl_x11
#LDFLAGS+=-L../pugl/build -lpugl_win

all: main shaders

main: main.o vk_mem_alloc.o
	$(CXX) $^ $(LDFLAGS) -o $@

main.o: main.c

vk_mem_alloc.o: vk_mem_alloc.h

shaders: vert.spv frag.spv

vert.spv: shader.vert
	$(GLSLC) $^ -o $@

frag.spv: shader.frag
	$(GLSLC) $^ -o $@