blob: 57253d6b57b8b5dcddd881fd79db8f96474b75fe [file] [log] [blame]
Nobuaki Sukegawa88c5ee72016-09-04 18:49:18 +09001#
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
20GENERATED = \
21 gen-csharp/Aggr.cs \
22 gen-csharp/BenchmarkService.cs \
23 gen-csharp/Error.cs
24
25BUILT_SOURCES = $(GENERATED)
26
27THRIFT = $(top_builddir)/compiler/cpp/thrift
28
29gen-csharp/Aggr.cs: $(top_srcdir)/contrib/async-test/aggr.thrift
30 $(THRIFT) --gen csharp $<
31
32gen-csharp/BenchmarkService.cs gen-csharp/Error.cs: $(top_srcdir)/lib/rb/benchmark/Benchmark.thrift
33 $(THRIFT) --gen csharp $<
34
35ThriftImpl.dll: Multiplex.Test.Common.cs $(GENERATED) ../../Thrift.dll
36 $(CSC) $(CSC_DEFINES) -t:library -out:./ThriftImpl.dll -reference:../../Thrift.dll $(GENERATED) $<
37
38MultiplexClient.exe: Client/Multiplex.Test.Client.cs ThriftImpl.dll
39 $(CSC) $(CSC_DEFINES) -out:$@ -reference:../../Thrift.dll -reference:ThriftImpl.dll $<
40
41MultiplexServer.exe: Server/Multiplex.Test.Server.cs ThriftImpl.dll
42 $(CSC) $(CSC_DEFINES) -out:$@ -reference:../../Thrift.dll -reference:ThriftImpl.dll $<
43
44clean-local:
45 $(RM) -rf gen-csharp *.exe *.dll
46
47TESTPORT = 9501
48check-local: MultiplexServer.exe MultiplexClient.exe
49 echo $(TESTPORT)
50 MONO_PATH=../../ timeout 10 mono MultiplexServer.exe $(TESTPORT) &
51 sleep 1
52 MONO_PATH=../../ mono MultiplexClient.exe $(TESTPORT)