<?xml version="1.0"?>
<project name="Improve-Install" default="InstallAll" basedir=".">
<description >
Build file for all Improve library project
</description>
<!-- task and type extension -->
<taskdef resource="cpptasks.tasks"/>
<typedef resource="cpptasks.types"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!-- Properties -->
<property environment="sys_env"/>
<property name="proj.root" location="..\."/>
<target name="-Init">
<condition property="cc" value="${mswin32-compiler}">
<os family="windows"/>
</condition>
<condition property="cc" value="gcc">
<os family="unix"/>
</condition>
<echo message="${ant.project.name}: Init Complete"/>
</target>
<target name="Clean" depends="-Init"
description="Clean the temporal building space">
<!-- Delete all files in temporal build space -->
<delete includeEmptyDirs="true" >
<fileset dir="${tgt.bin}" includes="objs/*, objs_d/*" defaultexcludes="false"/>
</delete>
<delete includeEmptyDirs="true" >
<fileset dir="${tgt.lib}" includes="objs/*, objs_d" defaultexcludes="false"/>
</delete>
<echo message="${ant.project.name}: Clean buildspace Complete"/>
</target>
<target name="AutoBuild" depends="-Init, -Prep" description="AutoBuild all source to get bin out">
<mkdir dir="${tgt.lib}\objs_d"/>
<mkdir dir="${tgt.lib}\objs"/>
<if>
<equals arg1="${cc}" arg2="msvc"/>
<then>
<cc name="${cc}" objdir="${tgt.lib}\objs_d" outfile="${tgt.lib}\improve_debug" outtype="static"
exceptions="true" multithreaded="true" runtime="dynamic" debug="true">
<compiler extends="${cc}-compiler">
<includepath path="${tgt.interface}"/>
<includepath path="${getenv.BOOST_ROOT}\include"/>
<includepath path="${getenv.CPPUNIT_ROOT}\include"/>
<defineset >
<define name="WIN32"/>
<define name="_WINDOWS"/>
</defineset>
<compilerarg value="/W3"/>
<compilerarg value="/GR"/>
<compilerarg value="/O2"/>
</compiler>
<linker extends="${cc}-linker">
<linkerarg value="/machine:I386"/>
<!--fileset dir="${getenv.LIBS_ROOT}\lib" includes="3d_party.*"/-->
</linker>
<fileset dir="${tgt.src}">
<include name="**/*.cpp"/>
<include name="**/*.c"/>
<exclude name="exception_ex.*"/>
</fileset>
</cc>
<echo message="${ant.project.name}: AutoBuild Complete"/>
</target>
<target name="Test" depends="-Init, TestBuild" description="Perform acception testing">
<exec executable="test_main_debug.exe" dir="${tgt.bin}"
failonerror="true" vmlauncher="false" os="Windows 2000">
<env key="Path" path="${getenv.Path};${getenv.CPPUNIT_ROOT}\lib;${getenv.BOOST_ROOT}\lib"/>
</exec>
<echo message="test_main.exe Debug Version Testing Pass"/>
<exec executable="test_main.exe" dir="${tgt.bin}"
failonerror="true" vmlauncher="false" os="Windows 2000">
<env key="Path" path="${getenv.Path};${getenv.CPPUNIT_ROOT}\lib;${getenv.BOOST_ROOT}\lib"/>
</exec>
<echo message="test_main.exe Release Version Testing Pass"/>
<echo message="${ant.project.name}: Testing Complete"/>
</target>
<target name="InstallAll"
depends="CleanAll, AutoBuild, Install, Test"
description="Make a clean (re)install and test">
<echo message="${ant.project.name}: Install/Reinstall Complete"/>
</target>
</project> |