diff --git a/src/Makefile b/src/Makefile index bbbf8d920..6c25e0e30 100644 --- a/src/Makefile +++ b/src/Makefile @@ -71,8 +71,9 @@ CRYPTOPP_INC_Darwin:=-I/usr/local/opt/cryptopp/include NLOHMANN_JSON_INC_Darwin:=-I/usr/local/opt/nlohmann-json/include B64_LIB_Darwin:=-L/usr/local/opt/libb64/lib -lb64 B64_INC_Darwin:=-I/usr/local/opt/libb64/include -GRPC_INC_Darwin=-I/usr/local/opt/gprc/include +GRPC_INC_Darwin=-I/usr/local/opt/grpc/include GRPC_LIB_Darwin=-L/usr/local/opt/grpc/lib -lgrpc++ -lgrpc -lgpr -lprotobuf -lpthread -labsl_synchronization -labsl_log_internal_message -labsl_log_internal_check_op -labsl_cord -labsl_status +PROTOBUF_INC_Darwin:=-L/usr/local/opt/protobuf/include PROTOBUF_LIB_Darwin:=-L/usr/local/opt/protobuf/lib -lprotobuf -lpthread -labsl_log_internal_message -labsl_log_internal_check_op else # Macports installation BOOST_LIB_DIR_Darwin=-L/opt/local/libexec/boost/1.81/lib @@ -83,6 +84,7 @@ B64_LIB_Darwin:=-L/opt/local/lib -lb64 B64_INC_Darwin:=-I/opt/local/include GRPC_INC_Darwin=-I/opt/local/include GRPC_LIB_Darwin=-L/opt/local/lib -lgrpc++ -lgrpc -lgpr -lprotobuf -lpthread -labsl_synchronization +PROTOBUF_INC_Darwin:=-L/opt/local/include PROTOBUF_LIB_Darwin:=-L/opt/local/lib -lprotobuf -lpthread endif endif @@ -116,6 +118,7 @@ CRYPTOPP_LIB_Linux:=-lcryptopp CRYPTOPP_INC_Linux:= GRPC_INC_Linux:= GRPC_LIB_Linux:=-lgrpc++ -lgrpc -lgpr -lprotobuf -lpthread -labsl_synchronization +PROTOBUF_INC_Linux:=-L/opt/local/include PROTOBUF_LIB_Linux:=-lprotobuf -lpthread LIBCARTESI_Linux=libcartesi-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSION_MINOR).so LIBCARTESI_LDFLAGS_Linux:=$(SOLDFLAGS_Linux) @@ -143,6 +146,7 @@ NLOHMANN_JSON_INC=$(NLOHMANN_JSON_INC_$(UNAME)) MONGOOSE_INC=-I$(BUILDDIR)/include GRPC_LIB=$(GRPC_LIB_$(UNAME)) GRPC_INC=$(GRPC_INC_$(UNAME)) +PROTOBUF_INC=$(PROTOBUF_INC_$(UNAME)) PROTOBUF_LIB=$(PROTOBUF_LIB_$(UNAME)) LIBCARTESI=$(LIBCARTESI_$(UNAME)) LIBCARTESI_LDFLAGS=$(LIBCARTESI_LDFLAGS_$(UNAME)) @@ -171,7 +175,7 @@ WARNS=-W -Wall -pedantic # Place our include directories before the system's INCS=-I../lib/machine-emulator-defines -I../third-party/llvm-flang-uint128 \ - $(LUA_INC) $(CRYPTOPP_INC) $(NLOHMANN_JSON_INC) $(MONGOOSE_INC) $(B64_INC) $(BOOST_INC) $(GRPC_INC) $(INCS_$(UNAME)) + $(LUA_INC) $(CRYPTOPP_INC) $(NLOHMANN_JSON_INC) $(MONGOOSE_INC) $(B64_INC) $(BOOST_INC) $(PROTOBUF_INC) $(GRPC_INC) $(INCS_$(UNAME)) ifeq ($(dump),yes) #DEFS+=-DDUMP_ILLEGAL_INSN_EXCEPTIONS @@ -692,7 +696,7 @@ $(BUILDDIR)/lib/mongoose.o: CFLAGS := $(patsubst %-std=c99,%,$(CFLAGS)) jsonrpc-remote-cartesi-machine: $(JSONRPC_REMOTE_CARTESI_MACHINE_OBJS) $(CXX) $(LDFLAGS) $(CARTESI_EXECUTABLE_LDFLAGS) -o $@ $(JSONRPC_REMOTE_CARTESI_MACHINE_OBJS) $(JSONRPC_REMOTE_CARTESI_MACHINE_LIBS) -remote-cartesi-machine: CXXFLAGS := $(GRPC_INC) $(CXXFLAGS) +remote-cartesi-machine: CXXFLAGS := $(PROTOBUF_INC) $(GRPC_INC) $(CXXFLAGS) tests/test-machine-c-api: $(TEST_MACHINE_C_API_OBJS) $(LIBCARTESI) $(LIBCARTESI_GRPC) $(CXX) $(LDFLAGS) $(CARTESI_EXECUTABLE_LDFLAGS) -o $@ $(TEST_MACHINE_C_API_OBJS) $(TEST_MACHINE_C_API_LIBS)