home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / a7xpg0_11.zip / a7xpg / build.xml < prev    next >
Text File  |  2003-09-21  |  2KB  |  72 lines

  1. <!-- Ant build.xml for the D program language -->
  2. <project name="d_build" default="all" basedir=".">
  3.     <!-- Build target program name -->
  4.     <property name="name" value="a7xpg"/>
  5.     <!-- Libraries -->
  6.     <property name="libsdir" value="lib\"/>
  7.     <property name="libs" value="${libsdir}SDL.lib ${libsdir}SDL_mixer.lib ${libsdir}opengl32.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.             <srcfile/>
  30.         </apply>
  31.     </target>
  32.     <target name="link">
  33.         <apply executable="dmd" dir="." parallel="true" failonerror="true">
  34.             <fileset dir="${src}" includes="**/*.obj"/>
  35.             <fileset dir="${import}" includes="**/*.obj"/>
  36.             <fileset dir="${resource}" includes="*.RES"/>
  37.             <fileset dir="${resource}" includes="*.def"/>
  38.             <arg value="${prog}"/>
  39.             <arg value="${libs}"/>
  40.             <srcfile/>
  41.         </apply>
  42.     </target>
  43.  
  44.     <!-- Clean an exe file and obj files -->
  45.     <target name="clean">
  46.         <delete file="${prog}"/>
  47.         <delete>
  48.             <fileset dir="${src}" includes="**/*.obj"/>
  49.         </delete>
  50.     </target>
  51.  
  52.     <!-- Create a resource file(for an icon)(BCC55 required) -->
  53.     <target name="resource">
  54.         <apply executable="brcc32" dir="${resource}" parallel="false" failonerror="true">
  55.             <fileset dir="${resource}" includes="${name}.rc"/>
  56.             <srcfile/>
  57.         </apply>
  58.     </target>
  59.  
  60.     <!-- Build libraries in the import directory -->
  61.     <target name="buildlib">
  62.         <apply executable="dmd" dir="${import}" dest="${import}" parallel="false" failonerror="false">
  63.             <mapper type="glob" from="*.d" to="*.obj"/>
  64.             <fileset dir="${import}" includes="**/*.d"/>
  65.             <arg value="-c"/>
  66.             <arg value="-I${import}"/>
  67.             <arg value="-op"/>
  68.             <srcfile/>
  69.         </apply>    
  70.     </target>
  71. </project>
  72.