<?xml version="1.0" encoding="US-ASCII" standalone="yes" ?>

<!-- =======================================================================	-->
<!-- Ant - UDP Chat                                                          	-->
<!-- Author: Helene Richter							                   		-->
<!-- ======================================================================= 	-->

<project name="UDPChat" default="usage" basedir=".">
  <property name="build.compiler" value="modern"/>
  <property name="classes" value="./bin" />
  <property name="src" value="./src" />
  <property name="doc" value="./doc" />
  <property name="build.compiler.fulldepend" value="true"/>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- System 																																	-->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
  <target name="all" depends="system,doc">
	</target>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- System 																																	-->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
  <target name="system" >
    <mkdir dir="${classes}"/>
    <javac debug="on" classpath="${classes}" destdir="${classes}">
      <src path="${src}" />
      <include name="**/*.java" />
    </javac>
		<copy file="${src}/common/chat.props" tofile="${classes}/common/chat.props" /> 
		<echo>System built!</echo>
		<echo>SERVER:	sh startServer.sh</echo>
		<echo>CLIENT:	sh startClient.sh</echo>
  </target>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Doc 																																	-->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
	<target name="doc" >
		<mkdir dir="${doc}"/>
		<javadoc sourcepath="${src}"
			destdir="${doc}"
			packagenames="*"
			private="true"
			useexternalfile="yes"
			version="true"
			windowtitle="UDPChat API Documentation"
			doctitle="UDPChat Documentation">
		</javadoc>
	</target>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Clean 																																-->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
  <target name="clean">
    <delete dir="${doc}"/>
    <delete dir="${classes}"/>
  </target>

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- Usage 																																-->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
	<target name="usage">
    <echo>all: Build the entire UDPChat system and documentation.</echo>
    <echo>sytem: Build the entire UDPChat system.</echo>
    <echo>doc: Build the entire UDPChat documentation.</echo>
    <echo>clean: Clean the built files.</echo>
  </target>
</project>

