Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [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 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
| 21 | |
| 22 | gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tutorial/tutorial.thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 23 | $(THRIFT) --gen go -r $< |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 24 | |
| 25 | all-local: gen-go/tutorial/calculator.go |
| 26 | |
| 27 | |
| 28 | check: src/git.apache.org/thrift.git/lib/go/thrift |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 29 | $(THRIFT) -r --gen go $(top_srcdir)/tutorial/tutorial.thrift |
| 30 | cp -r gen-go/* src/ |
| 31 | GOPATH=`pwd` $(GO) build ./... |
| 32 | GOPATH=`pwd` $(GO) build -o go-tutorial src/*.go |
| 33 | GOPATH=`pwd` $(GO) build -o calculator-remote src/tutorial/calculator-remote/calculator-remote.go |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 34 | |
| 35 | src/git.apache.org/thrift.git/lib/go/thrift: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 36 | mkdir -p src/git.apache.org/thrift.git/lib/go |
| 37 | ln -sf $(realpath $(top_srcdir)/lib/go/thrift) src/git.apache.org/thrift.git/lib/go/thrift |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 38 | |
| 39 | tutorialserver: all |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 40 | GOPATH=`pwd` $(GO) run src/*.go -server=true |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 41 | |
| 42 | tutorialclient: all |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 43 | GOPATH=`pwd` $(GO) run src/*.go |
Jens Geyer | 4c83595 | 2013-08-13 21:34:17 +0200 | [diff] [blame] | 44 | |
| 45 | tutorialsecureserver: all |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 46 | GOPATH=`pwd` $(GO) run src/*.go -server=true -secure=true |
Jens Geyer | 4c83595 | 2013-08-13 21:34:17 +0200 | [diff] [blame] | 47 | |
| 48 | tutorialsecureclient: all |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 49 | GOPATH=`pwd` $(GO) run src/*.go -secure=true |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 50 | |
| 51 | clean-local: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 52 | $(RM) -r gen-* src/shared src/tutorial src/git.apache.org go-tutorial calculator-remote |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 53 | |
| 54 | EXTRA_DIST = \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 55 | src/client.go \ |
| 56 | src/handler.go \ |
| 57 | src/server.go \ |
| 58 | src/main.go \ |
| 59 | server.crt \ |
| 60 | server.key |
jfarrell | 102c600 | 2013-08-15 21:20:19 -0400 | [diff] [blame] | 61 | |