luis@1
|
1 <project name="EchoWebApp" default="compile-matlab" basedir=".">
|
luis@1
|
2 <description>
|
luis@1
|
3 Simple build file for the EchoLocation WebApp.
|
luis@1
|
4 </description>
|
luis@1
|
5
|
luis@1
|
6 <!-- set global properties for this build -->
|
luis@4
|
7 <property name="matlab-src" location="webapp/WEB-INF/mcode"/>
|
luis@4
|
8 <property name="matlab-build" location="scratch"/>
|
luis@4
|
9 <property name="lib" location="webapp/WEB-INF/lib"/>
|
luis@6
|
10 <property name="compile-test" location="webapp/WEB-INF/lib"/>
|
luis@6
|
11
|
luis@1
|
12 <property name="dist" location="dist"/>
|
luis@1
|
13
|
luis@6
|
14 <uptodate property="matlabCompile.notRequired" targetfile="${matlab-build}/isvr.jar" >
|
luis@6
|
15 <srcfiles dir= "${matlab-src}/" includes="*.m"/>
|
luis@6
|
16 </uptodate>
|
luis@6
|
17
|
luis@1
|
18 <target name="init">
|
luis@1
|
19 <!-- Create the time stamp -->
|
luis@1
|
20 <tstamp/>
|
luis@1
|
21 <!-- Create the build directory structure used by compile -->
|
luis@4
|
22 <mkdir dir="${matlab-build}"/>
|
luis@1
|
23 </target>
|
luis@1
|
24
|
luis@6
|
25 <target name="compile-matlab" depends="init" unless="matlabCompile.notRequired"
|
luis@1
|
26 description="compile the MATLAB source" >
|
luis@4
|
27
|
luis@1
|
28 <exec executable="/Applications/MATLAB_R2013b.app/bin/mcc">
|
luis@1
|
29 <!-- Will create the java package with the HumanEcho class -->
|
luis@4
|
30 <arg line='-W "java:uk.ac.soton.isvr,HumanEcho" -d ${matlab-build} -T "link:lib" -v "class{HumanEcho:${matlab-src}/simulateBinauralSignals.m}"'/>
|
luis@1
|
31 </exec>
|
luis@4
|
32
|
luis@4
|
33 <!-- Copy the generated jar to the lib folder -->
|
luis@4
|
34 <copy file="${matlab-build}/isvr.jar" tofile="${lib}/isvr.jar" overwrite="true" />
|
luis@4
|
35
|
luis@1
|
36 </target>
|
luis@1
|
37
|
luis@1
|
38 <target name="dist" depends="compile-matlab"
|
luis@1
|
39 description="generate the distribution" >
|
luis@1
|
40 <!-- Create the distribution directory -->
|
luis@1
|
41 <mkdir dir="${dist}/lib"/>
|
luis@1
|
42
|
luis@1
|
43 <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
|
luis@1
|
44 <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
|
luis@1
|
45 </target>
|
luis@1
|
46
|
luis@1
|
47 <target name="clean"
|
luis@1
|
48 description="clean up" >
|
luis@1
|
49 <!-- Delete the ${build} and ${dist} directory trees -->
|
luis@1
|
50 <delete dir="${build}"/>
|
luis@1
|
51 <delete dir="${dist}"/>
|
luis@1
|
52 </target>
|
luis@1
|
53 </project> |