<?xml version="1.0"?>

<project name="game" default="build">
  
  <property name="projName" value="game"/> <!-- base part of output file name -->
  <property name="src.dir" location="./src"/> 
  <property name="build.dir" value="./build"/>
  <property name="a2copy.dir" value="../tools/A2Copy/dist"/>
  <property name="pack.dir" value="../tools/PackPartitions/dist"/>
  <property name="plasma.dir" location="../tools/PLASMA/src"/> 
  
  <property name="IMG_FILE" value="${build.dir}/${projName}.bin#${ORG_ADDR}"/>
  
  <target name="all">
    <antcall target="clean"/>
    <antcall target="build"/>
  </target>
  
  <target name="clean">
    <delete failonerror="false" dir="${build.dir}"/>
    <ant dir="${src.dir}/core" target="clean" useNativeBasedir="true" inheritAll="false"/>
    <ant dir="${src.dir}/plasma" target="clean" useNativeBasedir="true" inheritAll="false"/>
    <ant dir="${src.dir}/raycast" target="clean" useNativeBasedir="true" inheritAll="false"/>
    <ant dir="${src.dir}/font" target="clean" useNativeBasedir="true" inheritAll="false"/>
  </target>
  
  <target name="build">
    <java jar="${pack.dir}/PackPartitions.jar" fork="true" failonerror="true">
      <arg value="data/world/world.xml"/>
    </java>
  </target>
  
</project>
