summaryrefslogtreecommitdiffstats
path: root/make/build.xml
blob: 19247ce5030bb9d3b4f70a3bce280b0a0b70cb09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<!--
   - Ant build for the JOGL utilities.
   -
   - In order for this build to succeed the resulting jar file from this build
   - (joglutils.jar) must not be on the CLASSPATH.
   -
   - This build requires that the jogl project has been checked out into a sibling
   - directory to the joglutils top-level directory and that the jogl.jar has been
   - built into its build directory.
   -->
<project name="joglutils" basedir="." default="all">
    <property name="src.dir"         value="../src" />
    <property name="output.dir"      value="../build" />
    <property name="output.tmp.dir"  value="../build/classes" />
    <property name="output.jar"      value="${output.dir}/joglutils.jar" />
    <property name="jogl.jar"        value="../../jogl/build/jogl.jar" />
    <property name="swinglayout.jar" value="${output.dir}/lib/swing-layout-1.0.jar" />
    <path id="build.classpath">
        <pathelement location="${jogl.jar}" />
        <pathelement location="${swinglayout.jar}" />
    </path>

    <property name="javadoc.link" value="http://java.sun.com/j2se/1.5.0/docs/api/" />

    <property name="msg.javadoc.dir" value="../msg_javadoc" />
    <property name="msg.javadoc.packagenames" value="net.java.joglutils.msg.actions,net.java.joglutils.msg.collections,net.java.joglutils.msg.elements,net.java.joglutils.msg.math,net.java.joglutils.msg.misc,net.java.joglutils.msg.nodes,net.java.joglutils.msg.test" />
    <property name="msg.javadoc.overview" value="../src/net/java/joglutils/msg/overview.html" />
    <property name="msg.javadoc.windowtitle" value="Minimal Scene Graph (MSG)" />
    <target name="msg.javadoc">
        <javadoc packagenames="${msg.javadoc.packagenames}"
                 sourcepath="${src.dir}"
                 destdir="${msg.javadoc.dir}" windowtitle="${msg.javadoc.windowtitle}"
                 overview="${msg.javadoc.overview}" 
                 source="1.5"
                 linkoffline="${javadoc.link} 5-packages" >
        </javadoc>
    </target>

    <target name="compile">
        <mkdir dir="${output.tmp.dir}" />
        <javac destdir="${output.tmp.dir}" source="5" debug="true" debuglevel="source,lines">
            <src path="${src.dir}" />
            <classpath refid="build.classpath" />
        </javac>
    </target>

    <target name="clean">
        <delete dir="${output.tmp.dir}" failonerror="false" />
    </target>

    <target name="msg.jar" depends="compile">
        <delete file="${output.dir}/msg.jar" failonerror="false" />
        <jar destfile="${output.dir}/msg.jar">
            <fileset dir="${output.tmp.dir}"
                     includes="net/java/joglutils/msg/**"
                     excludes="net/java/joglutils/msg/test/**" />
        </jar>
    </target>

    <target name="all" depends="compile">
        <delete file="${output.jar}" failonerror="false" />
        <jar destfile="${output.jar}">
            <fileset dir="${output.tmp.dir}" />
        </jar>
    </target>
</project>