-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
97 lines (85 loc) · 2.29 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name = "vkhr"
config = "release"
all: shaders program
run: all
bin/${name} ${args}
benchmark: all
bin/${name} ${args} --benchmark yes
help: FORCE
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " release"
@echo " debug"
@echo ""
@echo "TARGETS:"
@echo " all"
@echo " run"
@echo " benchmark"
@echo " help"
@echo " shaders"
@echo " program"
@echo " download"
@echo " download-modules"
@echo " pre-generate"
@echo " solution"
@echo " bundle-assets"
@echo " archive-build"
@echo " distribute"
@echo " docs"
@echo " tags"
@echo " clean"
@echo " distclean"
@echo ""
program: FORCE
premake5 gmake
make -j8 -C build config=${config}
shaders: FORCE
@-utils/glslc.py share/shaders/billboards
@-make --no-print-directory -C share/shaders/billboards
@-utils/glslc.py share/shaders/models
@-make --no-print-directory -C share/shaders/models
@-utils/glslc.py share/shaders/self-shadowing
@-make --no-print-directory -C share/shaders/self-shadowing
@-utils/glslc.py share/shaders/transparency
@-make --no-print-directory -C share/shaders/transparency
@-utils/glslc.py share/shaders/strands
@-make --no-print-directory -C share/shaders/strands
@-utils/glslc.py share/shaders/volumes
@-make --no-print-directory -C share/shaders/volumes
download: download-modules
download-modules: FORCE
git submodule update --init --recursive --depth 1
pre-generate: clean solution
rm -rf build/.vs
git add -f build
solution: FORCE
premake5 vs2022
bundle-assets: FORCE
rm -rf bin/share
cp -r share bin/share
archive-build: FORCE
mv bin ${name}
zip -r ${name} ${name}
mv ${name} bin
distribute: bundle-assets archive-build
docs: FORCE
make -C docs
tags: FORCE
ctags -R src/${name} src/vkpp include/${name} include/vkpp
cscope -Rb -s src/${name} -s src/vkpp -s include/${name} -s include/vkpp
clean: FORCE
rm -rf build/obj
rm -f build/Makefile
rm -f build/${name}.make
rm -rf docs/build
distclean: clean
rm -f ${name}.zip
rm -f cscope.out
rm -f tags
rm -f imgui.ini
rm -rf bin/share
rm -rf build/.vs
find bin/ -type f ! \( -name "*.dll" -o -name "*.ico" \) -delete
FORCE:
.PHONY: all run benchmark help program shaders download download-modules pre-generate solution bundle-assets distribute docs tags clean distclean