Adding release file
[o-du/l2.git] / src / build / common / cm.mak
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 #-------------------------------------------------------------#
18 #Makefile for product cm - script generated.
19 #Only the $(CCcmFLAGS) may be modified.
20 #-------------------------------------------------------------#
21 include ../common/rsys_fancy.mak
22 include ../common/env.mak
23 COLOR=$(COLOR_GREEN)
24 SRC_DIR=$(ROOT_DIR)/src/cm
25
26 EG_DIR=$(ROOT_DIR)/src/egtpu
27 SZ_DIR=$(ROOT_DIR)/src/s1ap
28 CZ_DIR=$(ROOT_DIR)/src/x2ap
29
30 # TODO - The dependency between layers and CM files should be removed #
31 I_OPTS+=-I$(EG_DIR) -I$(SZ_DIR) -I$(CZ_DIR)
32
33 #-------------------------------------------------------------#
34 #User macros (to be modified)
35 #-------------------------------------------------------------#
36 #CCrmFLAGS=-DLRM_LWLC -DRMU_LWLC -URMU_NPLC -DRGM_LWLC -DLWLCSMRMMILRM -DLCSMRMMILRM -DSM -DRM_INTF
37 #CCnlFlags=-DLWLCSMSONILNL -DNLU_LWLC -DLCSMSONILNL -DNLU_TC -DTCSMSONILNL -DNL
38 #CCcmFLAGS=-DSS_MT_TMR -DSS_FLOAT  -DRGR_V1 -DLSZV1 -DVE_SB_SCTP $(CCrmFLAGS)
39 #CCsmFLAGS=-DHI -DSB -DEG -DWR -DKW -DKW_PDCP -DPJ -DSZ -DYS -DRG -DNH -UVE_SM_LOG_TO_FILE -DRGR_SI_SCH -DTA_NEW -DSI_NEW -DCZ $(CCrmFLAGS) $(CCnlFlags)
40
41 #-------------------------------------------------------------#
42 # Define all the layers that are part of this binary so that  #
43 # their coupling requirements get defined from envopt.h.      #
44 #-------------------------------------------------------------#
45 # TODO -DRM has conflict with some cm_atm files. It is temp-  #
46 # orarily removed from this list.                             #
47 MOD_FLAGS=-DNH -DWR -DNX -DSZ -DCZ -DSB -DHI -DEG -DSM -DNL -DSM -DRG -DKW -DYS
48 #This module does not support binary logging so disable it
49 TEXT_LOG=YES
50
51 #-------------------------------------------------------------#
52 # Source file list. This needs to be explicitly built as CM
53 # directory contains files for both CPUL and CPUH.
54 #-------------------------------------------------------------#
55 C_SRCS=$(wildcard $(SRC_DIR)/*.c)
56 C_SRCS:=$(filter-out %cm_ss.c, $(C_SRCS))
57 C_SRCS:=$(filter-out %egt_util.c, $(C_SRCS))
58 C_SRCS:=$(filter-out %lve.c, $(C_SRCS))
59 C_SRCS:=$(filter-out %cm_atm.c, $(C_SRCS))
60 C_SRCS:=$(filter-out %_ptsp.c, $(C_SRCS))
61 C_SRCS:=$(filter-out %_se_tst.c, $(C_SRCS))
62 ifeq ($(PLTFRM),XEON)
63 C_SRCS:=$(filter-out %mem_wl.c, $(C_SRCS))
64 else
65 C_SRCS:=$(filter-out %mem.c, $(C_SRCS))
66 endif
67
68 C_OBJS_WO_LOG=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS))
69 HDR_FILES+= $(wildcard $(SRC_DIR)/*.[hx])
70
71
72 lib: $(LIB_DIR)/libcm.a
73
74 include $(COM_BUILD_DIR)/compile.mak
75
76 #-------------------------------------------------------------#
77 #Linker macros             
78 #-------------------------------------------------------------#
79 $(LIB_DIR)/libcm.a:$(C_OBJS_WO_LOG)
80         @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
81         $(Q)ar -cr $(LIB_DIR)/libcm.a $(C_OBJS) 
82 #-------------------------------------------------------------#
83 #Clean macros             
84 #-------------------------------------------------------------#
85 clean:
86         @echo -e "$(COLOR_RED)Cleaning CPUH CM$(REVERT_COLOR)"
87         @echo -e "$(COLOR_RED) $(REVERT_COLOR)"
88         $(Q)\rm -f $(LIB_DIR)/libcm.a $(C_OBJS_WO_LOG)
89
90