aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-03-16 23:10:20 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2016-03-16 23:10:20 -0700
commit835065a61c7a437cc173d5c7c31e93b747b9c25b (patch)
treefd15b4ecdc1036ef31e7535e5fa5763eb8c0f192 /Makefile
parentffcf649fa3e2d4a6a4a51038a985c64805cdeaad (diff)
parent07c17447cccaf492d7246a0cea33057c281d9ba1 (diff)
Merge pull request #5270 from dgquintas/codegen_lib
Added codegen_lib
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile256
1 files changed, 208 insertions, 48 deletions
diff --git a/Makefile b/Makefile
index 6aebadb1c2..0659fb1466 100644
--- a/Makefile
+++ b/Makefile
@@ -976,6 +976,7 @@ channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test
cli_call_test: $(BINDIR)/$(CONFIG)/cli_call_test
client_crash_test: $(BINDIR)/$(CONFIG)/client_crash_test
client_crash_test_server: $(BINDIR)/$(CONFIG)/client_crash_test_server
+codegen_test: $(BINDIR)/$(CONFIG)/codegen_test
credentials_test: $(BINDIR)/$(CONFIG)/credentials_test
cxx_byte_buffer_test: $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test
cxx_slice_test: $(BINDIR)/$(CONFIG)/cxx_slice_test
@@ -1328,6 +1329,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \
$(BINDIR)/$(CONFIG)/cli_call_test \
$(BINDIR)/$(CONFIG)/client_crash_test \
$(BINDIR)/$(CONFIG)/client_crash_test_server \
+ $(BINDIR)/$(CONFIG)/codegen_test \
$(BINDIR)/$(CONFIG)/credentials_test \
$(BINDIR)/$(CONFIG)/cxx_byte_buffer_test \
$(BINDIR)/$(CONFIG)/cxx_slice_test \
@@ -1636,6 +1638,8 @@ test_cxx: test_zookeeper buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/cli_call_test || ( echo test cli_call_test failed ; exit 1 )
$(E) "[RUN] Testing client_crash_test"
$(Q) $(BINDIR)/$(CONFIG)/client_crash_test || ( echo test client_crash_test failed ; exit 1 )
+ $(E) "[RUN] Testing codegen_test"
+ $(Q) $(BINDIR)/$(CONFIG)/codegen_test || ( echo test codegen_test failed ; exit 1 )
$(E) "[RUN] Testing credentials_test"
$(Q) $(BINDIR)/$(CONFIG)/credentials_test || ( echo test credentials_test failed ; exit 1 )
$(E) "[RUN] Testing cxx_byte_buffer_test"
@@ -2555,17 +2559,17 @@ LIBGRPC_SRC = \
PUBLIC_HEADERS_C += \
include/grpc/grpc_security.h \
+ include/grpc/byte_buffer.h \
+ include/grpc/byte_buffer_reader.h \
+ include/grpc/compression.h \
+ include/grpc/grpc.h \
+ include/grpc/status.h \
include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/byte_buffer.h \
- include/grpc/byte_buffer_reader.h \
- include/grpc/compression.h \
- include/grpc/grpc.h \
- include/grpc/status.h \
include/grpc/census.h \
LIBGRPC_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC))))
@@ -2620,6 +2624,50 @@ endif
endif
+LIBGRPC_CODEGEN_LIB_SRC = \
+
+PUBLIC_HEADERS_C += \
+ include/grpc/impl/codegen/alloc.h \
+ include/grpc/impl/codegen/atm.h \
+ include/grpc/impl/codegen/atm_gcc_atomic.h \
+ include/grpc/impl/codegen/atm_gcc_sync.h \
+ include/grpc/impl/codegen/atm_win32.h \
+ include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/port_platform.h \
+ include/grpc/impl/codegen/slice.h \
+ include/grpc/impl/codegen/slice_buffer.h \
+ include/grpc/impl/codegen/sync.h \
+ include/grpc/impl/codegen/sync_generic.h \
+ include/grpc/impl/codegen/sync_posix.h \
+ include/grpc/impl/codegen/sync_win32.h \
+ include/grpc/impl/codegen/time.h \
+ include/grpc/impl/codegen/byte_buffer.h \
+ include/grpc/impl/codegen/compression_types.h \
+ include/grpc/impl/codegen/connectivity_state.h \
+ include/grpc/impl/codegen/grpc_types.h \
+ include/grpc/impl/codegen/propagation_bits.h \
+ include/grpc/impl/codegen/status.h \
+
+LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC))))
+
+
+$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: $(ZLIB_DEP) $(LIBGRPC_CODEGEN_LIB_OBJS)
+ $(E) "[AR] Creating $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a
+ $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBGRPC_CODEGEN_LIB_OBJS)
+ifeq ($(SYSTEM),Darwin)
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a
+endif
+
+
+
+
+ifneq ($(NO_DEPS),true)
+-include $(LIBGRPC_CODEGEN_LIB_OBJS:.o=.dep)
+endif
+
+
LIBGRPC_TEST_UTIL_SRC = \
test/core/end2end/data/server1_cert.c \
test/core/end2end/data/server1_key.c \
@@ -3028,11 +3076,10 @@ LIBGRPC++_SRC = \
src/cpp/client/credentials.cc \
src/cpp/client/generic_stub.cc \
src/cpp/client/insecure_credentials.cc \
- src/cpp/common/call.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/completion_queue.cc \
+ src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
- src/cpp/proto/proto_utils.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@@ -3046,7 +3093,7 @@ LIBGRPC++_SRC = \
src/cpp/util/status.cc \
src/cpp/util/string_ref.cc \
src/cpp/util/time.cc \
- src/cpp/codegen/grpc_library.cc \
+ src/cpp/codegen/codegen_init.cc \
PUBLIC_HEADERS_CXX += \
include/grpc++/alarm.h \
@@ -3104,6 +3151,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/completion_queue_tag.h \
include/grpc++/impl/codegen/config.h \
include/grpc++/impl/codegen/config_protobuf.h \
+ include/grpc++/impl/codegen/core_codegen_interface.h \
include/grpc++/impl/codegen/grpc_library.h \
include/grpc++/impl/codegen/method_handler_impl.h \
include/grpc++/impl/codegen/proto_utils.h \
@@ -3187,6 +3235,93 @@ endif
endif
+LIBGRPC++_CODEGEN_LIB_SRC = \
+ src/cpp/codegen/codegen_init.cc \
+
+PUBLIC_HEADERS_CXX += \
+ include/grpc/impl/codegen/alloc.h \
+ include/grpc/impl/codegen/atm.h \
+ include/grpc/impl/codegen/atm_gcc_atomic.h \
+ include/grpc/impl/codegen/atm_gcc_sync.h \
+ include/grpc/impl/codegen/atm_win32.h \
+ include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/port_platform.h \
+ include/grpc/impl/codegen/slice.h \
+ include/grpc/impl/codegen/slice_buffer.h \
+ include/grpc/impl/codegen/sync.h \
+ include/grpc/impl/codegen/sync_generic.h \
+ include/grpc/impl/codegen/sync_posix.h \
+ include/grpc/impl/codegen/sync_win32.h \
+ include/grpc/impl/codegen/time.h \
+ include/grpc/impl/codegen/byte_buffer.h \
+ include/grpc/impl/codegen/compression_types.h \
+ include/grpc/impl/codegen/connectivity_state.h \
+ include/grpc/impl/codegen/grpc_types.h \
+ include/grpc/impl/codegen/propagation_bits.h \
+ include/grpc/impl/codegen/status.h \
+ include/grpc++/impl/codegen/async_stream.h \
+ include/grpc++/impl/codegen/async_unary_call.h \
+ include/grpc++/impl/codegen/call.h \
+ include/grpc++/impl/codegen/call_hook.h \
+ include/grpc++/impl/codegen/channel_interface.h \
+ include/grpc++/impl/codegen/client_context.h \
+ include/grpc++/impl/codegen/client_unary_call.h \
+ include/grpc++/impl/codegen/completion_queue.h \
+ include/grpc++/impl/codegen/completion_queue_tag.h \
+ include/grpc++/impl/codegen/config.h \
+ include/grpc++/impl/codegen/config_protobuf.h \
+ include/grpc++/impl/codegen/core_codegen_interface.h \
+ include/grpc++/impl/codegen/grpc_library.h \
+ include/grpc++/impl/codegen/method_handler_impl.h \
+ include/grpc++/impl/codegen/proto_utils.h \
+ include/grpc++/impl/codegen/rpc_method.h \
+ include/grpc++/impl/codegen/rpc_service_method.h \
+ include/grpc++/impl/codegen/security/auth_context.h \
+ include/grpc++/impl/codegen/serialization_traits.h \
+ include/grpc++/impl/codegen/server_context.h \
+ include/grpc++/impl/codegen/server_interface.h \
+ include/grpc++/impl/codegen/service_type.h \
+ include/grpc++/impl/codegen/status.h \
+ include/grpc++/impl/codegen/status_code_enum.h \
+ include/grpc++/impl/codegen/string_ref.h \
+ include/grpc++/impl/codegen/stub_options.h \
+ include/grpc++/impl/codegen/sync.h \
+ include/grpc++/impl/codegen/sync_cxx11.h \
+ include/grpc++/impl/codegen/sync_no_cxx11.h \
+ include/grpc++/impl/codegen/sync_stream.h \
+ include/grpc++/impl/codegen/time.h \
+
+LIBGRPC++_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_CODEGEN_LIB_SRC))))
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay.
+
+$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: protobuf_dep_error
+
+
+else
+
+$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_CODEGEN_LIB_OBJS)
+ $(E) "[AR] Creating $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+ $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBGRPC++_CODEGEN_LIB_OBJS)
+ifeq ($(SYSTEM),Darwin)
+ $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+endif
+
+
+
+
+endif
+
+ifneq ($(NO_DEPS),true)
+-include $(LIBGRPC++_CODEGEN_LIB_OBJS:.o=.dep)
+endif
+
+
LIBGRPC++_TEST_CONFIG_SRC = \
test/cpp/util/test_config.cc \
@@ -3308,11 +3443,10 @@ LIBGRPC++_UNSECURE_SRC = \
src/cpp/client/credentials.cc \
src/cpp/client/generic_stub.cc \
src/cpp/client/insecure_credentials.cc \
- src/cpp/common/call.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/completion_queue.cc \
+ src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
- src/cpp/proto/proto_utils.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@@ -3326,7 +3460,7 @@ LIBGRPC++_UNSECURE_SRC = \
src/cpp/util/status.cc \
src/cpp/util/string_ref.cc \
src/cpp/util/time.cc \
- src/cpp/codegen/grpc_library.cc \
+ src/cpp/codegen/codegen_init.cc \
PUBLIC_HEADERS_CXX += \
include/grpc++/alarm.h \
@@ -3384,6 +3518,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/completion_queue_tag.h \
include/grpc++/impl/codegen/config.h \
include/grpc++/impl/codegen/config_protobuf.h \
+ include/grpc++/impl/codegen/core_codegen_interface.h \
include/grpc++/impl/codegen/grpc_library.h \
include/grpc++/impl/codegen/method_handler_impl.h \
include/grpc++/impl/codegen/proto_utils.h \
@@ -3459,45 +3594,8 @@ LIBGRPC_PLUGIN_SUPPORT_SRC = \
src/compiler/objective_c_generator.cc \
src/compiler/python_generator.cc \
src/compiler/ruby_generator.cc \
- src/cpp/codegen/grpc_library.cc \
PUBLIC_HEADERS_CXX += \
- include/grpc++/impl/codegen/async_stream.h \
- include/grpc++/impl/codegen/async_unary_call.h \
- include/grpc++/impl/codegen/call.h \
- include/grpc++/impl/codegen/call_hook.h \
- include/grpc++/impl/codegen/channel_interface.h \
- include/grpc++/impl/codegen/client_context.h \
- include/grpc++/impl/codegen/client_unary_call.h \
- include/grpc++/impl/codegen/completion_queue.h \
- include/grpc++/impl/codegen/completion_queue_tag.h \
- include/grpc++/impl/codegen/config.h \
- include/grpc++/impl/codegen/config_protobuf.h \
- include/grpc++/impl/codegen/grpc_library.h \
- include/grpc++/impl/codegen/method_handler_impl.h \
- include/grpc++/impl/codegen/proto_utils.h \
- include/grpc++/impl/codegen/rpc_method.h \
- include/grpc++/impl/codegen/rpc_service_method.h \
- include/grpc++/impl/codegen/security/auth_context.h \
- include/grpc++/impl/codegen/serialization_traits.h \
- include/grpc++/impl/codegen/server_context.h \
- include/grpc++/impl/codegen/server_interface.h \
- include/grpc++/impl/codegen/service_type.h \
- include/grpc++/impl/codegen/status.h \
- include/grpc++/impl/codegen/status_code_enum.h \
- include/grpc++/impl/codegen/string_ref.h \
- include/grpc++/impl/codegen/stub_options.h \
- include/grpc++/impl/codegen/sync.h \
- include/grpc++/impl/codegen/sync_cxx11.h \
- include/grpc++/impl/codegen/sync_no_cxx11.h \
- include/grpc++/impl/codegen/sync_stream.h \
- include/grpc++/impl/codegen/time.h \
- include/grpc/impl/codegen/byte_buffer.h \
- include/grpc/impl/codegen/compression_types.h \
- include/grpc/impl/codegen/connectivity_state.h \
- include/grpc/impl/codegen/grpc_types.h \
- include/grpc/impl/codegen/propagation_bits.h \
- include/grpc/impl/codegen/status.h \
include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
@@ -9276,6 +9374,68 @@ endif
endif
+CODEGEN_TEST_SRC = \
+ $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \
+ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \
+ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \
+ $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \
+ $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \
+ $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \
+ test/cpp/codegen/codegen_test.cc \
+
+CODEGEN_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/codegen_test: openssl_dep_error
+
+else
+
+
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/codegen_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/codegen_test: $(PROTOBUF_DEP) $(CODEGEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(CODEGEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/codegen_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/control.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/payloads.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/perf_db.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a
+
+deps_codegen_test: $(CODEGEN_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(CODEGEN_TEST_OBJS:.o=.dep)
+endif
+endif
+$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc
+
+
CREDENTIALS_TEST_SRC = \
test/cpp/client/credentials_test.cc \