blob: 3541654daed57fd7ba2164abb75485b611a02df8 [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301#
2# Copyright (c) 2019, Infosys Ltd.
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
17include ../../Makefile.common
18
19CFLAGS := -Wall -I$(GRPC_ROOT)/include -I$(GRPC_ROOT)/third_party/protobuf/src -std=c++11
20LDFLAGS := -L$(GRPC_ROOT)/libs/opt -lgrpc++ -lgrpc -lgpr -L$(GRPC_ROOT)/libs/opt/protobuf -lprotobuf
21
22SRCDIR := .
23SRCS := ./mmeGrpcClient.cpp
24OBJS := $(patsubst $(SRCDIR)/%,$(OBJDIR)/mmeGrpcClient/%,$(SRCS:.cpp=.o))
25
26TARGET := $(BINDIR)/mme-grpc-client
27
28all: $(TARGET)
29
30$(TARGET) : $(OBJS)
31 @mkdir -p $(BINDIR)
32 g++ -o $(TARGET) $(OBJS) $(LIB_PATH) -lmmeGrpcProtoBuf $(LDFLAGS)
33
34$(OBJS) : $(OBJDIR)/mmeGrpcClient/%.o : $(SRCDIR)/%.cpp
35 -@mkdir -p $(OBJDIR)/mmeGrpcClient
36 g++ $(CFLAGS) $(INC_DIRS) -c -o $@ $<
37
38install :
39 -@mkdir -p $(TARGET_DIR)/bin
40 -@cp $(TARGET) $(TARGET_DIR)/bin
41
42clean:
43 -@rm -rf $(OBJDIR)/mmeGrpcClient $(TARGET)