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