1 CXXFLAGS ?= -I../../../include 2 LDFLAGS ?= 3 4 .PHONY: all 5 all: server client 6 7 greeter_generated.h: greeter.fbs 8 flatc --grpc --cpp $< 9 10 server: server.cpp greeter.grpc.fb.cc greeter_generated.h greeter.grpc.fb.h 11 g++ -std=c++11 -O2 $(CXXFLAGS) $(LDFLAGS) -lgpr -lgrpc -lgrpc++ server.cpp greeter.grpc.fb.cc -o $@ 12 13 client: client.cpp greeter.grpc.fb.cc greeter_generated.h greeter.grpc.fb.h 14 g++ -std=c++11 -O2 $(CXXFLAGS) $(LDFLAGS) -lgpr -lgrpc -lgrpc++ client.cpp greeter.grpc.fb.cc -o $@ 15