diff build-isvr.xml @ 34:3fead3e53b4a

Split the build file in two: build.xml (default) and build-isvr.xml (which assumes you have the isvr.jar file avaiulable). Changed the installation intructions accordingly.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 10 Dec 2013 18:43:20 +0000
parents
children 6477743653d3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build-isvr.xml	Tue Dec 10 18:43:20 2013 +0000
@@ -0,0 +1,39 @@
+<project name="EchoWebApp" default="compile-matlab" basedir=".">
+    <description>
+        Builds the isvr.jar.
+    </description>
+
+  <!-- set global properties for this build -->
+  <property name="matlab-src" location="mcode/human-echolocation"/>
+  <property name="matlab-build" location="scratch"/>
+  <property name="lib" location="WebContent/WEB-INF/lib"/>
+
+  <uptodate property="matlabCompile.notRequired" targetfile="${matlab-build}/isvr.jar" >
+    <srcfiles dir= "${matlab-src}" includes="*.m"/>
+    <srcfiles dir= "${matlab-src}/private" includes="*.m"/>
+  </uptodate>
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${matlab-build}"/>
+  </target>
+
+  <target name="compile-matlab" depends="init" unless="matlabCompile.notRequired"
+    description="compile the MATLAB source" >
+
+    <exec executable="/Applications/MATLAB_R2013b.app/bin/mcc">
+      <!-- Will create the java package with the HumanEcho class -->
+      <arg line='-W "java:uk.ac.soton.isvr,HumanEcho" -d ${matlab-build} -T "link:lib" -v "class{HumanEcho:${matlab-src}/simulateBinauralSignals.m}"'/>
+    </exec>
+
+    <!-- Copy the generated jar to the lib folder -->
+    <copy file="${matlab-build}/isvr.jar" tofile="${lib}/isvr.jar" overwrite="true" />
+  </target>
+
+  <target name="clean" description="clean up" >
+    <!-- Delete the ${build} and ${dist} directory trees -->
+    <delete dir="${build}"/>
+  </target>
+</project>