Adding release file
[o-du/l2.git] / src / build / common / rl.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 include ../common/rsys_fancy.mak
18 COLOR=$(COLOR_GREEN)
19
20 #-------------------------------------------------------------#
21 #Makefile for RL
22 #-------------------------------------------------------------#
23 MOD_FLAGS=-UUSE_RLOG_DATA_TYPES 
24
25 SRC_DIR=$(ROOT_DIR)/src/rlog
26 CM_DIR =$(ROOT_DIR)/src/cm
27
28 # Product sources-------------------------------------------------------
29 C_SRCS=$(SRC_DIR)/rl_rlog.c $(SRC_DIR)/rl_common.c $(SRC_DIR)/rl_platform.c $(SRC_DIR)/rl_soc.c
30 rlPOSTPROCSRCS=$(SRC_DIR)/rl_common.c $(SRC_DIR)/rl_postproc.cpp
31
32 # Product includes -------------------------------------------------------
33 HDR_FILES=$(SRC_DIR)/rl_common.h  $(SRC_DIR)/rl_rlog.h  $(SRC_DIR)/rl_interface.h \
34                   $(SRC_DIR)/rl_platform.h
35 HDR_FILES+=$(wildcard $(CM_DIR)/*.)
36
37 # Object files ------------------------------------
38 C_OBJS_WO_LOG=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS))
39
40 #-------------------------------------------------------------#
41 #Makefile for RL
42 #-------------------------------------------------------------#
43 rlPOSTPROCOPTS=-DSS_LINUX -DUSE_RLOG_DATA_TYPES
44
45 #-------------------------------------------------------------#
46 #-------------------------------------------------------------#
47 #Compiler macros             
48 #-------------------------------------------------------------#
49 #$(OBJ_DIR)/rl_rlog.$(OBJ):$(rlSRCS)
50 #       @echo -e "Compiling $(COLOR) $< $(REVERT_COLOR)..."
51 #       $(Q) $(CC) -c $(COPTS) $(IOPTS) $(POPTS) $(IN_DIR)/rl_rlog.$(SRC) -rdynamic -o $(OBJ_DIR)/rl_rlog.$(OBJ)
52 #$(OBJ_DIR)/rl_common.$(OBJ):$(rlSRCS)
53 #       @echo -e "Compiling $(COLOR) $< $(REVERT_COLOR)..."
54 #       $(Q) $(CC) -c $(COPTS) $(IOPTS) $(POPTS) $(IN_DIR)/rl_common.$(SRC) -o $(OBJ_DIR)/rl_common.$(OBJ)
55 #$(OBJ_DIR)/rl_platform.$(OBJ):$(rlSRCS)
56 #       @echo -e "Compiling $(COLOR) $< $(REVERT_COLOR)..."
57 #       $(Q) $(CC) -c $(COPTS) $(IOPTS) $(POPTS) $(IN_DIR)/rl_platform.$(SRC) -o $(OBJ_DIR)/rl_platform.$(OBJ)
58
59 lib:$(LIB_DIR)/librl.a
60
61 include $(COM_BUILD_DIR)/compile.mak
62
63 #-------------------------------------------------------------#
64 #Linker macros             
65 #-------------------------------------------------------------#
66 $(LIB_DIR)/librl.a:$(C_OBJS_WO_LOG)
67         @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
68         $(Q)$(AR) -cr $(OBJ_DIR)/librl.a $(C_OBJS)      
69         @echo -e "$(COLOR)Building the binary logging post processor$(REVERT_COLOR)"
70         $(Q)g++ $(rlPOSTPROCOPTS) $(rlPOSTPROCSRCS) -o  $(OBJ_DIR)/rlogapp
71
72 #-------------------------------------------------------------#
73 #Clean macros             
74 #-------------------------------------------------------------#
75 clean:
76         @echo -e "$(COLOR_RED)Clearing binary logging$(REVERT_COLOR)"
77         $(Q)rm -f $(LIB_DIR)/librl.a $(C_OBJS_WO_LOG)
78
79
80