annotate java/build.xml @ 24:d51f1a2b4c30

adding java build file
author Robert McIntyre <rlm@mit.edu>
date Fri, 18 Nov 2011 16:05:47 -0700
parents
children 56f83c170251
rev   line source
rlm@24 1 <project name="audio-send" default="dist" basedir=".">
rlm@24 2
rlm@24 3
rlm@24 4 <property name="build" value="build"/>
rlm@24 5 <property name="src" value="src"/>
rlm@24 6 <property name="dist" value="dist"/>
rlm@24 7 <property name="headers" value="headers"/>
rlm@24 8 <property name="native" value="output/native/linux/audioSend"/>
rlm@24 9 <property name="nativeBase" value="output"/>
rlm@24 10
rlm@24 11
rlm@24 12 <target name="prepare">
rlm@24 13 <mkdir dir="${build}"/>
rlm@24 14 <mkdir dir="${headers}"/>
rlm@24 15 </target>
rlm@24 16
rlm@24 17 <target name="compile" depends="prepare" >
rlm@24 18 <javac srcdir="${src}" destdir="${build}"
rlm@24 19 includeantruntime="false"/>
rlm@24 20 </target>
rlm@24 21
rlm@24 22 <target name="native" depends="prepare, compile" >
rlm@24 23 <javah class="com.aurellem.send.AudioSend"
rlm@24 24 destdir="${headers}"
rlm@24 25 classpath="${build}"
rlm@24 26 />
rlm@24 27 </target>
rlm@24 28
rlm@24 29
rlm@24 30 <target name="dist" depends="compile, native" >
rlm@24 31 <mkdir dir="${dist}"/>
rlm@24 32 <jar jarfile="${dist}/audio-send.jar" basedir="${build}"/>
rlm@24 33 <mkdir dir="${native}"/>
rlm@24 34 <copy file="../build/libopenal.so.1.13.0"
rlm@24 35 tofile="${native}/libopenal64.so"/>
rlm@24 36 <jar jarfile="${dist}/audio-send-natives.jar"
rlm@24 37 basedir="${nativeBase}"/>
rlm@24 38 <delete dir="${nativeBase}"/>
rlm@24 39 </target>
rlm@24 40
rlm@24 41 <target name="clean" >
rlm@24 42 <delete dir="${build}"/>
rlm@24 43 <delete dir="${dist}"/>
rlm@24 44 <delete dir="${headers}"/>
rlm@24 45 <delete dir="${nativeBase}"/>
rlm@24 46 </target>
rlm@24 47
rlm@24 48
rlm@24 49 </project>
rlm@24 50