-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
108 lines (92 loc) · 2.7 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
# GNU Make workspace makefile autogenerated by Premake
.NOTPARALLEL:
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug)
Glad_config = debug
GLFW_config = debug
ImGui_config = debug
SPIRVCross_config = debug
Snow_config = debug
Glacier_config = debug
endif
ifeq ($(config),release)
Glad_config = release
GLFW_config = release
ImGui_config = release
SPIRVCross_config = release
Snow_config = release
Glacier_config = release
endif
ifeq ($(config),dist)
Glad_config = dist
GLFW_config = dist
ImGui_config = dist
SPIRVCross_config = dist
Snow_config = dist
Glacier_config = dist
endif
PROJECTS := Glad GLFW ImGui SPIRVCross Snow Glacier
.PHONY: all clean help $(PROJECTS) Vendor
all: $(PROJECTS)
Vendor: GLFW Glad ImGui SPIRVCross
Glad:
ifneq (,$(Glad_config))
@echo "==== Building Glad ($(Glad_config)) ===="
@${MAKE} --no-print-directory -C Snow/vendor/Glad -f Makefile config=$(Glad_config)
endif
GLFW:
ifneq (,$(GLFW_config))
@echo "==== Building GLFW ($(GLFW_config)) ===="
@${MAKE} --no-print-directory -C Snow/vendor/GLFW -f Makefile config=$(GLFW_config)
endif
ImGui:
ifneq (,$(ImGui_config))
@echo "==== Building ImGui ($(ImGui_config)) ===="
@${MAKE} --no-print-directory -C Snow/vendor/imgui -f Makefile config=$(ImGui_config)
endif
SPIRVCross:
ifneq (,$(SPIRVCross_config))
@echo "==== Building SPIRVCross ($(SPIRVCross_config)) ===="
@${MAKE} --no-print-directory -C Snow/vendor/SPIRV-Cross -f Makefile config=$(SPIRVCross_config)
endif
Snow: Glad ImGui GLFW SPIRVCross
ifneq (,$(Snow_config))
@echo "==== Building Snow ($(Snow_config)) ===="
@${MAKE} --no-print-directory -C Snow -f Makefile config=$(Snow_config)
endif
Glacier: Snow Glad ImGui GLFW SPIRVCross
ifneq (,$(Glacier_config))
@echo "==== Building Glacier ($(Glacier_config)) ===="
@${MAKE} --no-print-directory -C Glacier -f Makefile config=$(Glacier_config)
endif
clean:
@${MAKE} --no-print-directory -C Snow/vendor/Glad -f Makefile clean
@${MAKE} --no-print-directory -C Snow/vendor/GLFW -f Makefile clean
@${MAKE} --no-print-directory -C Snow/vendor/imgui -f Makefile clean
@${MAKE} --no-print-directory -C Snow/vendor/SPIRV-Cross -f Makefile clean
@${MAKE} --no-print-directory -C Snow -f Makefile clean
@${MAKE} --no-print-directory -C Glacier -f Makefile 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 " Glad"
@echo " GLFW"
@echo " ImGui"
@echo " SPIRVCross"
@echo " Snow"
@echo " Glacier"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"