Skip to content

Commit

Permalink
Select device target
Browse files Browse the repository at this point in the history
  • Loading branch information
irtimmer committed Jan 2, 2015
1 parent 52ff102 commit d14c507
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<property name="one-jar.dist.dir" value="${libs.dir}/build"/>

<property name="classes.dir" location="${basedir}/classes"/>

<property name="device" value="all"/>

<target name="init">
<mkdir dir="${classes.dir}"/>
Expand Down Expand Up @@ -58,14 +60,35 @@

<target name="build" depends="compile-native, compile-common, compile-java"/>

<target name="compile-native">
<exec executable="make" dir="${libs.omx.dir}"/>
<exec executable="make" dir="${libs.imx.dir}"/>
<exec executable="make" dir="${libs.opus.dir}"/>
<exec executable="make" dir="${libs.alsa.dir}"/>
<exec executable="make" dir="${libs.io.dir}"/>
<target name="check-device">
<condition property="enable.omx" value="true">
<or>
<equals arg1="${device}" arg2="pi" />
<equals arg1="${device}" arg2="all" />
</or>
</condition>
<condition property="enable.imx" value="true">
<or>
<equals arg1="${device}" arg2="imx" />
<equals arg1="${device}" arg2="all" />
</or>
</condition>
</target>

<target name="compile-native" depends="check-device, compile-native-pi, compile-native-imx">
<exec executable="make" dir="${libs.opus.dir}"/>
<exec executable="make" dir="${libs.alsa.dir}"/>
<exec executable="make" dir="${libs.io.dir}"/>
</target>

<target name="compile-native-pi" if="enable.omx">
<exec executable="make" dir="${libs.omx.dir}"/>
</target>

<target name="compile-native-imx" if="enable.imx">
<exec executable="make" dir="${libs.imx.dir}"/>
</target>

<target name="compile-java" depends="init">
<!-- compile limelight -->
<javac includeantruntime="false" destdir="${classes.dir}/src">
Expand Down

0 comments on commit d14c507

Please sign in to comment.