Initial commit for Bronze release
[o-du/l2.git] / build / common / sch.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 RG - script generated.
19 #-------------------------------------------------------------#
20 include ../common/rsys_fancy.mak
21 include ../common/env.mak
22 COLOR=$(COLOR_GREEN)
23
24 SRC_DIR=$(ROOT_DIR)/src/5gnrsch
25
26 # prepare the list of common header files
27 HDR_FILES+=$(wildcard $(CM_DIR)/env*.[hx])
28 HDR_FILES+=$(wildcard $(CM_DIR)/gen*.[hx])
29 HDR_FILES+=$(wildcard $(CM_DIR)/ssi*.[hx])
30 HDR_FILES+=$(wildcard $(CM_DIR)/cm*.[hx])
31 HDR_FILES+=$(wildcard $(CM_DIR)/crg.[hx])
32 HDR_FILES+=$(wildcard $(CM_DIR)/lrg*.[hx])
33 HDR_FILES+=$(wildcard $(CM_DIR)/rgr.[hx])
34 HDR_FILES+=$(wildcard $(CM_DIR)/rgm.[hx])
35
36 # Add the product specific header files
37 HDR_FILES+= $(wildcard $(SRC_DIR)/*.[hx])
38
39 #prepare the list of source files
40 C_SRCS=$(wildcard $(SRC_DIR)/*.c)
41 #C_SRCS:=$(filter-out $(SRC_DIR)/rg_sch%, $(C_SRCS))
42
43 #prepare the list of object files and RLOG related files
44 C_OBJS=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS))
45
46 #-------------------------------------------------------------#
47 #User macros (to be modified)
48 #-------------------------------------------------------------#
49 # Including RG_PHASE2_SCHED for supporting more than one schedulers 
50 # supported by mac
51 # TODO: make it define for LTEMAC_MIMO and remove it from envopt.h
52 MOD_FLAGS=-DRGM_LC -DRGM_LWLC -USM -URG_DEBUG -DxRG_PHASE2_SCHED -DxRGR_V1 \
53     -DRG_UL_DELTA=2 -ULTEMAC_DLUE_TMGOPTMZ -UTENB_SPLIT_ARCH -DRG -ULTEMAC_MIMO
54
55 lib:$(LIB_DIR)/librg.a
56 include $(COM_BUILD_DIR)/compile.mak
57
58 I_OPTS+=-I$(ROOT_DIR)/src/5gnrmac
59
60 #-------------------------------------------------------------#
61 #Linker macros             
62 #-------------------------------------------------------------#
63 $(LIB_DIR)/librg.a:$(C_OBJS)
64         @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
65         $(Q)ar -cr $(LIB_DIR)/librg.a $(C_OBJS) 
66
67 #-------------------------------------------------------------#
68 #Clean macros             
69 #-------------------------------------------------------------#
70 clean:
71         @echo -e "$(COLOR_RED)Cleaing MAC$(REVERT_COLOR)"
72         $(Q)\rm -f $(LIB_DIR)/librg.a $(C_OBJS)
73