changeset 1:5f60298bcc0b

Added build file (for ant) with the compile-matlab target (still with my filesystem's local paths).
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 27 Nov 2013 12:09:16 +0000
parents b6acfffd25cd
children 8395a4a884d7
files build.xml
diffstat 1 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build.xml	Wed Nov 27 12:09:16 2013 +0000
@@ -0,0 +1,42 @@
+<project name="EchoWebApp" default="compile-matlab" basedir=".">
+    <description>
+        Simple build file for the EchoLocation WebApp.
+    </description>
+
+  <!-- set global properties for this build -->
+  <property name="matlab_src" location="webapp/WEB-INF/mcode/"/>
+  <property name="build" location="scratch"/>
+  <property name="dist"  location="dist"/>
+
+  <target name="init">
+    <!-- Create the time stamp -->
+    <tstamp/>
+    <!-- Create the build directory structure used by compile -->
+    <mkdir dir="${build}"/>
+  </target>
+
+
+  <target name="compile-matlab" depends="init"
+    description="compile the MATLAB source" >
+    <exec executable="/Applications/MATLAB_R2013b.app/bin/mcc">
+      <!-- Will create the java package with the HumanEcho class -->
+      <arg value='-W "java:uk.ac.soton.isvr,HumanEcho" -d ${build} -T "link:lib" -v "class{HumanEcho:./webapp/WEB-INF/mcode/gen_echo.m}"'/>
+    </exec>
+  </target>
+
+  <target name="dist" depends="compile-matlab"
+        description="generate the distribution" >
+    <!-- Create the distribution directory -->
+    <mkdir dir="${dist}/lib"/>
+
+    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
+    <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
+  </target>
+
+  <target name="clean"
+        description="clean up" >
+    <!-- Delete the ${build} and ${dist} directory trees -->
+    <delete dir="${build}"/>
+    <delete dir="${dist}"/>
+  </target>
+</project>
\ No newline at end of file