aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wintab/build.xml
blob: cc362995b373f0765d25982914e00d05a1b0b6c0 (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
68
69
70
71
72
73
74
75
76
<?xml version="1.0"?>
<project name="WinTab Input Plugin" basedir="." default="all">
    <target name="init">
        <mkdir dir="classes"/>
        <mkdir dir="bin"/>
        <condition property="wintab" >
            <os family="Windows" />
        </condition>
    </target>

    <target name="compile" depends="init">
        <javac srcdir="../windows/src/java" destdir="classes" debug="true" deprecation="true" source="1.4" target="1.4">
        	<include name="**/DummyWindow.java"/>
		</javac>

    	<javac srcdir="src/java" destdir="classes" debug="true" deprecation="true" source="1.4" target="1.4">
            <!-- To add something to the classpath: -->
            <classpath>
				<pathelement location="../../coreAPI/bin/jinput-core.jar"/>
				<pathelement location="../../lib/jutils.jar"/>
            </classpath>
		</javac>
	</target>

    <target depends="init,compile" name="create_jniheaders">
		<javah destdir="src/native">
            <classpath>
                <pathelement path="classes"/>
                <pathelement location="../../coreAPI/classes"/>
            </classpath>
			<class name="net.java.games.input.DummyWindow"/>
			<class name="net.java.games.input.WinTabContext"/>
			<class name="net.java.games.input.WinTabDevice"/>
			<class name="net.java.games.input.WinTabComponent"/>
		</javah>
	</target>

    <target name="compile_native" depends="init,create_jniheaders" if="wintab">
        <ant dir="src/native" target="compile"/>
		<copy todir="bin">
			<fileset dir="src/native" includes="*.dll"/>
		</copy>
    </target>

    <target name="jar" depends="init,compile">
        <jar jarfile="bin/wintab.jar" compress="true" basedir="classes">
            <include name="**/*.class"/>
        </jar> 
    </target>

    <target name="all" depends="compile,compile_native,jar" description="Build everything.">
    </target>

    <target name="javadoc" depends="init" description="Javadoc for my API.">
        <mkdir dir="apidocs"/>
        <javadoc packagenames="net.*" 
                 destdir="apidocs"
                 additionalparam="-source 1.4">
            <sourcepath>
                <pathelement location="src/java"/>
            </sourcepath>
             <classpath>
                <pathelement location="../windows/src/java"/>
				 <pathelement location="../../bin/jinput-core.jar"/>
				<pathelement location="../../lib/jutils.jar"/>
            </classpath>
        </javadoc>
    </target>

    <target name="clean" depends="init" description="Clean all build products.">
		<delete dir="classes" failonerror="no"/>
		<delete dir="bin" failonerror="no"/>
		<delete dir="apidocs" failonerror="no"/>
		<ant inheritAll="false" antfile="src/native/build.xml" target="clean"/>
    </target>
</project>