blob: 2b8b24524cc5ee35d9f0b97cd53a1eea739e951c [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
Jens Geyerfea00ac2014-10-01 02:22:48 +020020THRIFTCMD = $(THRIFT) --gen haxe -r
21THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
Jens Geyere5ff9a82014-11-11 01:39:38 +010022AGGR = $(top_srcdir)/contrib/async-test/aggr.thrift
23BENCHMARK = $(top_srcdir)/lib/rb/benchmark/Benchmark.thrift
Jens Geyerfea00ac2014-10-01 02:22:48 +020024
25BIN_CPP = bin/Main-debug
Jens Geyer1d20a372016-03-15 23:04:27 +020026BIN_PHP = bin/php/Main-debug.php
Jens Geyerfea00ac2014-10-01 02:22:48 +020027
28gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST)
29 $(THRIFTCMD) $(THRIFTTEST)
30
Jens Geyere5ff9a82014-11-11 01:39:38 +010031gen-haxe/thrift/test/Aggr.hx: $(AGGR)
32 $(THRIFTCMD) $(AGGR)
33
34gen-haxe/thrift/test/BenchmarkService.hx: $(BENCHMARK)
35 $(THRIFTCMD) $(BENCHMARK)
36
Jens Geyer1d20a372016-03-15 23:04:27 +020037all-local: $(BIN_CPP) $(BIN_PHP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020038
Jens Geyerbbd6fd72015-05-30 19:33:44 +020039$(BIN_CPP): \
40 src/*.hx \
41 ../src/org/apache/thrift/**/*.hx \
42 gen-haxe/thrift/test/ThriftTest.hx \
43 gen-haxe/thrift/test/Aggr.hx \
44 gen-haxe/thrift/test/BenchmarkService.hx
Jens Geyerfea00ac2014-10-01 02:22:48 +020045 $(HAXE) --cwd . cpp.hxml
46
Jens Geyer1d20a372016-03-15 23:04:27 +020047$(BIN_PHP): \
48 src/*.hx \
49 ../src/org/apache/thrift/**/*.hx \
50 gen-haxe/thrift/test/ThriftTest.hx \
51 gen-haxe/thrift/test/Aggr.hx \
52 gen-haxe/thrift/test/BenchmarkService.hx
53 $(HAXE) --cwd . php.hxml
54
Jens Geyerfea00ac2014-10-01 02:22:48 +020055
56#TODO: other haxe targets
57# $(HAXE) --cwd . csharp
58# $(HAXE) --cwd . flash
59# $(HAXE) --cwd . java
60# $(HAXE) --cwd . javascript
61# $(HAXE) --cwd . neko
Jens Geyerbbd6fd72015-05-30 19:33:44 +020062# $(HAXE) --cwd . python # needs Haxe 3.2.0
Jens Geyerfea00ac2014-10-01 02:22:48 +020063
64
65clean-local:
66 $(RM) -r gen-haxe bin
67
Jens Geyer1d20a372016-03-15 23:04:27 +020068check: $(BIN_CPP) $(BIN_PHP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020069 $(BIN_CPP)
Jens Geyer1d20a372016-03-15 23:04:27 +020070 php -f $(BIN_PHP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020071
Jens Geyer65e9bde2014-11-11 01:30:02 +010072EXTRA_DIST = \
73 src \
74 cpp.hxml \
75 csharp.hxml \
76 flash.hxml \
77 java.hxml \
78 javascript.hxml \
79 neko.hxml \
80 php.hxml \
81 python.hxml \
82 project.hide \
83 HaxeTests.hxproj \
84 make_all.bat \
85 make_all.sh