forked from yomguy/servestream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_rules.xml
45 lines (38 loc) · 1.39 KB
/
custom_rules.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
<!-- quick check on ndk.dir -->
<target name="-check-ndk">
<fail
message="ndk.dir is missing. Make sure to put it in local.properties"
unless="ndk.dir"
/>
</target>
<target name="-check-dependencies">
<fail
message="yasm is missing. Make ensure yasm is installed and present in /usr/bin"
unless="yasm.exists"
/>
</target>
<target name="native-build" depends="native-clean">
<exec executable="${ndk.dir}/ndk-build" failonerror="true" />
</target>
<target name="native-clean">
<exec executable="${ndk.dir}/ndk-build" failonerror="true">
<arg value="clean" />
</exec>
</target>
<target name="build-ffmpeg">
<exec executable="/bin/sh" dir="." failonerror="true" osfamily="unix">
<arg value="scripts/build-ffmpeg.sh" />
</exec>
</target>
<target name="-pre-build">
<available file="/usr/bin/yasm" type="file" property="yasm.exists"/>
<antcall target="-check-dependencies" />
<echo>Building native code...</echo>
<antcall target="-check-ndk" />
<antcall target="build-ffmpeg" />
<antcall target="native-build" />
<echo>Successfully built native code</echo>
</target>
</project>