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 # This is makefile for O1 module
19 include ../common/rsys_fancy.mak
20 include ../common/env.mak
23 ROOT_DIR=$(patsubst %/build/o1,%,$(BUILD_DIR))
25 SRC_DIR=$(ROOT_DIR)/src/o1/
26 CPP_SRCS=$(wildcard $(SRC_DIR)/*.cpp)
27 CPP_OBJS=$(patsubst $(SRC_DIR)/%.cpp,$(OBJ_DIR)/%.o,$(CPP_SRCS))
29 lib: $(LIB_DIR)/libo1.a
30 include $(COM_BUILD_DIR)/compile.mak
32 L_OPTS=-lsysrepo -lyang
33 L_OPTS+= -lsysrepo-cpp -lyang-cpp
34 L_OPTS+= -lm -lpthread
35 I_OPTS=-I$(ROOT_DIR)/src/o1/
36 I_OPTS+=-I$(ROOT_DIR)/src/o1/o1_client
38 #-------------------------------------------------------------#
40 #-------------------------------------------------------------#
42 $(LIB_DIR)/libo1.a:$(CPP_OBJS)
43 @echo -e "Creating Archive $(COLOR) $@ $(REVERT_COLOR)"
44 $(Q)ar -cr $(LIB_DIR)/libo1.a $(CPP_OBJS)
46 #-------------------------------------------------------------#
48 #-------------------------------------------------------------#
50 @echo -e "$(COLOR_RED)Cleaning O1$(REVERT_COLOR)"
51 $(Q)\rm -f $(LIB_DIR)/libo1.a $(CPP_OBJS)
53 #**********************************************************************
55 #**********************************************************************