Commit 6301cdef authored by gejun's avatar gejun

.pb.h depends on .proto as well

parent 3d85e0a0
......@@ -184,9 +184,7 @@ BASE_SOURCES = \
src/base/containers/case_ignored_flat_map.cpp \
src/base/iobuf.cpp
BASE_PROTOS = $(filter %.proto,$(BASE_SOURCES))
BASE_CFAMILIES = $(filter-out %.proto,$(BASE_SOURCES))
BASE_OBJS = $(BASE_PROTOS:.proto=.pb.o) $(addsuffix .o, $(basename $(BASE_CFAMILIES)))
BASE_OBJS = $(addsuffix .o, $(basename $(BASE_SOURCES)))
BASE_DEBUG_OBJS = $(BASE_OBJS:.o=.dbg.o)
BVAR_DIRS = src/bvar src/bvar/detail
......@@ -308,7 +306,7 @@ output/bin:protoc-gen-mcpack
@mkdir -p $@
@cp $^ $@
%.pb.cc:%.proto
%.pb.cc %.pb.h:%.proto
@echo "Generating $@"
@$(PROTOC) --cpp_out=./src --proto_path=./src --proto_path=$(PROTOBUF_HDR) $<
......
......@@ -33,7 +33,7 @@ echo_server:$(PROTO_OBJS) $(SERVER_OBJS)
@echo "Linking $@"
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
%.pb.cc:%.proto
%.pb.cc %.pb.h:%.proto
@echo "Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $<
......
......@@ -43,7 +43,7 @@ http_server:$(PROTO_OBJS) $(SERVER_OBJS)
@echo "Linking $@"
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
%.pb.cc:%.proto
%.pb.cc %.pb.h:%.proto
@echo "Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $<
......
......@@ -37,7 +37,7 @@ echo_server:$(PROTO_OBJS) $(SERVER_OBJS)
@echo "Linking $@"
@$(CXX) $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS) -o $@
%.pb.cc:%.proto
%.pb.cc %.pb.h:%.proto
@echo "Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. $(PROTOC_EXTRA_ARGS) $<
......
......@@ -199,7 +199,7 @@ brpc_%_unittest:$(TEST_PROTO_OBJS) brpc_%_unittest.o ../libbase.dbg.a ../libbvar
@echo "Linking $@"
@$(CXX) -o $@ $(LIBPATHS) -Xlinker "-(" $^ -Wl,-Bstatic $(STATIC_LINKINGS) -Wl,-Bdynamic -Xlinker "-)" $(DYNAMIC_LINKINGS)
%.pb.cc:%.proto
%.pb.cc %.pb.h:%.proto
@echo "Generating $@"
@$(PROTOC) --cpp_out=. --proto_path=. --proto_path=../src --proto_path=$(PROTOBUF_HDR) $<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment