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 #-------------------------------------------------------------#
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
24 SRC_DIR=$(ROOT_DIR)/src/cm
26 EG_DIR=$(ROOT_DIR)/src/egtpu
27 SZ_DIR=$(ROOT_DIR)/src/s1ap
28 CZ_DIR=$(ROOT_DIR)/src/x2ap
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 I_OPTS+=-I$(ROOT_DIR)/src/du_app
33 I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/common
35 #-------------------------------------------------------------#
36 # Define all the layers that are part of this binary so that #
37 # their coupling requirements get defined from envopt.h. #
38 #-------------------------------------------------------------#
39 MOD_FLAGS=-DNH -DWR -DNX -DSZ -DCZ -DSB -DHI -DEG -DSM -DNL -DSM -DRG -DKW -DYS
40 #This module does not support binary logging so disable it
43 #-------------------------------------------------------------#
44 # Source file list. This needs to be explicitly built as CM
45 # directory contains files for both CPUL and CPUH.
46 #-------------------------------------------------------------#
47 C_SRCS=$(wildcard $(SRC_DIR)/*.c)
48 C_SRCS:=$(filter-out %cm_ss.c, $(C_SRCS))
49 C_SRCS:=$(filter-out %egt_util.c, $(C_SRCS))
50 C_SRCS:=$(filter-out %lve.c, $(C_SRCS))
51 C_SRCS:=$(filter-out %cm_atm.c, $(C_SRCS))
52 C_SRCS:=$(filter-out %_ptsp.c, $(C_SRCS))
53 C_SRCS:=$(filter-out %_se_tst.c, $(C_SRCS))
55 C_SRCS:=$(filter-out %mem_wl.c, $(C_SRCS))
57 C_SRCS:=$(filter-out %mem.c, $(C_SRCS))
60 C_OBJS_WO_LOG=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS))
61 HDR_FILES+= $(wildcard $(SRC_DIR)/*.[hx])
64 lib: $(LIB_DIR)/libcm.a
66 include $(COM_BUILD_DIR)/compile.mak
68 #-------------------------------------------------------------#
70 #-------------------------------------------------------------#
71 $(LIB_DIR)/libcm.a:$(C_OBJS_WO_LOG)
72 @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
73 $(Q)ar -cr $(LIB_DIR)/libcm.a $(C_OBJS)
74 #-------------------------------------------------------------#
76 #-------------------------------------------------------------#
78 @echo -e "$(COLOR_RED)Cleaning CPUH CM$(REVERT_COLOR)"
79 @echo -e "$(COLOR_RED) $(REVERT_COLOR)"
80 $(Q)\rm -f $(LIB_DIR)/libcm.a $(C_OBJS_WO_LOG)
82 #**********************************************************************
84 #**********************************************************************