Edit-conf changes for CLA use case.
[o-du/l2.git] / build / common / o1.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 # This is makefile for O1 module
18
19 include ../common/rsys_fancy.mak
20 include ../common/env.mak
21 COLOR=$(COLOR_RED)
22
23 SRC_DIR=$(ROOT_DIR)/src/o1/
24 CPP_SRCS=$(wildcard $(SRC_DIR)/*.cpp)
25 CPP_OBJS=$(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(CPP_SRCS))
26
27 PLTFRM_FLAGS=
28 ifeq ($(NODE),TEST_STUB)
29 PLTFRM_FLAGS+=-DODU_TEST_STUB
30 endif
31
32 lib: $(LIB_DIR)/libo1.a
33 include $(COM_BUILD_DIR)/compile.mak
34
35 L_OPTS=-lsysrepo -lyang
36 L_OPTS+= -lsysrepo-cpp -lyang-cpp
37 L_OPTS+= -lm -lpthread
38 I_OPTS=-I$(ROOT_DIR)/src/o1/
39 I_OPTS+=-I$(ROOT_DIR)/src/o1/ves/
40
41 #-------------------------------------------------------------#
42 #Linker macros
43 #-------------------------------------------------------------#
44
45 $(LIB_DIR)/libo1.a:$(CPP_OBJS)
46                   @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
47                   $(Q)ar -cr $(LIB_DIR)/libo1.a $(CPP_OBJS)
48
49 #-------------------------------------------------------------#
50 #Clean macros
51 #-------------------------------------------------------------#
52 clean:
53                   @echo -e "$(COLOR_RED)Cleaning O1$(REVERT_COLOR)"
54                   $(Q)\rm -f $(LIB_DIR)/libo1.a $(CPP_OBJS) 
55
56 #**********************************************************************
57 #         End of file
58 #**********************************************************************