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 include ../common/rsys_fancy.mak
20 #-------------------------------------------------------------#
22 #-------------------------------------------------------------#
23 MOD_FLAGS=-UUSE_RLOG_DATA_TYPES
25 SRC_DIR=$(ROOT_DIR)/src/rlog
26 CM_DIR =$(ROOT_DIR)/src/cm
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
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)/*.)
37 # Object files ------------------------------------
38 C_OBJS_WO_LOG=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS))
40 #-------------------------------------------------------------#
42 #-------------------------------------------------------------#
43 rlPOSTPROCOPTS=-DSS_LINUX -DUSE_RLOG_DATA_TYPES
45 lib:$(LIB_DIR)/librl.a
47 include $(COM_BUILD_DIR)/compile.mak
49 #-------------------------------------------------------------#
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
58 #-------------------------------------------------------------#
60 #-------------------------------------------------------------#
62 @echo -e "$(COLOR_RED)Clearing binary logging$(REVERT_COLOR)"
63 $(Q)rm -f $(LIB_DIR)/librl.a $(C_OBJS_WO_LOG)
65 #**********************************************************************
67 #**********************************************************************