-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
207 lines (196 loc) · 7.33 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
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
# Include Variable file
include ./MakefileVar.mk
include ./mk/*.mk
# Default target
.DEFAULT_GOAL := riab
# PHONY definitions
OPT_SELECTION_PHONY := option
VER_SELECTION_PHONY := version
RUN_PHONY := riab
MAIN_PHONY := $(OPT_SELECTION_PHONY) $(VER_SELECTION_PHONY) $(RUN_PHONY) $(PRELIMINARIES_PHONY) $(INFRA_PHONY) $(EPC_PHONY) $(RIC_PHONY) $(RAN_PHONY) $(TEST_PHONY) $(RESET_CLEAN_PHONY) $(UTIL_PHONY) $(OBS_PHONY) $(ROUTING_PHONY)
.PHONY: $(MAINPHONY)
$(WORKSPACE):
mkdir -p $(WORKSPACE)
$(M): | $(WORKSPACE) $(BUILD)
mkdir -p $(M)
$(BUILD): | $(WORKSPACE)
mkdir -p $(BUILD)
ifeq ($(OPT), ransim)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op ric
@echo Done
else ifeq ($(OPT), oai)
riab: option version preliminaries infra-k8s infra-fabric routing-quagga infra-atomix infra-onos-op omec routing-omec ric oai
@echo Done
else ifeq ($(OPT), oai-ran-cu-du)
riab: option version preliminaries infra-k8s infra-fabric-cu-du oai-enb-cu-hw oai-enb-du routing-hw-oai
@echo Done
else ifeq ($(OPT), ric)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op ric routing-ric-external-ran
@echo Done
else ifeq ($(OPT), ric-e2ap101)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op ric routing-ric-external-ran
@echo Done
else ifeq ($(OPT), fbah)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op infra-prom-op-servicemonitor ric enable-fbah-gui
@echo Done
else ifeq ($(OPT), mlb)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op ric
@echo Done
else ifeq ($(OPT), mho)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op ric
@echo Done
else ifeq ($(OPT), rimedots)
riab: option version preliminaries infra-k8s infra-atomix infra-onos-op ric
@echo Done
else
riab: option version
@echo "Invalid option"
@echo "Option:" $(OPT)
endif
$(M)/repos: | $(M)
mkdir -p $(CHARTDIR)
cd $(CHARTDIR)
@if [[ ! -d "$(AETHERCHARTDIR)" ]]; then \
echo "aether-helm-chart repo is not in $(CHARTDIR) directory. Start to clone - it requires HTTPS key"; \
git clone $(CORD_GERRIT_URL) $(AETHERCHARTDIR) || true; \
fi
@if [[ ! -d "$(SDRANCHARTDIR)" ]]; then \
echo "sdran-helm-chart repo is not in $(CHARTDIR) directory. Start to clone - it requires Github credential"; \
git clone $(ONOS_GITHUB_URL)/sdran-helm-charts $(SDRANCHARTDIR) || true; \
fi
touch $@
option: | $(M) $(M)/repos
ifeq ($(OPT), ransim)
$(eval OPT=ransim)
$(eval HELM_ARGS=$(HELM_ARGS_RANSIM))
@echo "Helm arguments for ransim: $(HELM_ARGS_RANSIM)"
else ifeq ($(OPT), oai)
$(eval OPT=oai)
$(eval HELM_ARGS=$(HELM_ARGS_OAI))
@echo "Helm arguments for oai: $(HELM_ARGS_OAI)"
else ifeq ($(OPT), oai-ran-cu-du)
$(eval OPT=oai-ran-cu-du)
$(eval HELM_ARGS=$(HELM_ARGS_OAI))
@echo "Helm arguments for oai: $(HELM_ARGS_OAI)"
else ifeq ($(OPT), ric)
$(eval OPT=ric)
$(eval HELM_ARGS=$(HELM_ARGS_RIC))
@echo "Helm arguments for ric: $(HELM_ARGS_RIC)"
else ifeq ($(OPT), ric-e2ap101)
$(eval OPT=ric-e2ap101)
$(eval HELM_ARGS=$(HELM_ARGS_RIC_E2AP101))
@echo "Helm arguments for ric: $(HELM_ARGS_RIC_E2AP101)"
else ifeq ($(OPT), fbah)
$(eval OPT=fbah)
$(eval HELM_ARGS=$(HELM_ARGS_FBAH))
@echo "Helm arguments for Facebook-AirHop usecase: $(HELM_ARGS_FBAH)"
else ifeq ($(OPT), mlb)
$(eval OPT=ransim)
$(eval HELM_ARGS=$(HELM_ARGS_MLB))
@echo "Helm arguments for mlb: $(HELM_ARGS_MLB)"
else ifeq ($(OPT), mho)
$(eval OPT=ransim)
$(eval HELM_ARGS=$(HELM_ARGS_MHO))
@echo "Helm arguments for mho: $(HELM_ARGS_MHO)"
else ifeq ($(OPT), rimedots)
$(eval OPT=ransim)
$(eval HELM_ARGS=$(HELM_ARGS_RIMEDOTS))
@echo "Helm arguments for rimedots: $(HELM_ARGS_RIMEDOTS)"
else
$(eval OPT=ransim)
$(eval HELM_ARGS=$(HELM_ARGS_RANSIM))
@echo "Helm arguments for ransim (default): $(HELM_ARGS_RANSIM)"
endif
version: | $(M) $(M)/repos
ifeq ($(VER), v1.0.0)
$(eval VER=v1.0.0)
$(eval HELM_VALUES=$(HELM_VALUES_V1.0.0))
@echo "Helm values.yaml file: $(HELM_VALUES_V1.0.0)"
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.0.0)
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-V1.0.0)
else ifeq ($(VER), v1.1.0)
$(eval VER=v1.1.0)
$(eval HELM_VALUES=$(HELM_VALUES_V1.1.0))
@echo "Helm values.yaml file: $(HELM_VALUES_V1.1.0)"
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.1.0)
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-V1.0.0)
else ifeq ($(VER), v1.1.1)
$(eval VER=v1.1.1)
$(eval HELM_VALUES=$(HELM_VALUES_V1.1.1))
@echo "Helm values.yaml file: $(HELM_VALUES_V1.1.1)"
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.1.1)
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-V1.0.0)
else ifeq ($(VER), v1.2.0)
$(eval VER=v1.2.0)
$(eval HELM_VALUES=$(HELM_VALUES_V1.2.0))
@echo "Helm values.yaml file: $(HELM_VALUES_V1.2.0)"
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.2.0)
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-V1.0.0)
else ifeq ($(VER), v1.3.0)
$(eval VER=v1.3.0)
$(eval HELM_VALUES=$(HELM_VALUES_V1.3.0))
@echo "Helm values.yaml file: $(HELM_VALUES_V1.3.0)"
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-V1.3.0)
ifeq ($(OPT), oai)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-E2AP101-V1.3.0)
else ifeq ($(OPT), ric-e2ap101)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-E2AP101-V1.3.0)
else
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.3.0)
endif
else ifeq ($(VER), v1.4.0)
$(eval VER=v1.4.0)
$(eval HELM_VALUES=$(HELM_VALUES_V1.4.0))
@echo "Helm values.yaml file: $(HELM_VALUES_V1.4.0)"
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-V1.4.0)
ifeq ($(OPT), oai)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.4.0)
else ifeq ($(OPT), ric-e2ap101)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-E2AP101-V1.4.0)
else
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-V1.4.0)
endif
else ifeq ($(VER), stable)
$(eval VER=stable)
$(eval HELM_VALUES=$(HELM_VALUES_STABLE))
@echo "Helm values.yaml file: $(HELM_VALUES_STABLE)"
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-LATEST)
ifeq ($(OPT), oai)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-LATEST)
else ifeq ($(OPT), ric-e2ap101)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-E2AP101-LATEST)
else
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-LATEST)
endif
else ifeq ($(VER), latest)
$(eval VER=latest)
$(eval HELM_VALUES=$(HELM_VALUES_LATEST))
@echo "Helm values.yaml file: $(HELM_VALUES_LATEST)"
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-LATEST)
ifeq ($(OPT), oai)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-LATEST)
else ifeq ($(OPT), ric-e2ap101)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-E2AP101-LATEST)
else
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-LATEST)
endif
else ifeq ($(VER), dev)
$(eval VER=dev)
$(eval HELM_VALUES=$(HELM_VALUES_DEV))
@echo "Helm values.yaml file: $(HELM_VALUES_DEV)"
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-LATEST)
else
$(eval VER=stable)
$(eval HELM_VALUES=$(HELM_VALUES_STABLE))
@echo "Helm values.yaml file: $(HELM_VALUES_STABLE)"
@cd $(AETHERCHARTDIR); git checkout $(AETHERCHARTCID-LATEST)
ifeq ($(OPT), oai)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-LATEST)
else ifeq ($(OPT), ric-e2ap101)
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-E2AP101-LATEST)
else
@cd $(SDRANCHARTDIR); git checkout $(SDRANCHARTCID-LATEST)
endif
endif