blob: ee71bc9d428cb2fcd100f47d76e46f1ca12bdb75 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
David Reiss1fdb5922008-02-06 22:10:12 +000020THRIFTCODE= \
David Reissd831a212009-02-13 03:09:52 +000021 src/Collections/THashSet.cs \
Jens Geyerb706b1a2013-04-29 22:10:10 +020022 src/Collections/TCollections.cs \
Jake Farrelle0c53162011-11-16 12:58:36 +000023 src/Properties/AssemblyInfo.cs \
Jake Farrell146e5112013-04-22 22:28:56 -040024 src/Protocol/TAbstractBase.cs \
David Reiss80a44e72009-02-03 22:16:46 +000025 src/Protocol/TBase.cs \
Bryan Duxburyfd32d792010-09-18 20:51:25 +000026 src/Protocol/TBase64Utils.cs \
27 src/Protocol/TJSONProtocol.cs \
David Reiss1fdb5922008-02-06 22:10:12 +000028 src/Protocol/TProtocolException.cs \
29 src/Protocol/TProtocolFactory.cs \
30 src/Protocol/TList.cs \
31 src/Protocol/TSet.cs \
32 src/Protocol/TMap.cs \
33 src/Protocol/TProtocolUtil.cs \
34 src/Protocol/TMessageType.cs \
35 src/Protocol/TProtocol.cs \
Jens Geyer72034242013-05-08 18:46:57 +020036 src/Protocol/TProtocolDecorator.cs \
37 src/Protocol/TMultiplexedProtocol.cs \
38 src/Protocol/TMultiplexedProcessor.cs \
David Reiss1fdb5922008-02-06 22:10:12 +000039 src/Protocol/TType.cs \
40 src/Protocol/TField.cs \
41 src/Protocol/TMessage.cs \
42 src/Protocol/TStruct.cs \
43 src/Protocol/TBinaryProtocol.cs \
Jake Farrell510ecae2012-10-11 00:20:00 +000044 src/Protocol/TCompactProtocol.cs \
David Reiss80a44e72009-02-03 22:16:46 +000045 src/Server/TThreadedServer.cs \
David Reiss1fdb5922008-02-06 22:10:12 +000046 src/Server/TThreadPoolServer.cs \
47 src/Server/TSimpleServer.cs \
48 src/Server/TServer.cs \
David Reiss670cb0f2009-02-03 21:20:55 +000049 src/Transport/TBufferedTransport.cs \
David Reiss1fdb5922008-02-06 22:10:12 +000050 src/Transport/TTransport.cs \
51 src/Transport/TSocket.cs \
52 src/Transport/TTransportException.cs \
53 src/Transport/TStreamTransport.cs \
Esteve Fernandez7948a662009-11-11 18:32:25 +000054 src/Transport/TFramedTransport.cs \
David Reiss1fdb5922008-02-06 22:10:12 +000055 src/Transport/TServerTransport.cs \
56 src/Transport/TServerSocket.cs \
57 src/Transport/TTransportFactory.cs \
Bryan Duxbury62359472010-06-24 20:34:34 +000058 src/Transport/THttpClient.cs \
Jake Farrell6f1e9922011-04-13 21:09:02 +000059 src/Transport/THttpHandler.cs \
Jake Luciani938e6402013-04-25 17:53:08 -040060 src/Transport/TMemoryBuffer.cs \
David Reiss1fdb5922008-02-06 22:10:12 +000061 src/TProcessor.cs \
62 src/TApplicationException.cs
63
Henrique Mendonçada7982e2013-05-31 18:20:42 +020064THRIFTTESTCODE = \
65 test/ThriftTest/Program.cs \
66 test/ThriftTest/TestClient.cs \
67 test/ThriftTest/TestServer.cs \
68 test/ThriftTest/RoundTripTest.cs \
69 test/ThriftTest/Thrift/Test/*.cs
70
David Reisscfb23bb2008-04-02 22:09:03 +000071CSC=gmcs
Henrique Mendonçada7982e2013-05-31 18:20:42 +020072NUNIT=nunit-console
73THRIFT=../../compiler/cpp/thrift
David Reiss1fdb5922008-02-06 22:10:12 +000074
David Reissd831a212009-02-13 03:09:52 +000075if NET_2_0
76MONO_DEFINES=/d:NET_2_0
77endif
78
David Reiss3de1c4e2008-02-24 17:45:03 +000079all-local: Thrift.dll
David Reiss1fdb5922008-02-06 22:10:12 +000080
81Thrift.dll: $(THRIFTCODE)
Jake Farrelldaca3592011-04-14 01:42:12 +000082 $(CSC) $(THRIFTCODE) /out:Thrift.dll /target:library /reference:System.Web $(MONO_DEFINES)
David Reiss1fdb5922008-02-06 22:10:12 +000083
Henrique Mendonçada7982e2013-05-31 18:20:42 +020084test/ThriftTest/Thrift/Test/*.cs: ../../test/ThriftTest.thrift
85 $(THRIFT) -gen csharp:hashcode -out test/ThriftTest ../../test/ThriftTest.thrift
86
87ThriftTest.exe: Thrift.dll $(THRIFTTESTCODE)
88 $(CSC) $(THRIFTTESTCODE) /out:ThriftTest.exe /target:exe /reference:nunit.framework /reference:Thrift.dll $(MONO_DEFINES)
89
90check-local: ThriftTest.exe
91 $(NUNIT) ThriftTest.exe
92
David Reiss1fdb5922008-02-06 22:10:12 +000093clean-local:
94 $(RM) Thrift.dll
David Reiss31609712008-02-06 22:10:26 +000095
Jens Geyer379c2772013-05-09 15:23:48 +020096# run csharp tests?
97# check:
98# cd test/ThriftTest && ./maketest.sh
99# cd test/Multiplex && ./maketest.sh
100
David Reiss31609712008-02-06 22:10:26 +0000101EXTRA_DIST = \
102 $(THRIFTCODE) \
103 ThriftMSBuildTask \
104 src/Thrift.csproj \
Jake Farrell510ecae2012-10-11 00:20:00 +0000105 src/Thrift.sln \
106 src/Thrift.WP7.csproj \
Jens Geyer379c2772013-05-09 15:23:48 +0200107 src/Properties/AssemblyInfo.WP7.cs \
108 test