aboutsummaryrefslogtreecommitdiff
path: root/jniwrap/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'jniwrap/build.xml')
-rw-r--r--jniwrap/build.xml97
1 files changed, 97 insertions, 0 deletions
diff --git a/jniwrap/build.xml b/jniwrap/build.xml
new file mode 100644
index 00000000..a303cd94
--- /dev/null
+++ b/jniwrap/build.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<project name="jproj" default="compile" basedir=".">
+
+ <!-- ******************************************* -->
+ <!-- set the variables -->
+ <!-- ******************************************* -->
+ <property name="src" value="org/proj4"/>
+ <property name="build" value="classes"/>
+ <property name="libs" value="libs"/>
+
+ <!-- ******************************************* -->
+ <!-- start everything (default target) -->
+ <!-- ******************************************* -->
+ <target name="compile" depends="start, do_javac, do_javah, do_make, do_make_help, jar_it">
+ <echo>Compilation finished...</echo>
+ </target>
+
+ <!-- ******************************************* -->
+ <!-- create some begin stuff -->
+ <!-- ******************************************* -->
+ <target name="start">
+ <echo>Start compilation...</echo>
+ <!-- <splash imageurl="./etc/images/logo.jpg" showduration="5000"/> -->
+ <echo>Creating folder structure...</echo>
+ <mkdir dir="${build}"/>
+ <mkdir dir="${libs}"/>
+ </target>
+
+ <!-- ******************************************* -->
+ <!-- execute javac compilation -->
+ <!-- ******************************************* -->
+ <target name="do_javac" depends="start">
+ <echo>Compiling the java code...</echo>
+ <javac srcdir="${src}" destdir="${build}" debug="on">
+ </javac>
+ </target>
+
+ <!-- ******************************************* -->
+ <!-- execute javah for JNI headers -->
+ <!-- ******************************************* -->
+ <target name="do_javah" depends="do_javac">
+ <echo>Creating jni headers...</echo>
+ <exec dir="${build}" executable="javah" os="Linux">
+ <arg line="-jni -d ../native org.proj4.Projections"/>
+ </exec>
+ </target>
+
+ <!-- ******************************************* -->
+ <!-- do the C part compilation through make -->
+ <!-- ******************************************* -->
+ <target name="do_make" depends="do_javah">
+ <echo>Compiling libraries ...</echo>
+ <exec dir="." executable="make" os="Linux">
+ <arg line=""/>
+ </exec>
+ </target>
+
+ <!-- ******************************************* -->
+ <!-- create binary package distribution with ant -->
+ <!-- ******************************************* -->
+
+ <!-- this is not working properly by now -->
+ <target name="jar_it">
+ <delete file="${libs}/jproj.jar"/>
+ <jar destfile="${libs}/jproj.jar" basedir="${build}/">
+ <manifest>
+ <attribute name="Built-By" value="the jgrass idealists"/>
+ <!-- <section name="jgrass.gui.Main.class"> -->
+ <!-- <attribute name="Sealed" value="false"/> -->
+ <!-- </section> -->
+ </manifest>
+ </jar>
+ <delete dir="${build}"/>
+ </target>
+
+ <!-- ****************************************************** -->
+ <!-- execute doxygen help file and source file creation -->
+ <!-- ****************************************************** -->
+ <target name="do_make_help" depends="start">
+ <echo>Creating help files...</echo>
+ <exec dir="." executable="doxygen">
+ <arg line="doxygen.cfg"/>
+ </exec>
+ </target>
+
+ <!-- ******************************************* -->
+ <!-- clean up everything -->
+ <!-- ******************************************* -->
+ <target name="clean">
+ <echo>Cleaning up...</echo>
+ <delete dir="${build}"/>
+ <delete dir="${libs}"/>
+ <delete dir="docs"/>
+ </target>
+
+</project>
+