-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
148 lines (127 loc) · 4.32 KB
/
Makefile
File metadata and controls
148 lines (127 loc) · 4.32 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Alternative GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug_x64
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug_x64)
x_stb_config = debug_x64
x_glad_config = debug_x64
x_glfw_config = debug_x64
x_rapidobj_config = debug_x64
x_catch2_config = debug_x64
x_fontstash_config = debug_x64
main_config = debug_x64
main_shaders_config = debug_x64
support_config = debug_x64
vmlib_config = debug_x64
vmlib_test_config = debug_x64
else ifeq ($(config),release_x64)
x_stb_config = release_x64
x_glad_config = release_x64
x_glfw_config = release_x64
x_rapidobj_config = release_x64
x_catch2_config = release_x64
x_fontstash_config = release_x64
main_config = release_x64
main_shaders_config = release_x64
support_config = release_x64
vmlib_config = release_x64
vmlib_test_config = release_x64
else
$(error "invalid configuration $(config)")
endif
PROJECTS := x-stb x-glad x-glfw x-rapidobj x-catch2 x-fontstash main main-shaders support vmlib vmlib-test
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
x-stb:
ifneq (,$(x_stb_config))
@echo "==== Building x-stb ($(x_stb_config)) ===="
@${MAKE} --no-print-directory -C third_party -f x-stb.make config=$(x_stb_config)
endif
x-glad:
ifneq (,$(x_glad_config))
@echo "==== Building x-glad ($(x_glad_config)) ===="
@${MAKE} --no-print-directory -C third_party -f x-glad.make config=$(x_glad_config)
endif
x-glfw:
ifneq (,$(x_glfw_config))
@echo "==== Building x-glfw ($(x_glfw_config)) ===="
@${MAKE} --no-print-directory -C third_party -f x-glfw.make config=$(x_glfw_config)
endif
x-rapidobj:
ifneq (,$(x_rapidobj_config))
@echo "==== Building x-rapidobj ($(x_rapidobj_config)) ===="
@${MAKE} --no-print-directory -C third_party -f x-rapidobj.make config=$(x_rapidobj_config)
endif
x-catch2:
ifneq (,$(x_catch2_config))
@echo "==== Building x-catch2 ($(x_catch2_config)) ===="
@${MAKE} --no-print-directory -C third_party -f x-catch2.make config=$(x_catch2_config)
endif
x-fontstash:
ifneq (,$(x_fontstash_config))
@echo "==== Building x-fontstash ($(x_fontstash_config)) ===="
@${MAKE} --no-print-directory -C third_party -f x-fontstash.make config=$(x_fontstash_config)
endif
main: vmlib support x-stb x-glad x-glfw
ifneq (,$(main_config))
@echo "==== Building main ($(main_config)) ===="
@${MAKE} --no-print-directory -C main -f Makefile config=$(main_config)
endif
main-shaders:
ifneq (,$(main_shaders_config))
@echo "==== Building main-shaders ($(main_shaders_config)) ===="
@${MAKE} --no-print-directory -C assets -f Makefile config=$(main_shaders_config)
endif
support:
ifneq (,$(support_config))
@echo "==== Building support ($(support_config)) ===="
@${MAKE} --no-print-directory -C support -f Makefile config=$(support_config)
endif
vmlib:
ifneq (,$(vmlib_config))
@echo "==== Building vmlib ($(vmlib_config)) ===="
@${MAKE} --no-print-directory -C vmlib -f Makefile config=$(vmlib_config)
endif
vmlib-test: vmlib x-catch2
ifneq (,$(vmlib_test_config))
@echo "==== Building vmlib-test ($(vmlib_test_config)) ===="
@${MAKE} --no-print-directory -C vmlib-test -f Makefile config=$(vmlib_test_config)
endif
clean:
@${MAKE} --no-print-directory -C third_party -f x-stb.make clean
@${MAKE} --no-print-directory -C third_party -f x-glad.make clean
@${MAKE} --no-print-directory -C third_party -f x-glfw.make clean
@${MAKE} --no-print-directory -C third_party -f x-rapidobj.make clean
@${MAKE} --no-print-directory -C third_party -f x-catch2.make clean
@${MAKE} --no-print-directory -C third_party -f x-fontstash.make clean
@${MAKE} --no-print-directory -C main -f Makefile clean
@${MAKE} --no-print-directory -C assets -f Makefile clean
@${MAKE} --no-print-directory -C support -f Makefile clean
@${MAKE} --no-print-directory -C vmlib -f Makefile clean
@${MAKE} --no-print-directory -C vmlib-test -f Makefile clean
help:
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " debug_x64"
@echo " release_x64"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " x-stb"
@echo " x-glad"
@echo " x-glfw"
@echo " x-rapidobj"
@echo " x-catch2"
@echo " x-fontstash"
@echo " main"
@echo " main-shaders"
@echo " support"
@echo " vmlib"
@echo " vmlib-test"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"