home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Action / TumikiFighters / tf0_2.exe / tf / build.xml next >
Text File  |  2004-05-15  |  3KB  |  81 lines

  1. <!-- Ant build.xml for the D Programming Language -->
  2. <project name="d_build" default="all" basedir=".">
  3.     <!-- Build target program name -->
  4.     <property name="name" value="tf"/>
  5.     <!-- Libraries -->
  6.     <property name="libsdir" value="lib\"/>
  7.     <property name="libs" value="${libsdir}SDL.lib ${libsdir}SDL_mixer.lib ${libsdir}opengl32.lib ${libsdir}bulletml.lib"/>
  8.  
  9.     <property name="prog" value="${name}.exe"/>
  10.     <!-- Imported .d files directory -->
  11.     <property name="import" location="import"/>
  12.     <!-- Source files directory -->
  13.     <property name="src" location="src"/>
  14.     <!-- Resource(icon) files directory -->
  15.     <property name="resource" location="resource"/>
  16.  
  17.     <!-- Build all -->
  18.     <target name="all" depends="compile, link"/>
  19.     <target name="rebuild" depends="clean, compile, link"/>
  20.     <target name="compile">
  21.         <apply executable="dmd" dir="${src}" dest="${src}" parallel="false" failonerror="true">
  22.             <mapper type="glob" from="*.d" to="*.obj"/>
  23.             <fileset dir="${src}" includes="**/*.d"/>
  24.             <arg value="-c"/>
  25.             <arg value="-I${import}"/>
  26.             <arg value="-op"/>
  27.             <arg value="-O"/>
  28.             <arg value="-release"/>
  29.             <arg value="-version=Win32_release"/>
  30.             <srcfile/>
  31.         </apply>
  32.     </target>
  33.     <target name="link">
  34.         <apply executable="dmd" dir="." parallel="true" failonerror="true">
  35.             <fileset dir="${src}" includes="**/*.obj"/>
  36.             <fileset dir="${import}" includes="**/*.obj"/>
  37.             <fileset dir="${resource}" includes="*.RES"/>
  38.             <fileset dir="${resource}" includes="*.def"/>
  39.             <arg value="${prog}"/>
  40.             <arg value="${libs}"/>
  41.             <srcfile/>
  42.         </apply>
  43.     </target>
  44.  
  45.     <!-- Clean an exe file and obj files -->
  46.     <target name="clean">
  47.         <delete file="${prog}"/>
  48.         <delete>
  49.             <fileset dir="${src}" includes="**/*.obj"/>
  50.         </delete>
  51.     </target>
  52.  
  53.     <!-- Run the target -->
  54.     <target name="run">
  55.         <exec executable="${name}" dir=".">
  56.             <arg value="-window"/>
  57.             <arg value="-nosound"/>
  58.         </exec>
  59.     </target>
  60.  
  61.     <!-- Create a resource file(for an icon)(BCC55 required) -->
  62.     <target name="resource">
  63.         <apply executable="brcc32" dir="${resource}" parallel="false" failonerror="true">
  64.             <fileset dir="${resource}" includes="${name}.rc"/>
  65.             <srcfile/>
  66.         </apply>
  67.     </target>
  68.  
  69.     <!-- Build libraries in the import directory -->
  70.     <target name="buildlib">
  71.         <apply executable="dmd" dir="${import}" dest="${import}" parallel="false" failonerror="false">
  72.             <mapper type="glob" from="*.d" to="*.obj"/>
  73.             <fileset dir="${import}" includes="**/*.d"/>
  74.             <arg value="-c"/>
  75.             <arg value="-I${import}"/>
  76.             <arg value="-op"/>
  77.             <srcfile/>
  78.         </apply>    
  79.     </target>
  80. </project>
  81.