aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: 829b235ebdef22d8a01722291b4adafb4255453a (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
31
32
33
34
35
36
37
38
LDFLAGS += -lglfw
LDFLAGS += -lOpenGL
LDFLAGS += -lGLEW

CFLAGS += -g

GLFLAGS += --target-env=opengl

.PHONY: FORCE
.SECONDARY: # do not remove intermediate files

all: main FORCE

main: main.o
main: die.o
main: shader.o
main: pass1_frag.o
main: fill_vert.o
main: pass2_frag.o
main: uniform.o
main: fb.o

# fix compile order
main.o: fill_vert.h
main.o: pass1_frag.h
main.o: pass2_frag.h

%.s %.h &: %.spv
	./blob $< $*

%_frag.spv: %.frag
	glslc $(GLFLAGS) -o $@ $<
%_vert.spv: %.vert
	glslc $(GLFLAGS) -o $@ $<

clean: FORCE
	git clean -fxdi