-
Notifications
You must be signed in to change notification settings - Fork 175
/
Makefile
128 lines (109 loc) · 3.53 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
# Alternative GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug)
lua_config = debug
mimalloc_config = debug
moon_config = debug
sharetable_config = debug
crypt_config = debug
pb_config = debug
lfmt_config = debug
mongo_config = debug
lualib_config = debug
else ifeq ($(config),release)
lua_config = release
mimalloc_config = release
moon_config = release
sharetable_config = release
crypt_config = release
pb_config = release
lfmt_config = release
mongo_config = release
lualib_config = release
else
$(error "invalid configuration $(config)")
endif
PROJECTS := lua mimalloc moon sharetable crypt pb lfmt mongo lualib
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
lua:
ifneq (,$(lua_config))
@echo "==== Building lua ($(lua_config)) ===="
@${MAKE} --no-print-directory -C build/projects/lua -f Makefile config=$(lua_config)
endif
mimalloc:
ifneq (,$(mimalloc_config))
@echo "==== Building mimalloc ($(mimalloc_config)) ===="
@${MAKE} --no-print-directory -C build/projects/mimalloc -f Makefile config=$(mimalloc_config)
endif
moon: lua lualib crypt pb sharetable mongo mimalloc lfmt
ifneq (,$(moon_config))
@echo "==== Building moon ($(moon_config)) ===="
@${MAKE} --no-print-directory -C build/projects/moon -f Makefile config=$(moon_config)
endif
sharetable:
ifneq (,$(sharetable_config))
@echo "==== Building sharetable ($(sharetable_config)) ===="
@${MAKE} --no-print-directory -C build/projects/sharetable -f Makefile config=$(sharetable_config)
endif
crypt:
ifneq (,$(crypt_config))
@echo "==== Building crypt ($(crypt_config)) ===="
@${MAKE} --no-print-directory -C build/projects/crypt -f Makefile config=$(crypt_config)
endif
pb:
ifneq (,$(pb_config))
@echo "==== Building pb ($(pb_config)) ===="
@${MAKE} --no-print-directory -C build/projects/pb -f Makefile config=$(pb_config)
endif
lfmt:
ifneq (,$(lfmt_config))
@echo "==== Building lfmt ($(lfmt_config)) ===="
@${MAKE} --no-print-directory -C build/projects/lfmt -f Makefile config=$(lfmt_config)
endif
mongo:
ifneq (,$(mongo_config))
@echo "==== Building mongo ($(mongo_config)) ===="
@${MAKE} --no-print-directory -C build/projects/mongo -f Makefile config=$(mongo_config)
endif
lualib:
ifneq (,$(lualib_config))
@echo "==== Building lualib ($(lualib_config)) ===="
@${MAKE} --no-print-directory -C build/projects/lualib -f Makefile config=$(lualib_config)
endif
clean:
@${MAKE} --no-print-directory -C build/projects/lua -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/mimalloc -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/moon -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/sharetable -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/crypt -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/pb -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/lfmt -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/mongo -f Makefile clean
@${MAKE} --no-print-directory -C build/projects/lualib -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 " lua"
@echo " mimalloc"
@echo " moon"
@echo " sharetable"
@echo " crypt"
@echo " pb"
@echo " lfmt"
@echo " mongo"
@echo " lualib"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"