aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/linux/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/linux/build.xml')
-rw-r--r--plugins/linux/build.xml56
1 files changed, 22 insertions, 34 deletions
diff --git a/plugins/linux/build.xml b/plugins/linux/build.xml
index a120a51..c2a5fa8 100644
--- a/plugins/linux/build.xml
+++ b/plugins/linux/build.xml
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="Linux Plugin">
-
<target name="init">
- <property name="hello" value="world"/>
<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.jar"/>
- <pathelement location="../../coreAPI/lib/jutils.jar"/>
+ <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">
- <exclude name="**/*.java"/>
- <exclude name="linux.jar"/>
- <exclude name="apidoc"/>
+ <include name="**/*.class"/>
</jar>
- <copy file="bin/linux.jar" todir="../../coreAPI/src/tests/controller" />
</target>
- <target depends="compileNativeJinputLib,jar" description="Build everything." name="all">
- <echo message="Application built. Hello ${hello}!"/>
+ <target depends="jar,compileNativeJinputLib" description="Build everything." name="all">
</target>
<target name="javadoc" depends="init" description="Javadoc for Linux plugin for JInput.">
@@ -39,43 +39,31 @@
<pathelement location="src/java"/>
</sourcepath>
<classpath>
- <pathelement location="../../coreAPI/bin/jinput.jar"/>
+ <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 failonerror="no">
- <fileset dir="classes">
- <include name="**/*.class"/>
- </fileset>
- </delete>
- <delete file="bin/linux.jar" failonerror="no"/>
- <delete file="src/native/libjinput-linux.so" failonerror="no"/>
- <delete file="../../coreAPI/src/tests/controller/linux.jar" failonerror="no" />
- <delete file="../../coreAPI/src/tests/controller/libjinput-linux.so" failonerror="no"/>
- <delete file="apidoc" failonerror="no"/>
+ <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">
+ <javah destdir="src/native">
<classpath>
- <pathelement location="../../coreAPI/bin/jinput.jar"/>
- <pathelement location="bin/linux.jar"/>
+ <pathelement location="classes"/>
</classpath>
- <class name="net.java.games.input.JInputLibrary"/>
- </javah>
- </target>
-
- <target depends="init" name="createNativeDefinitions.java">
- <exec dir="." executable="./getDefinitions" os="linux" output="src/java/net/java/games/input/NativeDefinitions.java">
- <arg line="/usr/include/linux/input.h"/>
- </exec>
+ <class name="net.java.games.input.LinuxEventDevice"/>
+ <class name="net.java.games.input.LinuxJoystickDevice"/>
+ </javah>
</target>
- <target depends="init" name="compileNativeJinputLib">
+ <target depends="init,createJNIHeaders" name="compileNativeJinputLib" if="linux">
<ant dir="src/native" target="compileNativeJinputLib"/>
- <copy file="src/native/libjinput-linux.so" todir="../../coreAPI/src/tests/controller" />
+ <copy file="src/native/libjinput-linux.so" todir="bin" />
</target>
</project>