2006-04-30 00:29:27 +02:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
<project name="JInput dx8 port, Native code" basedir="." default="compile">
|
|
|
|
|
<target name="init">
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="compile_dir" depends="init">
|
|
|
|
|
<echo message="${compiledir}"/>
|
|
|
|
|
<apply dir="${compiledir}" failonerror="true" executable="cl" dest="${compiledir}" skipemptyfilesets="true">
|
|
|
|
|
<arg line="/Ox /Wp64 /W2 /nologo /c"/>
|
|
|
|
|
<arg value="/I${toolkithome}\include"/>
|
|
|
|
|
<arg value="/I${sdkhome}\include"/>
|
|
|
|
|
<arg value="/I${dxhome}\include"/>
|
|
|
|
|
<arg value="/I${java.home}\..\include"/>
|
|
|
|
|
<arg value="/I${java.home}\..\include\win32"/>
|
|
|
|
|
<arg value="/I${commonhome}/src/native"/>
|
|
|
|
|
<arg value="/I.."/>
|
|
|
|
|
<srcfile/>
|
|
|
|
|
<fileset dir="${compiledir}" includes="*.c"/>
|
|
|
|
|
<mapper type="glob" from="*.c" to="*.obj"/>
|
|
|
|
|
</apply>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<!-- <target name="link" unless="nolink">-->
|
|
|
|
|
<target name="link">
|
|
|
|
|
<apply dir="." parallel="true" executable="cl" failonerror="true">
|
|
|
|
|
<arg line="/LD /nologo"/>
|
|
|
|
|
<srcfile/>
|
|
|
|
|
<arg line="/Fe${dllname} /link"/>
|
|
|
|
|
<arg value="/LIBPATH:${java.home}\lib"/>
|
|
|
|
|
<arg value="/LIBPATH:${dxhome}\lib\x86"/>
|
|
|
|
|
<arg value="/LIBPATH:${sdkhome}\lib"/>
|
|
|
|
|
<arg value="/LIBPATH:${toolkithome}\lib"/>
|
|
|
|
|
<arg line="/DLL ${libs}"/>
|
|
|
|
|
<fileset dir="${commonhome}/src/native" includes="*.obj"/>
|
|
|
|
|
<fileset dir="." includes="*.obj"/>
|
|
|
|
|
<fileset dir="${objdir}" includes="*.obj"/>
|
|
|
|
|
</apply>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
|
<delete>
|
|
|
|
|
<fileset dir="." includes="*.obj"/>
|
|
|
|
|
<fileset dir="raw" includes="*.obj"/>
|
|
|
|
|
<fileset dir="dx8" includes="*.obj"/>
|
|
|
|
|
<fileset dir="." includes="*.dll"/>
|
|
|
|
|
</delete>
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
<target name="compile" depends="init">
|
2006-06-23 12:48:04 +02:00
|
|
|
<property name="program_files" location="c:\Programmer"/>
|
2006-04-30 00:29:27 +02:00
|
|
|
<property name="dxhome" location="${program_files}\Microsoft DirectX SDK (February 2006)"/>
|
|
|
|
|
<property name="toolkithome" location="${program_files}\Microsoft Visual C++ Toolkit 2003"/>
|
|
|
|
|
<property name="rawlibs" value="Kernel32.lib User32.lib Setupapi.lib"/>
|
|
|
|
|
<property name="dx8libs" value="Kernel32.lib dinput8.lib dxguid.lib User32.lib"/>
|
|
|
|
|
<property name="sdkhome" location="${program_files}\Microsoft Platform SDK"/>
|
|
|
|
|
<property name="commonhome" location="../../../common"/>
|
|
|
|
|
<property name="dx8dllname" value="jinput-dx8.dll"/>
|
|
|
|
|
<property name="rawdllname" value="jinput-raw.dll"/>
|
|
|
|
|
<antcall target="compile_dir">
|
|
|
|
|
<param name="compiledir" location="${commonhome}/src/native"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
<antcall target="compile_dir">
|
|
|
|
|
<param name="compiledir" location="."/>
|
|
|
|
|
</antcall>
|
|
|
|
|
<antcall target="compile_dir">
|
|
|
|
|
<param name="compiledir" location="raw"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
<antcall target="compile_dir">
|
|
|
|
|
<param name="compiledir" location="dx8"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
<!-- <uptodate property="nolink" targetfile="${dllname}">
|
|
|
|
|
<srcfiles dir="." includes="*.obj"/>
|
|
|
|
|
</uptodate>-->
|
|
|
|
|
<antcall target="link">
|
|
|
|
|
<param name="dllname" value="${dx8dllname}"/>
|
|
|
|
|
<param name="libs" value="${dx8libs}"/>
|
|
|
|
|
<param name="objdir" location="dx8"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
<antcall target="link">
|
|
|
|
|
<param name="dllname" value="${rawdllname}"/>
|
|
|
|
|
<param name="libs" value="${rawlibs}"/>
|
|
|
|
|
<param name="objdir" location="raw"/>
|
|
|
|
|
</antcall>
|
|
|
|
|
</target>
|
|
|
|
|
</project>
|
|
|
|
|
|