-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
30 lines (23 loc) · 882 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright 2021 Google LLC
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
# This Makefile depends on the Google grpc library.
# Directory where Google's gRPC library is installed. This should be
# the same directory you gave as the --prefix option to ./configure
# when installing it.
GRPC_ROOT ?= /usr/local
LIBS = -lgrpc -lgpr
CXXFLAGS = $(shell pkg-config grpc --cflags) -I$(GRPC_ROOT)/include -fPIC
LDFLAGS = -L$(GRPC_ROOT)/lib $(LIBS)
OFILES = client.o client_auth.o server.o
# Default target if make is run with no arguments.
default_target: grpc.so
.PHONY : default_target
grpc.so: ${OFILES}
$(CXX) -pthread -shared -Wl,--no-undefined ${OFILES} -o $@ $(LDFLAGS)
clean: $(RM) ${OFILES} grpc.so
client.o: client.cc
client_auth.o: client_auth.cc
server.o: server.cc