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 #-------------------------------------------------------------#
46 #-------------------------------------------------------------#
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)
59 lib:$(LIB_DIR)/librl.a
61 include $(COM_BUILD_DIR)/compile.mak
63 #-------------------------------------------------------------#
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
72 #-------------------------------------------------------------#
74 #-------------------------------------------------------------#
76 @echo -e "$(COLOR_RED)Clearing binary logging$(REVERT_COLOR)"
77 $(Q)rm -f $(LIB_DIR)/librl.a $(C_OBJS_WO_LOG)