-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
316 lines (280 loc) · 10.4 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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# Alternative GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug)
lucre_config = debug
libpamanager_config = debug
engine_config = debug
glfw3_config = debug
yaml_cpp_config = debug
fastgltf_config = debug
ufbx_config = debug
SpriteSheetGenerator_config = debug
shaderc_config = debug
shaderc_util_config = debug
SPIRV_Tools_opt_config = debug
SPIRV_Tools_config = debug
MachineIndependent_config = debug
OSDependent_config = debug
GenericCodeGen_config = debug
OGLCompiler_config = debug
SPIRV_config = debug
sdl_mixer_config = debug
libvorbis_config = debug
libogg_config = debug
sdl_config = debug
box2d_config = debug
assetImporter_config = debug
zlibstatic_config = debug
resource_system_gnu_config = debug
else ifeq ($(config),release)
lucre_config = release
libpamanager_config = release
engine_config = release
glfw3_config = release
yaml_cpp_config = release
fastgltf_config = release
ufbx_config = release
SpriteSheetGenerator_config = release
shaderc_config = release
shaderc_util_config = release
SPIRV_Tools_opt_config = release
SPIRV_Tools_config = release
MachineIndependent_config = release
OSDependent_config = release
GenericCodeGen_config = release
OGLCompiler_config = release
SPIRV_config = release
sdl_mixer_config = release
libvorbis_config = release
libogg_config = release
sdl_config = release
box2d_config = release
assetImporter_config = release
zlibstatic_config = release
resource_system_gnu_config = release
else ifeq ($(config),dist)
lucre_config = dist
libpamanager_config = dist
engine_config = dist
glfw3_config = dist
yaml_cpp_config = dist
fastgltf_config = dist
ufbx_config = dist
SpriteSheetGenerator_config = dist
shaderc_config = dist
shaderc_util_config = dist
SPIRV_Tools_opt_config = dist
SPIRV_Tools_config = dist
MachineIndependent_config = dist
OSDependent_config = dist
GenericCodeGen_config = dist
OGLCompiler_config = dist
SPIRV_config = dist
sdl_mixer_config = dist
libvorbis_config = dist
libogg_config = dist
sdl_config = dist
box2d_config = dist
assetImporter_config = dist
zlibstatic_config = dist
resource_system_gnu_config = dist
else
$(error "invalid configuration $(config)")
endif
PROJECTS := lucre libpamanager engine glfw3 yaml-cpp fastgltf ufbx SpriteSheetGenerator shaderc shaderc_util SPIRV-Tools-opt SPIRV-Tools MachineIndependent OSDependent GenericCodeGen OGLCompiler SPIRV sdl_mixer libvorbis libogg sdl box2d assetImporter zlibstatic resource-system-gnu
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
lucre: engine yaml-cpp fastgltf ufbx box2d shaderc shaderc_util SPIRV-Tools-opt SPIRV-Tools MachineIndependent OSDependent GenericCodeGen OGLCompiler SPIRV assetImporter zlibstatic libpamanager sdl_mixer sdl libvorbis libogg glfw3 resource-system-gnu
ifneq (,$(lucre_config))
@echo "==== Building lucre ($(lucre_config)) ===="
@${MAKE} --no-print-directory -C . -f lucre.make config=$(lucre_config)
endif
libpamanager:
ifneq (,$(libpamanager_config))
@echo "==== Building libpamanager ($(libpamanager_config)) ===="
@${MAKE} --no-print-directory -C vendor/pamanager/libpamanager -f Makefile config=$(libpamanager_config)
endif
engine:
ifneq (,$(engine_config))
@echo "==== Building engine ($(engine_config)) ===="
@${MAKE} --no-print-directory -C . -f engine.make config=$(engine_config)
endif
glfw3:
ifneq (,$(glfw3_config))
@echo "==== Building glfw3 ($(glfw3_config)) ===="
@${MAKE} --no-print-directory -C vendor -f glfw3.make config=$(glfw3_config)
endif
yaml-cpp:
ifneq (,$(yaml_cpp_config))
@echo "==== Building yaml-cpp ($(yaml_cpp_config)) ===="
@${MAKE} --no-print-directory -C vendor -f yaml-cpp.make config=$(yaml_cpp_config)
endif
fastgltf:
ifneq (,$(fastgltf_config))
@echo "==== Building fastgltf ($(fastgltf_config)) ===="
@${MAKE} --no-print-directory -C vendor -f fastgltf.make config=$(fastgltf_config)
endif
ufbx:
ifneq (,$(ufbx_config))
@echo "==== Building ufbx ($(ufbx_config)) ===="
@${MAKE} --no-print-directory -C vendor -f ufbx.make config=$(ufbx_config)
endif
SpriteSheetGenerator: shaderc shaderc_util
ifneq (,$(SpriteSheetGenerator_config))
@echo "==== Building SpriteSheetGenerator ($(SpriteSheetGenerator_config)) ===="
@${MAKE} --no-print-directory -C vendor/atlas -f Makefile config=$(SpriteSheetGenerator_config)
endif
shaderc:
ifneq (,$(shaderc_config))
@echo "==== Building shaderc ($(shaderc_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f shaderc.make config=$(shaderc_config)
endif
shaderc_util:
ifneq (,$(shaderc_util_config))
@echo "==== Building shaderc_util ($(shaderc_util_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f shaderc_util.make config=$(shaderc_util_config)
endif
SPIRV-Tools-opt:
ifneq (,$(SPIRV_Tools_opt_config))
@echo "==== Building SPIRV-Tools-opt ($(SPIRV_Tools_opt_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f SPIRV-Tools-opt.make config=$(SPIRV_Tools_opt_config)
endif
SPIRV-Tools:
ifneq (,$(SPIRV_Tools_config))
@echo "==== Building SPIRV-Tools ($(SPIRV_Tools_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f SPIRV-Tools.make config=$(SPIRV_Tools_config)
endif
MachineIndependent:
ifneq (,$(MachineIndependent_config))
@echo "==== Building MachineIndependent ($(MachineIndependent_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f MachineIndependent.make config=$(MachineIndependent_config)
endif
OSDependent:
ifneq (,$(OSDependent_config))
@echo "==== Building OSDependent ($(OSDependent_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f OSDependent.make config=$(OSDependent_config)
endif
GenericCodeGen:
ifneq (,$(GenericCodeGen_config))
@echo "==== Building GenericCodeGen ($(GenericCodeGen_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f GenericCodeGen.make config=$(GenericCodeGen_config)
endif
OGLCompiler:
ifneq (,$(OGLCompiler_config))
@echo "==== Building OGLCompiler ($(OGLCompiler_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f OGLCompiler.make config=$(OGLCompiler_config)
endif
SPIRV:
ifneq (,$(SPIRV_config))
@echo "==== Building SPIRV ($(SPIRV_config)) ===="
@${MAKE} --no-print-directory -C vendor/shaderc -f SPIRV.make config=$(SPIRV_config)
endif
sdl_mixer:
ifneq (,$(sdl_mixer_config))
@echo "==== Building sdl_mixer ($(sdl_mixer_config)) ===="
@${MAKE} --no-print-directory -C vendor -f sdl_mixer.make config=$(sdl_mixer_config)
endif
libvorbis:
ifneq (,$(libvorbis_config))
@echo "==== Building libvorbis ($(libvorbis_config)) ===="
@${MAKE} --no-print-directory -C vendor -f libvorbis.make config=$(libvorbis_config)
endif
libogg:
ifneq (,$(libogg_config))
@echo "==== Building libogg ($(libogg_config)) ===="
@${MAKE} --no-print-directory -C vendor -f libogg.make config=$(libogg_config)
endif
sdl:
ifneq (,$(sdl_config))
@echo "==== Building sdl ($(sdl_config)) ===="
@${MAKE} --no-print-directory -C vendor -f sdl.make config=$(sdl_config)
endif
box2d:
ifneq (,$(box2d_config))
@echo "==== Building box2d ($(box2d_config)) ===="
@${MAKE} --no-print-directory -C vendor/box2d -f Makefile config=$(box2d_config)
endif
assetImporter:
ifneq (,$(assetImporter_config))
@echo "==== Building assetImporter ($(assetImporter_config)) ===="
@${MAKE} --no-print-directory -C vendor/assetImporter -f assetImporter.make config=$(assetImporter_config)
endif
zlibstatic:
ifneq (,$(zlibstatic_config))
@echo "==== Building zlibstatic ($(zlibstatic_config)) ===="
@${MAKE} --no-print-directory -C vendor/assetImporter -f zlibstatic.make config=$(zlibstatic_config)
endif
resource-system-gnu:
ifneq (,$(resource_system_gnu_config))
@echo "==== Building resource-system-gnu ($(resource_system_gnu_config)) ===="
@${MAKE} --no-print-directory -C . -f resource-system-gnu.make config=$(resource_system_gnu_config)
endif
clean:
@${MAKE} --no-print-directory -C . -f lucre.make clean
@${MAKE} --no-print-directory -C vendor/pamanager/libpamanager -f Makefile clean
@${MAKE} --no-print-directory -C . -f engine.make clean
@${MAKE} --no-print-directory -C vendor -f glfw3.make clean
@${MAKE} --no-print-directory -C vendor -f yaml-cpp.make clean
@${MAKE} --no-print-directory -C vendor -f fastgltf.make clean
@${MAKE} --no-print-directory -C vendor -f ufbx.make clean
@${MAKE} --no-print-directory -C vendor/atlas -f Makefile clean
@${MAKE} --no-print-directory -C vendor/shaderc -f shaderc.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f shaderc_util.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f SPIRV-Tools-opt.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f SPIRV-Tools.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f MachineIndependent.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f OSDependent.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f GenericCodeGen.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f OGLCompiler.make clean
@${MAKE} --no-print-directory -C vendor/shaderc -f SPIRV.make clean
@${MAKE} --no-print-directory -C vendor -f sdl_mixer.make clean
@${MAKE} --no-print-directory -C vendor -f libvorbis.make clean
@${MAKE} --no-print-directory -C vendor -f libogg.make clean
@${MAKE} --no-print-directory -C vendor -f sdl.make clean
@${MAKE} --no-print-directory -C vendor/box2d -f Makefile clean
@${MAKE} --no-print-directory -C vendor/assetImporter -f assetImporter.make clean
@${MAKE} --no-print-directory -C vendor/assetImporter -f zlibstatic.make clean
@${MAKE} --no-print-directory -C . -f resource-system-gnu.make clean
help:
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " debug"
@echo " release"
@echo " dist"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " lucre"
@echo " libpamanager"
@echo " engine"
@echo " glfw3"
@echo " yaml-cpp"
@echo " fastgltf"
@echo " ufbx"
@echo " SpriteSheetGenerator"
@echo " shaderc"
@echo " shaderc_util"
@echo " SPIRV-Tools-opt"
@echo " SPIRV-Tools"
@echo " MachineIndependent"
@echo " OSDependent"
@echo " GenericCodeGen"
@echo " OGLCompiler"
@echo " SPIRV"
@echo " sdl_mixer"
@echo " libvorbis"
@echo " libogg"
@echo " sdl"
@echo " box2d"
@echo " assetImporter"
@echo " zlibstatic"
@echo " resource-system-gnu"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"