blob: e323358fd16d014b8f5bc3c713fa0e2b85ef0a6a [file] [log] [blame]
Jens Geyer0e87c462013-06-18 22:25:07 +02001#
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
Yuxuan 'fishy' Wang8045d822022-04-19 14:31:39 -070020if GOVERSION_GE_118
21GOBUILDEXTRA = -buildvcs=false
22else
23GOBUILDEXTRA =
24endif
25
Jens Geyer0e87c462013-06-18 22:25:07 +020026gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tutorial/tutorial.thrift
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070027 $(THRIFT) --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/tutorial/go/gen-go/$(COMPILER_EXTRAFLAG) -r $<
Jens Geyer0e87c462013-06-18 22:25:07 +020028
29all-local: gen-go/tutorial/calculator.go
30
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070031check: thirdparty-dep all
Yuxuan 'fishy' Wang8045d822022-04-19 14:31:39 -070032 $(GO) build $(GOBUILDEXTRA) -mod=mod -o go-tutorial ./src
33 $(GO) build $(GOBUILDEXTRA) -mod=mod -o calculator-remote ./gen-go/tutorial/calculator-remote/calculator-remote.go
Jens Geyer0e87c462013-06-18 22:25:07 +020034
taozlec0d384a2017-07-17 18:40:42 +020035thirdparty-dep:
taozlec0d384a2017-07-17 18:40:42 +020036
Jens Geyer0e87c462013-06-18 22:25:07 +020037tutorialserver: all
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070038 $(GO) run -mod=mod src/*.go -server=true
Jens Geyer0e87c462013-06-18 22:25:07 +020039
40tutorialclient: all
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070041 $(GO) run -mod=mod src/*.go
Jens Geyer4c835952013-08-13 21:34:17 +020042
43tutorialsecureserver: all
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070044 $(GO) run -mod=mod src/*.go -server=true -secure=true
Jens Geyer4c835952013-08-13 21:34:17 +020045
46tutorialsecureclient: all
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070047 $(GO) run -mod=mod src/*.go -secure=true
Jens Geyer0e87c462013-06-18 22:25:07 +020048
49clean-local:
Yuxuan 'fishy' Wangb71f11e2021-03-22 15:01:00 -070050 $(RM) -r gen-* go-tutorial calculator-remote
Jens Geyer0e87c462013-06-18 22:25:07 +020051
52EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020053 src/client.go \
54 src/handler.go \
55 src/server.go \
56 src/main.go \
57 server.crt \
58 server.key
jfarrell102c6002013-08-15 21:20:19 -040059