forked from gameplay3d/gameplay
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
60 lines (53 loc) · 1.67 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!-- Android build script -->
<project name="gameplay" default="all" basedir=".">
<fail message="OS not supported. Supported platforms: Windows, MacOS X or Linux.">
<condition>
<not>
<or>
<os family="unix"/>
<os family="windows"/>
</or>
</not>
</condition>
</fail>
<macrodef name="build-native">
<attribute name="location"/>
<sequential>
<exec osfamily="unix" dir="@{location}/android" executable="android">
<arg value="update"/>
<arg value="project"/>
<arg value="-t"/>
<arg value="1"/>
<arg value="-p"/>
<arg value="."/>
<arg value="-s"/>
</exec>
<exec osfamily="unix" dir="@{location}/android" executable="ndk-build"/>
<exec osfamily="windows" dir="@{location}/android" executable="cmd">
<arg value="/c"/>
<arg value="android.bat"/>
<arg value="update"/>
<arg value="project"/>
<arg value="-t"/>
<arg value="1"/>
<arg value="-p"/>
<arg value="."/>
<arg value="-s"/>
</exec>
<exec osfamily="windows" dir="@{location}/android" executable="cmd">
<arg value="/c"/>
<arg value="ndk-build"/>
</exec>
</sequential>
</macrodef>
<target name="all">
<build-native location="gameplay"/>
<build-native location="samples/browser"/>
<build-native location="samples/character"/>
<build-native location="samples/lua"/>
<build-native location="samples/mesh"/>
<build-native location="samples/particles"/>
<build-native location="samples/racer"/>
<build-native location="samples/spaceship"/>
</target>
</project>