Initial commit
[o-du/l2.git] / build / common / pj.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 ib - script generated.
19 #Only the $(CCib) may be modified.
20 #-------------------------------------------------------------#
21
22 include ../common/rsys_fancy.mak
23
24 include ../common/env.mak
25
26 SEC_ENG=SWLIB
27
28 SRC_DIR=$(ROOT_DIR)/src/5gnrpdcp
29
30 #Prepare source file list
31 C_SRCS=$(wildcard $(SRC_DIR)/*.c)
32
33 #prepare the list of object files and RLOG related files
34 C_OBJS=$(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(C_SRCS))
35
36 #prepare the header file list for this layer
37 # prepare the list of common header files
38 HDR_FILES+=$(wildcard $(CM_DIR)/env*.[hx])
39 HDR_FILES+=$(wildcard $(CM_DIR)/gen*.[hx])
40 HDR_FILES+=$(wildcard $(CM_DIR)/ssi*.[hx])
41 HDR_FILES+=$(wildcard $(CM_DIR)/cm*.[hx])
42 HDR_FILES+=$(wildcard $(CM_DIR)/lpj.[hx])
43 HDR_FILES+=$(wildcard $(CM_DIR)/kwu.[hx])
44 HDR_FILES+=$(wildcard $(CM_DIR)/pju.[hx])
45 HDR_FILES+=$(wildcard $(CM_DIR)/cpj.[hx])
46
47 # Add the product specific header files
48 HDR_FILES+= $(wildcard $(SRC_DIR)/*.[hx])
49
50 #-------------------------------------------------------------#
51 #User macros (to be modified)
52 #-------------------------------------------------------------#
53 MOD_FLAGS= -UKW_PDCP -DKW -DPJ -DPTPJLIB 
54
55
56 lib:$(LIB_DIR)/libpj.a
57 include $(COM_BUILD_DIR)/compile.mak
58
59 #-------------------------------------------------------------#
60 #Linker macros             
61 #-------------------------------------------------------------#
62 $(LIB_DIR)/libpj.a:$(C_OBJS) $(C_WO_WERR_OBJS)
63         @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
64         $(Q)ar -cr $(LIB_DIR)/libpj.a $(C_OBJS) $(C_WO_WERR_OBJS)       
65
66 #-------------------------------------------------------------#
67 #Clean macros             
68 #-------------------------------------------------------------#
69 clean:
70         @echo -e "$(COLOR_RED)Cleaning PDCP$(REVERT_COLOR)"
71         $(Q)\rm -f $(LIB_DIR)/libpj.a $(C_OBJS) $(C_WO_WERR_OBJS)
72
73