-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
22 lines (15 loc) · 800 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
subdir = ./
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
SOURCES = $(wildcard $(subdir)*.cc)
SRCOBJS = $(patsubst %.cc,%.o,$(SOURCES))
CC = g++
%.o:%.cc
$(CC) -std=c++11 -I/usr/local/include -pthread -lrocksdb -c $< -o $@
all: client server
client: protoc/rpc.grpc.pb.o protoc/rpc.pb.o client.o submodule/encryption.o submodule/tools.o
$(CC) $^ -L/usr/local/lib `pkg-config --libs grpc++ grpc` -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed -lprotobuf -lpthread -lrocksdb -ldl -lssl -o $@
server: protoc/rpc.grpc.pb.o protoc/rpc.pb.o server.o submodule/encryption.o submodule/tools.o
$(CC) $^ -L/usr/local/lib `pkg-config --libs grpc++ grpc` -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed -lprotobuf -lpthread -lrocksdb -ldl -lssl -o $@
#chmod 777 $@
clean:
rm *.o