diff options
author | 2015-02-18 15:03:12 -0800 | |
---|---|---|
committer | 2015-02-18 15:16:54 -0800 | |
commit | 2ec0b3ea59ea0869d07153c8f54894aea5192693 (patch) | |
tree | b3baf2df6bb81891f83f0e632e409b3d68b5f64a /templates/Makefile.template | |
parent | 8a287d1a1bfbc2250abe43aa433397f68d07a632 (diff) |
make grpc_csharp_ext compile and install independently from the grpc and gpr libraries
Diffstat (limited to 'templates/Makefile.template')
-rw-r--r-- | templates/Makefile.template | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index d107801e08..178ace6bcf 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -529,6 +529,15 @@ shared_cxx: \ % endfor +shared_csharp: shared_c \ +% for lib in libs: +% if lib.build == 'all' and lib.language == 'csharp': + $(LIBDIR)/$(CONFIG)/lib${lib.name}.$(SHARED_EXT)\ +% endif +% endfor + +grpc_csharp_ext: shared_csharp + privatelibs: privatelibs_c privatelibs_cxx privatelibs_c: \ @@ -662,6 +671,18 @@ ifeq ($(CONFIG),opt) % endfor endif +strip-shared_csharp: shared_csharp +ifeq ($(CONFIG),opt) +% for lib in libs: +% if lib.language == "csharp": +% if lib.build == "all": + $(E) "[STRIP] Stripping lib${lib.name}.so" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.$(SHARED_EXT) +% endif +% endif +% endfor +endif + % for p in protos: ifeq ($(NO_PROTOC),true) $(GENDIR)/${p}.pb.cc: protoc_dep_error @@ -701,6 +722,10 @@ install_c: install-headers_c install-static_c install-shared_c install_cxx: install-headers_cxx install-static_cxx install-shared_cxx +install_csharp: install-shared_csharp install_c + +install_grpc_csharp_ext: install_csharp + install-headers: install-headers_c install-headers_cxx install-headers_c: @@ -781,6 +806,30 @@ ifneq ($(SYSTEM),Darwin) endif endif +install-shared_csharp: shared_csharp strip-shared_csharp +% for lib in libs: +% if lib.language == "csharp": +% if lib.build == "all": +ifeq ($(SYSTEM),MINGW32) + $(E) "[INSTALL] Installing ${lib.name}.$(SHARED_EXT)" + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/${lib.name}.$(SHARED_EXT) $(prefix)/lib/${lib.name}.$(SHARED_EXT) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a +else + $(E) "[INSTALL] Installing lib${lib.name}.$(SHARED_EXT)" + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.$(SHARED_EXT) +ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf lib${lib.name}.$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so +endif +endif +% endif +% endif +% endfor +ifneq ($(SYSTEM),MINGW32) +ifneq ($(SYSTEM),Darwin) + $(Q) ldconfig +endif +endif + clean: $(Q) $(RM) -rf $(OBJDIR) $(LIBDIR) $(BINDIR) $(GENDIR) |