2006-07-15 17:44:59 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<project name="lwjgl native code, native code" basedir="../../bin/lwjgl" default="compile">
|
|
|
|
<property name="native" location="../../src/native"/>
|
|
|
|
<property environment="env"/>
|
|
|
|
<property name="dxhome" location="${env.DXSDK_DIR}"/>
|
|
|
|
<property name="program_files" location="${env.ProgramFiles}"/>
|
|
|
|
<property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/>
|
|
|
|
<property name="chome" location="c:/MinGW"/>
|
|
|
|
<property name="gcc" location="${chome}/bin/gcc"/>
|
2006-07-15 19:20:06 -04:00
|
|
|
<property name="strip" location="${chome}/bin/strip"/>
|
2006-07-15 17:44:59 -04:00
|
|
|
<property name="dllname" value="lwjgl.dll"/>
|
|
|
|
|
|
|
|
<target name="compile_dir">
|
|
|
|
<apply dir="." failonerror="true" executable="${gcc}" dest="." skipemptyfilesets="true">
|
|
|
|
<arg line="-c -Wall -O2 -std=gnu99"/>
|
|
|
|
<arg value="-I${dxhome}/include"/>
|
|
|
|
<arg value="-I${alhome}/include"/>
|
|
|
|
<arg value="-I${java.home}/../include"/>
|
|
|
|
<arg value="-I${java.home}/../include/win32"/>
|
|
|
|
<arg value="-I${native}/common"/>
|
|
|
|
<arg value="-I${native}/windows"/>
|
|
|
|
<srcfile/>
|
|
|
|
<fileset dir="${native}/windows" includes="*.c"/>
|
|
|
|
<fileset dir="${native}/common" includes="*.c"/>
|
|
|
|
<fileset dir="${native}/generated" includes="*.c"/>
|
|
|
|
<mapper type="glob" from="*.c" to="*.o"/>
|
|
|
|
</apply>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="link">
|
|
|
|
<apply dir="." parallel="true" executable="${gcc}" failonerror="true">
|
|
|
|
<arg value="-Wl,--kill-at"/>
|
|
|
|
<arg line="-shared -o ${dllname}"/>
|
|
|
|
<srcfile/>
|
2006-07-15 19:04:07 -04:00
|
|
|
<arg value="-L${java.home}/../lib"/>
|
|
|
|
<arg value="-L${alhome}/libs"/>
|
2006-07-15 17:44:59 -04:00
|
|
|
<arg line="${libs}"/>
|
|
|
|
<fileset dir="." includes="*.o"/>
|
|
|
|
</apply>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="." includes="*.o"/>
|
|
|
|
<fileset dir="." includes="*.dll"/>
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile">
|
|
|
|
<property name="libs" value="-lKernel32 -lole32 -ldinput -ldxguid -lOpenGL32 -lVersion -luser32 -lGdi32 -lAdvapi32 -ljawt -lwinmm"/>
|
|
|
|
<antcall target="compile_dir"/>
|
|
|
|
<antcall target="link"/>
|
2006-07-15 19:20:06 -04:00
|
|
|
<apply dir="." executable="${strip}">
|
|
|
|
<fileset file="${dllname}"/>
|
|
|
|
</apply>
|
2006-07-15 17:44:59 -04:00
|
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|