diff 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
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/build.xml	Fri Nov 18 16:05:47 2011 -0700
     1.3 @@ -0,0 +1,50 @@
     1.4 +<project name="audio-send" default="dist" basedir="."> 
     1.5 +
     1.6 +
     1.7 +  <property name="build" value="build"/>
     1.8 +  <property name="src" value="src"/>
     1.9 +  <property name="dist" value="dist"/>
    1.10 +  <property name="headers"  value="headers"/>
    1.11 +  <property name="native" value="output/native/linux/audioSend"/>
    1.12 +  <property name="nativeBase" value="output"/>
    1.13 +
    1.14 +
    1.15 +  <target name="prepare">
    1.16 +    <mkdir dir="${build}"/>
    1.17 +    <mkdir dir="${headers}"/>
    1.18 +  </target>
    1.19 +
    1.20 +  <target name="compile" depends="prepare" >
    1.21 +    <javac srcdir="${src}" destdir="${build}"
    1.22 +	   includeantruntime="false"/>
    1.23 +  </target>
    1.24 +
    1.25 +  <target name="native" depends="prepare, compile" >
    1.26 +    <javah class="com.aurellem.send.AudioSend"
    1.27 +	   destdir="${headers}"
    1.28 +	   classpath="${build}"
    1.29 +	   />
    1.30 +  </target>
    1.31 +
    1.32 +
    1.33 +  <target name="dist" depends="compile, native" >
    1.34 +    <mkdir dir="${dist}"/> 
    1.35 +    <jar jarfile="${dist}/audio-send.jar" basedir="${build}"/>
    1.36 +    <mkdir dir="${native}"/>
    1.37 +    <copy file="../build/libopenal.so.1.13.0"
    1.38 +	  tofile="${native}/libopenal64.so"/>
    1.39 +    <jar jarfile="${dist}/audio-send-natives.jar" 
    1.40 +	 basedir="${nativeBase}"/>
    1.41 +    <delete dir="${nativeBase}"/>
    1.42 +  </target>
    1.43 +
    1.44 +  <target name="clean" > 
    1.45 +    <delete dir="${build}"/> 
    1.46 +    <delete dir="${dist}"/> 
    1.47 +    <delete dir="${headers}"/>
    1.48 +    <delete dir="${nativeBase}"/>
    1.49 +  </target> 
    1.50 +
    1.51 +
    1.52 +</project>
    1.53 +