blob: 7d29f8166b05bc2d7b8e77b9537ec680b041216c [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
27
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 Geyerfea00ac2014-10-01 02:22:48 +020037all-local: $(BIN_CPP)
38
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
47
48#TODO: other haxe targets
49# $(HAXE) --cwd . csharp
50# $(HAXE) --cwd . flash
51# $(HAXE) --cwd . java
52# $(HAXE) --cwd . javascript
53# $(HAXE) --cwd . neko
54# $(HAXE) --cwd . php
Jens Geyerbbd6fd72015-05-30 19:33:44 +020055# $(HAXE) --cwd . python # needs Haxe 3.2.0
Jens Geyerfea00ac2014-10-01 02:22:48 +020056
57
58clean-local:
59 $(RM) -r gen-haxe bin
60
61check: $(BIN_CPP)
62 $(BIN_CPP)
63
Jens Geyer65e9bde2014-11-11 01:30:02 +010064EXTRA_DIST = \
65 src \
66 cpp.hxml \
67 csharp.hxml \
68 flash.hxml \
69 java.hxml \
70 javascript.hxml \
71 neko.hxml \
72 php.hxml \
73 python.hxml \
74 project.hide \
75 HaxeTests.hxproj \
76 make_all.bat \
77 make_all.sh