summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reiss <dreiss@apache.org>2008-02-06 22:10:12 +0000
committerDavid Reiss <dreiss@apache.org>2008-02-06 22:10:12 +0000
commit1fdb59242a697202587c3ef714e703144073dfbb (patch)
tree8a20622336cf2725756a5bd6e768df98b856a624
parent46dc62950d24cf785415de040255b3b0c67ecb3a (diff)
downloadthrift-1fdb59242a697202587c3ef714e703144073dfbb.tar.gz
Thrift: Add a Makefile to build the C# library with Mono.
Reviewed By: mcslee Test Plan: Installed Mono and built it. Revert Plan: ok Other Notes: Submitted by Ben Maurer. Actually reviewed by Todd Berman. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665465 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xcleanup.sh1
-rw-r--r--configure.ac5
-rw-r--r--lib/Makefile.am4
-rw-r--r--lib/csharp/Makefile.am37
4 files changed, 47 insertions, 0 deletions
diff --git a/cleanup.sh b/cleanup.sh
index 4760f4354..fe0d6ed4c 100755
--- a/cleanup.sh
+++ b/cleanup.sh
@@ -34,4 +34,5 @@ if/Makefile.in \
lib/Makefile.in \
lib/cpp/Makefile.in \
lib/py/Makefile.in \
+lib/csharp/Makefile.in \
test/Makefile.in
diff --git a/configure.ac b/configure.ac
index de9d704cc..335ec875d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,10 @@ AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$success" = "yes"])
AX_LIB_ZLIB([1.2.3])
AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$success" = "yes"])
+PKG_CHECK_MODULES(MONO, mono >= 1.2.6, have_mono=yes, have_mono=no)
+AM_CONDITIONAL(ENABLE_MONO, [test "$have_mono" = "yes"])
+
+
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
@@ -104,6 +108,7 @@ AC_CONFIG_FILES([
lib/cpp/thrift.pc
lib/cpp/thrift-nb.pc
lib/cpp/thrift-z.pc
+ lib/csharp/Makefile
lib/py/Makefile
if/Makefile
test/Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 06cf11abf..caf002fde 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2,6 +2,10 @@ SUBDIRS = \
cpp \
py
+if ENABLE_MONO
+SUBDIRS += csharp
+endif
+
EXTRA_DIST = \
cocoa \
erl \
diff --git a/lib/csharp/Makefile.am b/lib/csharp/Makefile.am
new file mode 100644
index 000000000..3b88dbb95
--- /dev/null
+++ b/lib/csharp/Makefile.am
@@ -0,0 +1,37 @@
+THRIFTCODE= \
+ src/Protocol/TProtocolException.cs \
+ src/Protocol/TProtocolFactory.cs \
+ src/Protocol/TList.cs \
+ src/Protocol/TSet.cs \
+ src/Protocol/TMap.cs \
+ src/Protocol/TProtocolUtil.cs \
+ src/Protocol/TMessageType.cs \
+ src/Protocol/TProtocol.cs \
+ src/Protocol/TType.cs \
+ src/Protocol/TField.cs \
+ src/Protocol/TMessage.cs \
+ src/Protocol/TStruct.cs \
+ src/Protocol/TBinaryProtocol.cs \
+ src/Server/TThreadPoolServer.cs \
+ src/Server/TSimpleServer.cs \
+ src/Server/TServer.cs \
+ src/Transport/TTransport.cs \
+ src/Transport/TSocket.cs \
+ src/Transport/TTransportException.cs \
+ src/Transport/TStreamTransport.cs \
+ src/Transport/TServerTransport.cs \
+ src/Transport/TServerSocket.cs \
+ src/Transport/TTransportFactory.cs \
+ src/TProcessor.cs \
+ src/TApplicationException.cs
+
+
+CSC=gmcs -langversion:linq
+
+all: Thrift.dll
+
+Thrift.dll: $(THRIFTCODE)
+ $(CSC) $(THRIFTCODE) /out:Thrift.dll /target:library
+
+clean-local:
+ $(RM) Thrift.dll