blob: e9c88204c98c777624862eeb2a8a32706fabf7c7 [file] [log] [blame]
Jens Geyerbd52f1a2014-07-28 01:25:30 +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
20THRIFT = $(top_builddir)/compiler/cpp/thrift
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030021
22BIN_CPP = bin/Main-debug
Jens Geyer1d20a372016-03-15 23:04:27 +020023BIN_PHP = bin/php/Main-debug.php
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030024BIN_PHP_WEB = bin/php-web-server/Main-debug.php
Jens Geyer1d20a372016-03-15 23:04:27 +020025
Jens Geyerbd52f1a2014-07-28 01:25:30 +020026
27gen-haxe/tutorial/calculator.hx gen-haxe/shared/shared_service.hx: $(top_srcdir)/tutorial/tutorial.thrift
28 $(THRIFT) --gen haxe -r $<
29
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030030all-local: $(BIN_CPP) $(BIN_PHP) $(BIN_PHP_WEB)
Jens Geyerbd52f1a2014-07-28 01:25:30 +020031
32check: gen-haxe/tutorial/calculator.hx
33
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030034$(BIN_CPP): \
Jens Geyerbbd6fd72015-05-30 19:33:44 +020035 src/*.hx \
36 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
37 gen-haxe/tutorial/calculator.hx
Jens Geyerbd52f1a2014-07-28 01:25:30 +020038 $(HAXE) --cwd . cpp.hxml
Jens Geyerfea00ac2014-10-01 02:22:48 +020039
Jens Geyer1d20a372016-03-15 23:04:27 +020040$(BIN_PHP): \
41 src/*.hx \
42 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
43 gen-haxe/tutorial/calculator.hx
44 $(HAXE) --cwd . php.hxml
45
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030046$(BIN_PHP_WEB): \
47 src/*.hx \
48 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
49 gen-haxe/tutorial/calculator.hx
50 $(HAXE) --cwd . php-web-server.hxml
51
Jens Geyerbd52f1a2014-07-28 01:25:30 +020052tutorialserver: all
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030053 $(BIN_CPP) server
Jens Geyerbd52f1a2014-07-28 01:25:30 +020054
Jens Geyer1d20a372016-03-15 23:04:27 +020055tutorialserver_php: all
56 php -f $(BIN_PHP) server
57
Jens Geyerbd52f1a2014-07-28 01:25:30 +020058tutorialclient: all
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030059 $(BIN_CPP)
Jens Geyerbd52f1a2014-07-28 01:25:30 +020060
Jens Geyer1d20a372016-03-15 23:04:27 +020061tutorialclient_php: all
62 php -f $(BIN_PHP)
63
Jens Geyerbd52f1a2014-07-28 01:25:30 +020064tutorialsecureserver: all
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030065 $(BIN_CPP) server secure
Jens Geyerbd52f1a2014-07-28 01:25:30 +020066
Jens Geyer1d20a372016-03-15 23:04:27 +020067tutorialsecureserver_php: all
68 php -f $(BIN_PHP) server secure
69
Jens Geyerbd52f1a2014-07-28 01:25:30 +020070tutorialsecureclient: all
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030071 $(BIN_CPP) secure
Jens Geyerbd52f1a2014-07-28 01:25:30 +020072
Jens Geyer1d20a372016-03-15 23:04:27 +020073tutorialsecureclient_php: all
74 php -f $(BIN_PHP) secure
75
Oleksii Prudkyi39a09ac2016-05-19 16:55:11 +030076tutorialserver_php_http: all
77 php -S 127.0.0.1:9090 router.php
78
79tutorialclient_http: all
80 $(BIN_CPP) client http
81
Jens Geyerbd52f1a2014-07-28 01:25:30 +020082clean-local:
83 $(RM) -r gen-haxe bin
84
85EXTRA_DIST = \
Jens Geyer65e9bde2014-11-11 01:30:02 +010086 src \
87 cpp.hxml \
88 csharp.hxml \
89 flash.hxml \
90 java.hxml \
91 javascript.hxml \
92 neko.hxml \
93 php.hxml \
94 python.hxml \
95 project.hide \
96 Tutorial.hxproj \
97 make_all.bat \
98 make_all.sh