-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
108 lines (91 loc) · 2.79 KB
/
Makefile
File metadata and controls
108 lines (91 loc) · 2.79 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
# GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug)
borealis_config = debug
resource_packer_config = debug
glad_config = debug
glfw3_config = debug
stb_config = debug
glm_config = debug
freetype_config = debug
else ifeq ($(config),release)
borealis_config = release
resource_packer_config = release
glad_config = release
glfw3_config = release
stb_config = release
glm_config = release
freetype_config = release
else
$(error "invalid configuration $(config)")
endif
PROJECTS := borealis resource_packer glad glfw3 stb glm freetype
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
borealis: glad glfw3 resource_packer freetype
ifneq (,$(borealis_config))
@echo "==== Building borealis ($(borealis_config)) ===="
@${MAKE} --no-print-directory -C . -f borealis.make config=$(borealis_config)
endif
resource_packer:
ifneq (,$(resource_packer_config))
@echo "==== Building resource_packer ($(resource_packer_config)) ===="
@${MAKE} --no-print-directory -C . -f resource_packer.make config=$(resource_packer_config)
endif
glad:
ifneq (,$(glad_config))
@echo "==== Building glad ($(glad_config)) ===="
@${MAKE} --no-print-directory -C ext/glad -f Makefile config=$(glad_config)
endif
glfw3:
ifneq (,$(glfw3_config))
@echo "==== Building glfw3 ($(glfw3_config)) ===="
@${MAKE} --no-print-directory -C ext/glfw -f Makefile config=$(glfw3_config)
endif
stb:
ifneq (,$(stb_config))
@echo "==== Building stb ($(stb_config)) ===="
@${MAKE} --no-print-directory -C ext/stb -f Makefile config=$(stb_config)
endif
glm:
ifneq (,$(glm_config))
@echo "==== Building glm ($(glm_config)) ===="
@${MAKE} --no-print-directory -C ext/glm -f Makefile config=$(glm_config)
endif
freetype:
ifneq (,$(freetype_config))
@echo "==== Building freetype ($(freetype_config)) ===="
@${MAKE} --no-print-directory -C ext/freetype -f Makefile config=$(freetype_config)
endif
clean:
@${MAKE} --no-print-directory -C . -f borealis.make clean
@${MAKE} --no-print-directory -C . -f resource_packer.make clean
@${MAKE} --no-print-directory -C ext/glad -f Makefile clean
@${MAKE} --no-print-directory -C ext/glfw -f Makefile clean
@${MAKE} --no-print-directory -C ext/stb -f Makefile clean
@${MAKE} --no-print-directory -C ext/glm -f Makefile clean
@${MAKE} --no-print-directory -C ext/freetype -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 " borealis"
@echo " resource_packer"
@echo " glad"
@echo " glfw3"
@echo " stb"
@echo " glm"
@echo " freetype"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"