[ JIRA Id - ODUHIGH-573 ] Code changes upgraded to Gcc version 11.4.0
[o-du/l2.git] / build / odu / makefile
1 ################################################################################
2 #   Copyright (c) [2017-2019] [Radisys]                                        #
3 #                                                                              #
4 #   Licensed under the Apache License, Version 2.0 (the "License");            #
5 #   you may not use this file except in compliance with the License.           #
6 #   You may obtain a copy of the License at                                    #
7 #                                                                              #
8 #       http://www.apache.org/licenses/LICENSE-2.0                             #
9 #                                                                              #
10 #   Unless required by applicable law or agreed to in writing, software        #
11 #   distributed under the License is distributed on an "AS IS" BASIS,          #
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
13 #   See the License for the specific language governing permissions and        #
14 #   limitations under the License.                                             #
15 ################################################################################
16
17 # Master makefile
18
19 # Identify the location our software which is used by rest
20 # of the build scripts
21
22 include ../common/rsys_fancy.mak
23 include ../common/env.mak
24
25 RULE=$(COLOR_RED)
26 OPTS=$(COLOR_GREEN)
27 NORM=$(REVERT_COLOR)
28
29 # For improved speed
30 CPUINFO=`cat /proc/cpuinfo | grep processor| wc -l`
31 ifeq ($(CPUINFO), 1)
32    NUM_PARALLEL=1
33 else
34       NUM_PARALLEL=$(shell echo $(CPUINFO) - 1 |bc)
35 endif
36
37 ifeq ($(FAST), 1)
38       NUM_PARALLEL=$(shell echo $(CPUINFO) + 2 |bc)
39 endif
40
41 PARALLEL_COMP=-j $(NUM_PARALLEL)
42
43 # Different options to CPUH and CPUL builds
44 # # Other apsects of tool chain set here
45 # # These should be made available appropriately to the builds
46 ifeq ($(MACHINE),BIT64)
47 ifeq ($(COVERAGE),ENABLE)
48 CC          =gcc -m64 --coverage
49 else
50 CC          =gcc -m64
51 endif
52 CC_STRIP    =strip --strip-all
53 CC_LINKER   =gcc -m64
54 CCPP        =g++ -m64
55 CCPP_LINKER =g++ -m64
56 else
57 CC          =gcc -m32
58 CC_STRIP    =strip --strip-all
59 CC_LINKER   =gcc -m32
60 CCPP        =g++ -m32
61 CCPP_LINKER =g++ -m32
62 endif
63
64 CC1= $(CC)
65 CCPP1= $(CCPP)
66
67 ifeq ($(MODE),TDD)
68 CNM_ENABLE = YES
69 else
70 CNM_ENABLE=NO
71 endif
72
73 #-----------------------------------------------------------------------
74 # macro for output file name and makefile name
75 #
76
77 PLTFRM_FLAGS=-UMSPD -DODU -DINTEL_FAPI -UODU_MEMORY_DEBUG_LOG -DDEBUG_ASN_PRINT -UDEBUG_PRINT -DERROR_PRINT -USTART_DL_UL_DATA -UNR_DRX -UCALL_FLOW_DEBUG_LOG -UODU_SLOT_IND_DEBUG_LOG 
78
79 ifeq ($(MODE),TDD)
80    PLTFRM_FLAGS += -DNR_TDD
81 endif
82 ifeq ($(CA_ENABLE),YES)
83    PLTFRM_FLAGS += -DCA_ENABLE=YES
84 endif
85
86 ifeq ($(NODE),TEST_STUB)
87         PLTFRM_FLAGS+=-DODU_TEST_STUB
88 endif
89 ifdef PHY
90    PLTFRM_FLAGS+=-DTHREAD_AFFINITY
91 endif   
92 ifeq ($(PHY), INTEL_L1)
93         PLTFRM_FLAGS+=-DSS_USE_WLS_MEM -DINTEL_WLS_MEM -DDEBUG_MODE -DINTEL_L1_V20_03_ONWARDS -DINTEL_THREAD_AFFINITY
94 ifeq ($(PHY_MODE),TIMER)
95         PLTFRM_FLAGS+=-DINTEL_TIMER_MODE
96 endif
97 endif
98
99 ifeq ($(O1_ENABLE),YES)
100         PLTFRM_FLAGS+=-DO1_ENABLE
101 endif
102
103 # The include options get merged with the options needed by
104 # # the called makefiles and hence we export these to make them
105 # # available to them.
106 BUILD=i686-linux
107
108 # The called makefiles depend on these macros and these need to be exported
109 export PLTFRM
110 export PLTFRM_FLAGS
111 export BUILD
112 export I_OPTS
113
114 # Add to the linker options the platform specific components
115 L_OPTS+=-lnsl -lrt -lm -lpthread -lsctp -lxml2
116
117 ifeq ($(PHY), INTEL_L1)
118         L_OPTS+=-L/root/Intel-L1-20.11.1/phy/wls_lib/ -lwls                         \
119         -lhugetlbfs -lnuma -ldl -L/root/Intel-L1-20.11.1/dpdk-20.11.1/build/lib                        \
120         -lrte_gso -lrte_acl -lrte_hash -lrte_bbdev -lrte_ip_frag -lrte_bitratestats -lrte_ipsec        \
121         -lrte_bpf -lrte_jobstats -lrte_telemetry -lrte_kni -lrte_kvargs -lrte_latencystats -lrte_port  \
122         -lrte_lpm -lrte_power -lrte_mbuf -lrte_rawdev -lrte_member -lrte_cfgfile -lrte_mempool         \
123                   -lrte_cmdline -lrte_rcu -lrte_compressdev -lrte_reorder -lrte_cryptodev -lrte_rib              \
124                   -lrte_distributor -lrte_meter  -lrte_ring -lrte_eal -lrte_metrics -lrte_sched -lrte_efd        \
125                   -lrte_net -lrte_security -lrte_ethdev -lrte_pci -lrte_stack -lrte_eventdev -lrte_pdump         \
126                   -lrte_table -lrte_fib -lrte_pipeline -lrte_timer -lrte_flow_classify -lrte_vhost               \
127         -lrte_gro
128 endif
129
130 ifeq ($(O1_ENABLE),YES)
131   L_OPTS+=-lsysrepo -lyang
132   L_OPTS+=-lsysrepo-cpp -lyang-cpp
133 L_OPTS+= -lnetconf2 -lcjson -lcurl
134   L_OPTS+=-lstdc++
135 endif
136
137 # Export some of the flags expected from the command line.
138 # # These macros are made available for the makefiles called from this makefile
139 export BOARD
140 export MACHINE
141 export MODE
142 export OAM_ENABLE
143 export CNM_ENABLE
144 export TEXT_LOG
145 export CA_ENABLE
146 export O1_ENABLE
147
148 help:
149                 @echo -e "******************************************************************"
150                 @echo -e "BUILD COMMAND            DESCRIPTION                              "
151                 @echo -e "------------------------------------------------------------------"
152                 @echo -e "$(RULE)odu       - Builds all components of ODU$(NORM)"
153                 @echo -e "$(RULE)cu_stub   - Builds all CU Stub$(NORM)"
154                 @echo -e "$(RULE)ric_stub   - Builds all RIC_Stub$(NORM)"
155                 @echo -e "$(RULE)clean_odu - clean up ODU$(NORM)"
156                 @echo -e "$(RULE)clean_cu  - clean up CU Stub$(NORM)"
157                 @echo -e "$(RULE)clean_ric  - clean up RIC Stub$(NORM)"
158                 @echo -e "$(RULE)clean_all - cleanup everything$(NORM)"
159                 @echo -e "$(OPTS)options: $(NORM)"
160                 @echo -e "$(OPTS)    MACHINE=BIT64/BIT32  - Default is BIT32$(NORM)"
161                 @echo -e "$(OPTS)    NODE=TEST_STUB       - Mandatory option for cu_stub/ric_stub$(NORM)"
162                 @echo -e "$(OPTS)    MODE=TDD             - If not specified, MODE=FDD$(NORM)"
163                 @echo -e "$(OPTS)    PHY=INTEL_L1         - If not specified, Phy stub is used$(NORM)"
164                 @echo -e "$(OPTS)    PHY_MODE=TIMER       - Testing mode for INTEL_L1"
165                 @echo -e "$(OPTS)    COVERAGE=ENABLE      - To record the code coverage stats. Disabled by default"
166                 @echo -e "******************************************************************"
167
168 prepare_dirs:
169         $(Q)echo -e "Preparing directories for build..."
170         $(Q)mkdir -p $(BUILD_DIR)/obj/odu
171         $(Q)mkdir -p $(LIB_ROOT)/odu
172         $(Q)mkdir -p $(ROOT_DIR)/libs/
173         $(Q)mkdir -p $(BIN_DIR)/odu
174         $(Q)mkdir -p $(ROOT_DIR)/bin
175         $(Q)echo -e "Directories are successfully prepared"
176
177 prepare_cu_dirs:
178          $(Q)echo -e "Preparing directories for build..."
179          $(Q)mkdir -p $(BUILD_DIR)/obj/cu_stub
180          $(Q)mkdir -p $(LIB_ROOT)/cu_stub
181          $(Q)mkdir -p $(BIN_DIR)/cu_stub
182          $(Q)echo -e "Directories are successfully prepared"
183
184 prepare_ric_dirs:
185          $(Q)echo -e "Preparing directories for build..."
186          $(Q)mkdir -p $(BUILD_DIR)/obj/ric_stub
187          $(Q)mkdir -p $(LIB_ROOT)/ric_stub
188          $(Q)mkdir -p $(BIN_DIR)/ric_stub
189          $(Q)echo -e "Directories are successfully prepared"
190
191 du:
192                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_common.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
193                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_f1ap.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
194                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
195                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap_kpm.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
196                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_rrc.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
197                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/du_app.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
198                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/rlc.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
199                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cm.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
200                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mac.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
201                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/sch.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
202                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
203                 
204 ifneq ($(PHY), INTEL_L1)
205                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/phy_stub.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
206 endif
207 ifeq ($(O1_ENABLE),YES)
208                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
209                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
210 endif
211
212 link_du: du
213                    $(Q)$(CC1) -g -o $(OBJ_ROOT)/odu/odu -Wl,-R../lib/:. $(OBJ_ROOT)/odu/*.o\
214                         $(L_OPTS) -L$(LIB_ROOT)/odu -L$(ROOT_DIR)/libs/odu 
215
216 clean_odu: 
217                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/du_app.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
218                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_common.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
219                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_f1ap.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
220                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
221                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap_kpm.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
222                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_rrc.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
223                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/rlc.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
224                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cm.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
225                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mac.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
226                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/sch.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
227                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
228                 
229 ifneq ($(PHY), INTEL_L1)
230                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/phy_stub.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CC1)'
231 endif
232 ifeq ($(O1_ENABLE),YES)
233                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
234                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak clean OBJ_DIR=$(OBJ_ROOT)/odu LIB_DIR=$(LIB_ROOT)/odu LOG_DIR=$(LOG_ROOT)/odu CC='$(CCPP1)'
235 endif
236                 $(Q)rm -rf $(OBJ_ROOT)/odu/*
237                 $(Q)rm -rf $(LIB_ROOT)/odu/*
238                 $(Q)rm -rf $(BIN_DIR)/odu/*
239            $(Q)rm -rf $(ROOT_DIR)/bin/odu
240            $(Q)echo -e "***** ODU CLEAN COMPLETE *****"
241
242 clean_all: clean_odu clean_cu clean_ric
243                           $(Q)rm -rf $(OBJ_ROOT)
244                           $(Q)rm -rf $(LIB_ROOT)
245                           $(Q)rm -rf $(LOG_ROOT)
246                           $(Q)rm -rf $(BIN_DIR)
247                           $(Q)rm -rf $(ROOT_DIR)/bin
248                           $(Q)rm -rf $(ROOT_DIR)/libs
249
250 cu: 
251          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cu_stub.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
252          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_common.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
253          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_f1ap.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
254          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_rrc.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
255          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cm.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
256          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
257 ifeq ($(O1_ENABLE),YES)
258                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CCPP1)'
259                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CCPP1)'
260 endif
261
262 clean_cu:
263          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cu_stub.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
264          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_common.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
265          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_f1ap.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
266          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_rrc.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
267          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cm.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
268          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CC1)'
269 ifeq ($(O1_ENABLE),YES)
270                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CCPP1)'
271                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak clean OBJ_DIR=$(OBJ_ROOT)/cu_stub LIB_DIR=$(LIB_ROOT)/cu_stub LOG_DIR=$(LOG_ROOT)/cu_stub CC='$(CCPP1)'
272 endif
273          $(Q)rm -rf $(OBJ_ROOT)/cu_stub/*
274          $(Q)rm -rf $(LIB_ROOT)/cu_stub/*
275          $(Q)rm -rf $(BIN_DIR)/cu_stub/*
276          $(Q)rm -rf $(ROOT_DIR)/bin/cu_stub
277          $(Q)echo -e "***** CU STUB CLEAN COMPLETE *****"
278
279 link_cu: 
280                 $(Q)$(CC1) -g -o $(OBJ_ROOT)/cu_stub/cu_stub -Wl,-R../lib/:. $(OBJ_ROOT)/cu_stub/*.o\
281                 $(L_OPTS) -L$(LIB_ROOT)/cu_stub -L$(ROOT_DIR)/libs/cu_stub
282                 $(Q)cp -f ./obj/cu_stub/cu_stub ./bin/cu_stub
283                 $(Q)cp -rf ./bin/cu_stub $(ROOT_DIR)/bin/
284                 $(Q)cp -f ../scripts/start_cu_stub_logging.sh $(ROOT_DIR)/bin/cu_stub
285                 $(Q)echo -e "***** CU STUB BUILD COMPLETE *****"
286
287 ric: 
288          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ric_stub.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
289          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_common.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
290          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
291          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap_kpm.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
292          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cm.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
293          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
294 ifeq ($(O1_ENABLE),YES)
295                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CCPP1)'
296                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CCPP1)'
297 endif
298
299 clean_ric:
300          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ric_stub.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
301          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_common.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
302          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
303          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_e2ap_kpm.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
304          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/asn_rrc.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
305          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/cm.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
306          $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/mt.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CC1)'
307 ifeq ($(O1_ENABLE),YES)
308                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/o1.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CCPP1)'
309                 $(Q)$(MAKE) -j -f $(COM_BUILD_DIR)/ves.mak clean OBJ_DIR=$(OBJ_ROOT)/ric_stub LIB_DIR=$(LIB_ROOT)/ric_stub LOG_DIR=$(LOG_ROOT)/ric_stub CC='$(CCPP1)'
310 endif
311          $(Q)rm -rf $(OBJ_ROOT)/ric_stub/*
312          $(Q)rm -rf $(LIB_ROOT)/ric_stub/*
313          $(Q)rm -rf $(BIN_DIR)/ric_stub/*
314          $(Q)rm -rf $(ROOT_DIR)/bin/ric_stub
315          $(Q)echo -e "***** RIC STUB CLEAN COMPLETE *****"
316
317
318 link_ric: 
319                 $(Q)$(CC1) -g -o $(OBJ_ROOT)/ric_stub/ric_stub -Wl,-R../lib/:. $(OBJ_ROOT)/ric_stub/*.o\
320                 $(L_OPTS) -L$(LIB_ROOT)/ric_stub -L$(ROOT_DIR)/libs/ric_stub
321                 $(Q)cp -f ./obj/ric_stub/ric_stub ./bin/ric_stub
322                 $(Q)cp -rf ./bin/ric_stub $(ROOT_DIR)/bin/
323                 $(Q)cp -f ../scripts/start_ric_stub_logging.sh $(ROOT_DIR)/bin/ric_stub
324                 $(Q)echo -e "***** RIC STUB BUILD COMPLETE *****"
325
326
327 copy_build: link_du
328                         $(Q)cp -f ./obj/odu/odu ./bin/odu
329                         $(Q)cp -rf ./bin/odu $(ROOT_DIR)/bin/
330                         $(Q)cp -f ../scripts/start_du_logging.sh $(ROOT_DIR)/bin/odu
331                         $(Q)cp -rf ../config/ $(ROOT_DIR)/bin/odu
332                         $(Q)cp -f ./lib/odu/*.a $(ROOT_DIR)/libs/
333                    $(Q)echo -e "***** BUILD COMPLETE *****"
334
335 odu: prepare_dirs copy_build
336 cu_stub: prepare_cu_dirs cu link_cu
337 ric_stub: prepare_ric_dirs ric link_ric
338
339 #**********************************************************************
340 #         End of file
341 #**********************************************************************