2009-04-20 21:16:23 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-05-05 00:21:42 +02:00
|
|
|
<project name="isnativec" default="jar" basedir=".">
|
2009-04-20 21:16:23 +02:00
|
|
|
<description>
|
|
|
|
This is a generic native code wrapper
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<!-- set global properties for this build -->
|
|
|
|
<property name="user.name" value="intarsys consulting GmbH"/>
|
|
|
|
<property name="isnativec.src.dir" location="src"/>
|
|
|
|
<property name="isnativec.resource.dir" location="resource"/>
|
|
|
|
|
|
|
|
<target name="init">
|
2009-05-05 00:21:42 +02:00
|
|
|
<property file="build.properties" />
|
2009-04-20 21:16:23 +02:00
|
|
|
|
|
|
|
<property name="isnativec.build.root" location="${build.dir}/isnativec"/>
|
|
|
|
<property name="isnativec.build.dir" location="${isnativec.build.root}/build"/>
|
|
|
|
<property name="isnativec.dist.dir" location="${isnativec.build.root}/dist"/>
|
|
|
|
<property name="isnativec.javadoc.dir" location="${isnativec.build.root}/javadoc"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="make-structure" depends="init">
|
|
|
|
<!-- Create the build directory structure used by compile -->
|
|
|
|
<mkdir dir="${isnativec.build.dir}"/>
|
|
|
|
<mkdir dir="${isnativec.dist.dir}"/>
|
|
|
|
<mkdir dir="${isnativec.javadoc.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean" depends="init" description="clean up" >
|
|
|
|
<!-- Delete the ${dist} directory trees -->
|
|
|
|
<delete dir="${isnativec.javadoc.dir}"/>
|
|
|
|
<delete dir="${isnativec.dist.dir}"/>
|
|
|
|
<delete dir="${isnativec.build.dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="make-structure" description="isnativec compile" >
|
|
|
|
<!-- Construct classpath -->
|
|
|
|
<path id="isnativec.classpath">
|
|
|
|
<fileset dir="${libs.dir}">
|
|
|
|
<include name="**/${isrt.jar.name}.jar"/>
|
|
|
|
<include name="**/${jna.jar.name}.jar"/>
|
|
|
|
</fileset>
|
|
|
|
<pathelement path="${isnativec.build.dir}"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<!-- Compile the java code -->
|
|
|
|
<javac compiler="javac1.4" target="1.4" source="1.4" srcdir="${isnativec.src.dir}" destdir="${isnativec.build.dir}" debug="true">
|
|
|
|
<classpath refid="isnativec.classpath"/>
|
|
|
|
</javac>
|
|
|
|
</target>
|
|
|
|
|
2009-05-05 00:21:42 +02:00
|
|
|
<target name="jar" depends="compile" description="generate the distribution" >
|
2009-04-20 21:16:23 +02:00
|
|
|
|
|
|
|
<jar jarfile="${isnativec.dist.dir}/${isnativec.jar.name}.jar" basedir="${isnativec.build.dir}">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Built-By" value="${user.name}"/>
|
|
|
|
<attribute name="Main-Class" value=""/>
|
|
|
|
<attribute name="Class-Path" value="${isrt.jar.name}.jar ${jna.jar.name}.jar"/>
|
|
|
|
</manifest>
|
|
|
|
<fileset dir="${isnativec.resource.dir}">
|
|
|
|
<include name="**/*"/>
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Javadoc -->
|
|
|
|
<target name="javadoc" depends="make-structure">
|
|
|
|
<javadoc
|
|
|
|
packagenames="de.intarsys.nativec.*"
|
|
|
|
sourcepath="${isnativec.src.dir}"
|
|
|
|
destdir="${isnativec.javadoc.dir}"
|
|
|
|
author="true"
|
|
|
|
version="true"
|
|
|
|
use="true"
|
|
|
|
windowtitle="nativec API"
|
|
|
|
doctitle="nativec API" >
|
|
|
|
<classpath refid="isnativec.classpath"/>
|
|
|
|
</javadoc>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<target name="buildZipSrcPackage" depends="javadoc" description="generate build sources zip package" >
|
|
|
|
<zip destfile="${isnativec.dist.dir}/${isnativec.jar.name}-build-src.zip">
|
|
|
|
<fileset dir="..">
|
|
|
|
<include name="isnativec/src/**/*"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="${build.dir}">
|
|
|
|
<include name="isnativec/javadoc/**/*.*"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="..">
|
|
|
|
<include name="isnativec/ant/**/*.*"/>
|
|
|
|
</fileset>
|
|
|
|
</zip>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|
|
|
|
|