forked from Jaysmito101/TerraForge3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
178 lines (154 loc) · 5.82 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
# Alternative GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug)
GLFW_config = debug
Glad_config = debug
ImGui_config = debug
ImNodes_config = debug
ImPlot_config = debug
ImGuiNodeEditor_config = debug
Zip_config = debug
ImColorTextEdit_config = debug
Lua_config = debug
Assimp_config = debug
MuParser_config = debug
TerraForge3DLib_config = debug
TerraForge3D_config = debug
ModuleMaker_config = debug
else ifeq ($(config),release)
GLFW_config = release
Glad_config = release
ImGui_config = release
ImNodes_config = release
ImPlot_config = release
ImGuiNodeEditor_config = release
Zip_config = release
ImColorTextEdit_config = release
Lua_config = release
Assimp_config = release
MuParser_config = release
TerraForge3DLib_config = release
TerraForge3D_config = release
ModuleMaker_config = release
else
$(error "invalid configuration $(config)")
endif
PROJECTS := GLFW Glad ImGui ImNodes ImPlot ImGuiNodeEditor Zip ImColorTextEdit Lua Assimp MuParser TerraForge3DLib TerraForge3D ModuleMaker
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
GLFW:
ifneq (,$(GLFW_config))
@echo "==== Building GLFW ($(GLFW_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/glfw -f Makefile config=$(GLFW_config)
endif
Glad:
ifneq (,$(Glad_config))
@echo "==== Building Glad ($(Glad_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/glad -f Makefile config=$(Glad_config)
endif
ImGui:
ifneq (,$(ImGui_config))
@echo "==== Building ImGui ($(ImGui_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/imgui -f Makefile config=$(ImGui_config)
endif
ImNodes: ImGui
ifneq (,$(ImNodes_config))
@echo "==== Building ImNodes ($(ImNodes_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/imnodes -f Makefile config=$(ImNodes_config)
endif
ImPlot: ImGui
ifneq (,$(ImPlot_config))
@echo "==== Building ImPlot ($(ImPlot_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/implot -f Makefile config=$(ImPlot_config)
endif
ImGuiNodeEditor: ImGui
ifneq (,$(ImGuiNodeEditor_config))
@echo "==== Building ImGuiNodeEditor ($(ImGuiNodeEditor_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/imgui-node-editor -f Makefile config=$(ImGuiNodeEditor_config)
endif
Zip:
ifneq (,$(Zip_config))
@echo "==== Building Zip ($(Zip_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/zip -f Makefile config=$(Zip_config)
endif
ImColorTextEdit: ImGui
ifneq (,$(ImColorTextEdit_config))
@echo "==== Building ImColorTextEdit ($(ImColorTextEdit_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/text-editor -f Makefile config=$(ImColorTextEdit_config)
endif
Lua:
ifneq (,$(Lua_config))
@echo "==== Building Lua ($(Lua_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/lua -f Makefile config=$(Lua_config)
endif
Assimp:
ifneq (,$(Assimp_config))
@echo "==== Building Assimp ($(Assimp_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/assimp -f Makefile config=$(Assimp_config)
endif
MuParser:
ifneq (,$(MuParser_config))
@echo "==== Building MuParser ($(MuParser_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D/vendor/muparser -f Makefile config=$(MuParser_config)
endif
TerraForge3DLib: GLFW Glad Zip ImGui ImNodes ImPlot ImGuiNodeEditor ImColorTextEdit Lua MuParser Assimp
ifneq (,$(TerraForge3DLib_config))
@echo "==== Building TerraForge3DLib ($(TerraForge3DLib_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D -f TerraForge3DLib.make config=$(TerraForge3DLib_config)
endif
TerraForge3D: TerraForge3DLib GLFW Glad Zip ImGui ImNodes ImPlot ImGuiNodeEditor ImColorTextEdit Lua MuParser Assimp
ifneq (,$(TerraForge3D_config))
@echo "==== Building TerraForge3D ($(TerraForge3D_config)) ===="
@${MAKE} --no-print-directory -C TerraForge3D -f TerraForge3D.make config=$(TerraForge3D_config)
endif
ModuleMaker: ImGui Zip Glad GLFW
ifneq (,$(ModuleMaker_config))
@echo "==== Building ModuleMaker ($(ModuleMaker_config)) ===="
@${MAKE} --no-print-directory -C Tools/ModuleMaker -f Makefile config=$(ModuleMaker_config)
endif
clean:
@${MAKE} --no-print-directory -C TerraForge3D/vendor/glfw -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/glad -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/imgui -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/imnodes -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/implot -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/imgui-node-editor -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/zip -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/text-editor -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/lua -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/assimp -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D/vendor/muparser -f Makefile clean
@${MAKE} --no-print-directory -C TerraForge3D -f TerraForge3DLib.make clean
@${MAKE} --no-print-directory -C TerraForge3D -f TerraForge3D.make clean
@${MAKE} --no-print-directory -C Tools/ModuleMaker -f Makefile clean
help:
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " debug"
@echo " release"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " GLFW"
@echo " Glad"
@echo " ImGui"
@echo " ImNodes"
@echo " ImPlot"
@echo " ImGuiNodeEditor"
@echo " Zip"
@echo " ImColorTextEdit"
@echo " Lua"
@echo " Assimp"
@echo " MuParser"
@echo " TerraForge3DLib"
@echo " TerraForge3D"
@echo " ModuleMaker"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"