home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Action / Parsec47 / Parsec47.exe / p47 / build.xml next >
Text File  |  2003-11-29  |  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="p47"/>
  5.     <!-- Libraries -->
  6.     <property name="libsdir" value="lib\"/>
  7.     <property name="bcc32libsdir" value="c:\borland\bcc55\Lib\"/>
  8.     <property name="libs" value="${libsdir}SDL.lib ${libsdir}SDL_mixer.lib ${libsdir}opengl32.lib ${libsdir}bulletml.lib ${bcc32libsdir}import32.lib"/>
  9.  
  10.     <property name="prog" value="${name}.exe"/>
  11.     <!-- Imported .d files directory -->
  12.     <property name="import" location="import"/>
  13.     <!-- Source files directory -->
  14.     <property name="src" location="src"/>
  15.     <!-- Resource(icon) files directory -->
  16.     <property name="resource" location="resource"/>
  17.  
  18.     <!-- Build all -->
  19.     <target name="all" depends="compile, link"/>
  20.     <target name="rebuild" depends="clean, compile, link"/>
  21.     <target name="compile">
  22.         <apply executable="dmd" dir="${src}" dest="${src}" parallel="false" failonerror="true">
  23.             <mapper type="glob" from="*.d" to="*.obj"/>
  24.             <fileset dir="${src}" includes="**/*.d"/>
  25.             <arg value="-c"/>
  26.             <arg value="-I${import}"/>
  27.             <arg value="-op"/>
  28.             <arg value="-O"/>
  29.             <arg value="-release"/>
  30.             <arg value="-version=Win32_release"/>
  31.             <srcfile/>
  32.         </apply>
  33.         <apply executable="bcc32" dir="${src}" dest="${src}" parallel="false" failonerror="true">
  34.             <mapper type="glob" from="*.c" to="*.obj"/>
  35.             <fileset dir="${src}" includes="**/*.c"/>
  36.             <arg value="-c"/>
  37.             <arg value="-DWINDOWS"/>
  38.             <srcfile/>
  39.         </apply>
  40.     </target>
  41.     <target name="link">
  42.         <apply executable="dmd" dir="." parallel="true" failonerror="true">
  43.             <fileset dir="${src}" includes="**/*.obj"/>
  44.             <fileset dir="${import}" includes="**/*.obj"/>
  45.             <fileset dir="${resource}" includes="*.RES"/>
  46.             <fileset dir="${resource}" includes="*.def"/>
  47.             <arg value="${prog}"/>
  48.             <arg value="${libs}"/>
  49.             <srcfile/>
  50.         </apply>
  51.     </target>
  52.  
  53.     <!-- Clean an exe file and obj files -->
  54.     <target name="clean">
  55.         <delete file="${prog}"/>
  56.         <delete>
  57.             <fileset dir="${src}" includes="**/*.obj"/>
  58.         </delete>
  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.