Volodymyr Gotra | b587a12 | 2016-09-14 19:18:48 -0500 | [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 | SUBDIRS = . |
| 21 | |
| 22 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
| 23 | |
| 24 | GENDIR = ThriftTest/gen-netcore |
| 25 | |
| 26 | # Due to a known issue with "dotnet restore" the Thrift.dll dependency cannot be resolved from cmdline. |
| 27 | # The problem does NOT affect Visual Studio builds, only cmdline. |
| 28 | # - For details see https://github.com/dotnet/cli/issues/3199 and related tickets. |
| 29 | # - Workaround is to temporarily copy the Thrift project into the solution |
| 30 | COPYCMD = cp -u -p -r |
| 31 | |
| 32 | |
| 33 | THRIFTCODE = \ |
| 34 | ThriftTest/TestClient.cs \ |
| 35 | ThriftTest/TestServer.cs \ |
| 36 | ThriftTest/Properties/AssemblyInfo.cs \ |
| 37 | ThriftTest/Program.cs |
| 38 | |
| 39 | all-local: \ |
| 40 | ThriftTest.exe |
| 41 | |
| 42 | ThriftTest.exe: $(THRIFTCODE) |
| 43 | $(MKDIR_P) $(GENDIR) |
| 44 | $(THRIFT) -gen netcore:wcf -r -out $(GENDIR) $(top_srcdir)/test/ThriftTest.thrift |
| 45 | $(MKDIR_P) ./Thrift |
| 46 | $(COPYCMD) $(top_srcdir)/lib/netcore/Thrift/* ./Thrift |
| 47 | $(DOTNETCORE) --info |
| 48 | $(DOTNETCORE) restore |
| 49 | $(DOTNETCORE) build **/*/project.json -r win10-x64 |
| 50 | $(DOTNETCORE) build **/*/project.json -r osx.10.11-x64 |
| 51 | $(DOTNETCORE) build **/*/project.json -r ubuntu.16.04-x64 |
| 52 | |
| 53 | clean-local: |
| 54 | $(RM) ThriftTest.exe |
| 55 | $(RM) -r $(GENDIR) |
| 56 | $(RM) -r ThriftTest/bin |
| 57 | $(RM) -r ThriftTest/obj |
| 58 | $(RM) -r Thrift |
| 59 | |
| 60 | EXTRA_DIST = \ |
| 61 | $(THRIFTCODE) \ |
| 62 | global.json \ |
| 63 | ThriftTest/project.json \ |
| 64 | ThriftTest/ThriftTest.sln \ |
| 65 | ThriftTest/ThriftTest.xproj \ |
| 66 | build.cmd \ |
| 67 | build.sh |
| 68 | |