1 ################################################################################
2 # Copyright (c) [2017-2019] [Radisys] #
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 #
8 # http://www.apache.org/licenses/LICENSE-2.0 #
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 ################################################################################
17 #/********************************************************************16**
19 # Name: gNodeB Sample Application
23 # Desc: Compile, assemble and link product software for
24 # various configurations. Further comments are
25 # embedded in the file.
27 # This file supports a variety of environments and
28 # build targets. The default build target will be the
29 # portable target for the Linu 2.4.x with GNU C(gcc)
31 # Env: Linux 2.4.x with GNU C (gcc)
35 #********************************************************************21*/
36 #=======================================================================
42 # Check for verbose build
50 #-DSSINT2 -DSS_TICKS_SEC=100
52 SS_FLAGS=-DSS -DSS_MT -DSUNOS -DSS_LINUX -UCONRD -UNOFILESYS -USS_DEBG_MEM_CORRUP_LEVEL1 \
53 -DSS_TICKS_SEC=100 -USSI_DEBUG_LEVEL1 -USS_LICENSE_CHECK -DANSI -D_GNU_SOURCE\
54 -D_REENTRANT -D__EXTENSIONS__ -DDEBUGNOEXIT
56 # Flags to be used if text logging is enabled
57 TEXT_LOGGING = -DRLOG_ENABLE_TEXT_LOGGING -DRLOG_DEBUG_MODE
59 ifeq ($(INSTRUMENTATION), YES)
60 INSTRUMENTATION_FLAGS = -DSS_MEM_CORRUPTION_DETECTION
63 # Flags pertaining to the functionality of TeNB are included here
64 TENB_FLAGS=-DLTERRC_REL9 -DEGTP_U_REL_9 -UMAC_SCH_STATS -USCH_STATS \
65 -DTENB_TTI_PERF -DAES -DLTE_RRC_DISSECTOR -DRSYS_WIRESHARK
67 #ifneq ($(PLTFRM), PAL)
68 #TENB_FLAGS += -DIPV6_SUPPORTED
71 ifeq ($(RADIO_CLUSTER), YES)
72 TENB_FLAGS += -DRADIO_CLUSTER
74 # Flags that define the broad level functioning of the binary
75 ENV_FLAGS=-DNO_ERRCLS -DNOERRCHK -DDEBUGP
77 RVW_FLAGS=-DCM_PASN_DBG -DLTEMAC_MIMO -DWR_UL_PWR \
80 # Flags that can be removed when everything works. These flags are not included
81 # in the compilation at the moment.
82 DEL_FLAGS=-DSS_WL_REGION=1 -DVE_PERF_MEAS -UVE_SUPPORT_RLC_UM_MODE -ULTE_LNX_AFFINITY \
83 -DKW_BG_DL_PROC -DKW_BG_UL_PROC -DWR_SB_SCTP -DPHY_ERROR_LOGGING -DWR_DETECT_RLF \
84 -USS_MEM_CORRUPTION_DETECTION -DL2_LOGGING_ENABLED -DLTEMAC_DRX -UUSE_PURE \
85 -DLTE_MULTIUE -DCMKV2 -DYS_ENB_CFG -DTA_NEW -DTENB_DISABLE_DL_ZBC
87 ALL_FLAGS=$(SS_FLAGS) $(CMN_FLAGS) $(ENV_FLAGS) $(RVW_FLAGS) $(TENB_FLAGS) $(LNXENV)
90 #C_OPTS+=-g -O3 -pipe -pedantic -Wall -Werror -Wno-comment -Wshadow
91 C_OPTS+=-g -pipe -Wall -Wno-comment -Wshadow \
92 -Wcast-qual -fno-strict-aliasing -fsigned-char --std=c99
94 COPTS_WO_PEDANTIC=-g -O3 -pipe -Wall -Werror -Wno-comment -Wshadow \
95 -Wcast-qual -fno-strict-aliasing -fsigned-char --std=c99
97 COPTS_WO_WERROR=-g -O3 -pipe -pedantic -Wall -Wno-comment -Wshadow \
98 -Wcast-qual -fno-strict-aliasing -fsigned-char --std=c99
100 xCPP_OPTS+=-g -pipe -pedantic -Wall -Werror -Wno-comment -Wshadow \
101 -Wcast-qual -fno-strict-aliasing -fsigned-char -lstdc++
103 # Include path settings
104 I_OPTS+=-I$(SRC_DIR) -I$(ROOT_DIR)/src/cm -I$(ROOT_DIR)/src/mt -I$(ROOT_DIR)/src/rlog -I$(ROOT_DIR)/src/wls_lib
105 I_OPTS+=$(PLTFRM_INCLUDES)
108 $(C_OBJS):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HDR_FILES)
109 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
110 $(Q)$(CC) -c -o $@ $(C_OPTS) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \
113 $(C_WO_WERR_OBJS):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HDR_FILES)
114 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
115 $(Q)$(CC) -c -o $@ $(COPTS_WO_WERROR) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \
118 $(C_WO_PED_OBJS):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HDR_FILES)
119 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
120 $(Q)$(CC) -c -o $@ $(COPTS_WO_PEDANTIC) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \
123 $(CPP_OBJS):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp $(HDR_FILES)
124 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
125 $(Q)$(CC) -c -o $@ $(CPP_OPTS) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \
128 $(C_OBJS_WO_LOG):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HDR_FILES)
129 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
130 $(Q)$(CC) -c -o $@ $(C_OPTS) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \
133 $(C_WO_PED_OBJS_WO_LOG):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(HDR_FILES)
134 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
135 $(Q)$(CC) -c -o $@ $(COPTS_WO_PEDANTIC) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \
138 $(CPP_OBJS_WO_LOG):$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp $(HDR_FILES)
139 @echo -e "Compiling $(COLOR_RED) $< $(REVERT_COLOR)"
140 $(Q)$(CC) -c -o $@ $(CPP_OPTS) $(I_OPTS) $(ALL_FLAGS) $(TEXT_LOGGING) $(MOD_FLAGS) \