aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/linux/build.xml
blob: c2a5fa84d027a13db0f0282dd24e817d40e01c3e (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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="Linux Plugin">
    <target name="init">
        <mkdir dir="classes"/>
        <mkdir dir="bin"/>
        <condition property="linux" >
            <!--<os family="unix" />-->
            <os name="Linux" />
        </condition>
		
    </target>

    <target depends="init" name="compile">
		<!--		<ant dir="src/native" target="createNativeDefinitions.java"/>-->
        <javac debug="true" deprecation="true" destdir="classes" source="1.4" target="1.4" srcdir="src/java">
            <classpath>
				<pathelement location="../../coreAPI/bin/jinput-core.jar"/>
                <pathelement location="../../lib/jutils.jar"/>
            </classpath>
        </javac>
    </target>

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

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

    <target name="javadoc" depends="init" description="Javadoc for Linux plugin for JInput.">
        <mkdir dir="apidocs"/>
        <javadoc packagenames="net.java.games.input.*" 
                 destdir="apidocs"
                 additionalparam="-source 1.4"
                 link="../../../coreAPI/apidocs">
            <sourcepath>
                <pathelement location="src/java"/>
            </sourcepath>
             <classpath>
                <pathelement location="../../coreAPI/bin/jinput-core.jar"/>
                <pathelement location="../../coreAPI/lib/jutils.jar"/>
            </classpath>
        </javadoc>
    </target>

    <target description="Clean all build products." name="clean">
		<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>

    <target depends="init,compile" name="createJNIHeaders">
		<javah destdir="src/native">
            <classpath>
                <pathelement location="classes"/>
            </classpath>
			<class name="net.java.games.input.LinuxEventDevice"/>
			<class name="net.java.games.input.LinuxJoystickDevice"/>
		</javah>
    </target>
    
    <target depends="init,createJNIHeaders" name="compileNativeJinputLib" if="linux">
        <ant dir="src/native" target="compileNativeJinputLib"/>
        <copy file="src/native/libjinput-linux.so" todir="bin" />
    </target>
</project>