b2285e00875781982859f8e940241b8d3483580f
[o-du/l2.git] / 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 lib:$(LIB_DIR)/librl.a
46
47 include $(COM_BUILD_DIR)/compile.mak
48
49 #-------------------------------------------------------------#
50 #Linker macros             
51 #-------------------------------------------------------------#
52 $(LIB_DIR)/librl.a:$(C_OBJS_WO_LOG)
53         @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
54         $(Q)$(AR) -cr $(OBJ_DIR)/librl.a $(C_OBJS)      
55         @echo -e "$(COLOR)Building the binary logging post processor$(REVERT_COLOR)"
56         $(Q)g++ $(rlPOSTPROCOPTS) $(rlPOSTPROCSRCS) -o  $(OBJ_DIR)/rlogapp
57
58 #-------------------------------------------------------------#
59 #Clean macros             
60 #-------------------------------------------------------------#
61 clean:
62         @echo -e "$(COLOR_RED)Clearing binary logging$(REVERT_COLOR)"
63         $(Q)rm -f $(LIB_DIR)/librl.a $(C_OBJS_WO_LOG)
64
65 #**********************************************************************
66 #         End of file
67 #**********************************************************************