blob: 5c638d4aa3f746b4b2b6e683eab8aff9c76b4e04 [file] [log] [blame]
Jens Geyerfea00ac2014-10-01 02:22:48 +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
Roger Meier41ad4342015-03-24 22:30:40 +010020THRIFT = $(top_builddir)/compiler/cpp/thrift
Jens Geyerfea00ac2014-10-01 02:22:48 +020021THRIFTCMD = $(THRIFT) --gen haxe -r
22THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
Jens Geyere5ff9a82014-11-11 01:39:38 +010023AGGR = $(top_srcdir)/contrib/async-test/aggr.thrift
24BENCHMARK = $(top_srcdir)/lib/rb/benchmark/Benchmark.thrift
Jens Geyerfea00ac2014-10-01 02:22:48 +020025
26BIN_CPP = bin/Main-debug
Jens Geyer1d20a372016-03-15 23:04:27 +020027BIN_PHP = bin/php/Main-debug.php
Jens Geyerfea00ac2014-10-01 02:22:48 +020028
29gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST)
30 $(THRIFTCMD) $(THRIFTTEST)
31
Jens Geyere5ff9a82014-11-11 01:39:38 +010032gen-haxe/thrift/test/Aggr.hx: $(AGGR)
33 $(THRIFTCMD) $(AGGR)
34
35gen-haxe/thrift/test/BenchmarkService.hx: $(BENCHMARK)
36 $(THRIFTCMD) $(BENCHMARK)
37
Jens Geyer1d20a372016-03-15 23:04:27 +020038all-local: $(BIN_CPP) $(BIN_PHP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020039
Jens Geyerbbd6fd72015-05-30 19:33:44 +020040$(BIN_CPP): \
41 src/*.hx \
42 ../src/org/apache/thrift/**/*.hx \
43 gen-haxe/thrift/test/ThriftTest.hx \
44 gen-haxe/thrift/test/Aggr.hx \
45 gen-haxe/thrift/test/BenchmarkService.hx
Jens Geyerfea00ac2014-10-01 02:22:48 +020046 $(HAXE) --cwd . cpp.hxml
47
Jens Geyer1d20a372016-03-15 23:04:27 +020048$(BIN_PHP): \
49 src/*.hx \
50 ../src/org/apache/thrift/**/*.hx \
51 gen-haxe/thrift/test/ThriftTest.hx \
52 gen-haxe/thrift/test/Aggr.hx \
53 gen-haxe/thrift/test/BenchmarkService.hx
54 $(HAXE) --cwd . php.hxml
55
Jens Geyerfea00ac2014-10-01 02:22:48 +020056
57#TODO: other haxe targets
58# $(HAXE) --cwd . csharp
59# $(HAXE) --cwd . flash
60# $(HAXE) --cwd . java
61# $(HAXE) --cwd . javascript
62# $(HAXE) --cwd . neko
Jens Geyerbbd6fd72015-05-30 19:33:44 +020063# $(HAXE) --cwd . python # needs Haxe 3.2.0
Jens Geyerfea00ac2014-10-01 02:22:48 +020064
65
66clean-local:
67 $(RM) -r gen-haxe bin
68
Jens Geyer1d20a372016-03-15 23:04:27 +020069check: $(BIN_CPP) $(BIN_PHP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020070 $(BIN_CPP)
Jens Geyer1d20a372016-03-15 23:04:27 +020071 php -f $(BIN_PHP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020072
Jens Geyer65e9bde2014-11-11 01:30:02 +010073EXTRA_DIST = \
74 src \
75 cpp.hxml \
76 csharp.hxml \
77 flash.hxml \
78 java.hxml \
79 javascript.hxml \
80 neko.hxml \
81 php.hxml \
82 python.hxml \
83 project.hide \
84 HaxeTests.hxproj \
85 make_all.bat \
86 make_all.sh