blob: 37ccfc38931cebe7ce6f2228a4e27bba8298f77e [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
Roger Meier41ad4342015-03-24 22:30:40 +010020THRIFT = $(top_builddir)/compiler/cpp/thrift
Jens Geyerbd52f1a2014-07-28 01:25:30 +020021THRIFTCMD = $(THRIFT) --gen haxe -r
22THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
23
24BIN_CPP = bin/Main-debug
25
Jens Geyerfea00ac2014-10-01 02:22:48 +020026gen-haxe/thrift/test/ThriftTest.hx: $(THRIFTTEST)
Jens Geyerbd52f1a2014-07-28 01:25:30 +020027 $(THRIFTCMD) $(THRIFTTEST)
Jens Geyerfea00ac2014-10-01 02:22:48 +020028
Jens Geyerbd52f1a2014-07-28 01:25:30 +020029all-local: $(BIN_CPP)
Jens Geyerfea00ac2014-10-01 02:22:48 +020030
Jens Geyerbbd6fd72015-05-30 19:33:44 +020031$(BIN_CPP): \
32 src/*.hx \
33 ../../lib/haxe/src/org/apache/thrift/**/*.hx \
34 gen-haxe/thrift/test/ThriftTest.hx
Jens Geyerbd52f1a2014-07-28 01:25:30 +020035 $(HAXE) --cwd . cpp.hxml
36
Jens Geyerfea00ac2014-10-01 02:22:48 +020037
Jens Geyerbd52f1a2014-07-28 01:25:30 +020038#TODO: other haxe targets
Jens Geyerfea00ac2014-10-01 02:22:48 +020039# $(HAXE) --cwd . csharp
40# $(HAXE) --cwd . flash
41# $(HAXE) --cwd . java
42# $(HAXE) --cwd . javascript
43# $(HAXE) --cwd . neko
44# $(HAXE) --cwd . php
Jens Geyerbbd6fd72015-05-30 19:33:44 +020045# $(HAXE) --cwd . python # needs Haxe 3.2.0
Jens Geyerbd52f1a2014-07-28 01:25:30 +020046
47
48clean-local:
49 $(RM) -r gen-haxe bin
50
51check: $(BIN_CPP)
Jens Geyer8c8e9c62014-12-29 19:52:47 +010052 timeout 10 $(BIN_CPP) server &
Jens Geyerbd52f1a2014-07-28 01:25:30 +020053 sleep 1
54 $(BIN_CPP) client
Jens Geyer8c8e9c62014-12-29 19:52:47 +010055 sleep 10
Jens Geyerbd52f1a2014-07-28 01:25:30 +020056
Jens Geyer65e9bde2014-11-11 01:30:02 +010057EXTRA_DIST = \
58 src \
59 cpp.hxml \
60 csharp.hxml \
61 flash.hxml \
62 java.hxml \
63 javascript.hxml \
64 neko.hxml \
65 php.hxml \
66 python.hxml \
67 project.hide \
68 TestClientServer.hxproj \
69 make_all.bat \
70 make_all.sh