<?xml version="1.0" ?>
<project name="OpenSim.Data.NHibernate" default="build">
    <target name="build">
        <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
        <mkdir dir="${project::get-base-directory()}/${build.dir}" />
        <copy todir="${project::get-base-directory()}/${build.dir}" flatten="true">
            <fileset basedir="${project::get-base-directory()}">
            </fileset>
        </copy>
        <copy todir="${project::get-base-directory()}/${build.dir}">
            <fileset basedir=".">
            </fileset>
        </copy>
        <csc target="library" debug="${build.debug}" unsafe="False" warnaserror="False" define="TRACE;DEBUG" main="" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
            <resources prefix="OpenSim.Data.NHibernate" dynamicprefix="true" >
                <include name="Resources/AssetBase.hbm.xml" />
                <include name="Resources/InventoryFolderBase.hbm.xml" />
                <include name="Resources/InventoryItemBase.hbm.xml" />
                <include name="Resources/RegionStore.hbm.xml" />
                <include name="Resources/UserAgentData.hbm.xml" />
                <include name="Resources/UserAppearance.hbm.xml" />
                <include name="Resources/UserProfileData.hbm.xml" />
                <include name="Resources/SQLiteDialect/001_AssetStore.sql" />
                <include name="Resources/SQLiteDialect/001_InventoryStore.sql" />
                <include name="Resources/MySQLDialect/001_AssetStore.sql" />
                <include name="Resources/MySQLDialect/001_InventoryStore.sql" />
                <include name="Resources/MySQLDialect/001_RegionStore.sql" />
                <include name="Resources/MySQLDialect/001_UserStore.sql" />
                <include name="Resources/MySQLDialect/002_RegionStore.sql" />
                <include name="Resources/MySQLDialect/003_RegionStore.sql" />
            </resources>
            <sources failonempty="true">
                <include name="LLQuaternionUserType.cs" />
                <include name="LLUUIDUserType.cs" />
                <include name="LLVector3UserType.cs" />
                <include name="NHibernateAssetData.cs" />
                <include name="NHibernateInventoryData.cs" />
                <include name="NHibernateManager.cs" />
                <include name="NHibernateRegionData.cs" />
                <include name="NHibernateUserData.cs" />
                <include name="Terrain.cs" />
                <include name="TextureUserType.cs" />
            </sources>
            <references basedir="${project::get-base-directory()}">
                <lib>
                    <include name="${project::get-base-directory()}" />
                    <include name="${project::get-base-directory()}/${build.dir}" />
                </lib>
                <include name="../../../bin/log4net.dll" />
                <include name="../../../bin/NHibernate.dll" />
                <include name="../../../bin/NHibernate.Mapping.Attributes.dll" />
                <include name="../../../bin/OpenMetaverse.dll" />
                <include name="../../../bin/OpenMetaverseTypes.dll" />
                <include name="../../../bin/OpenSim.Data.dll" />
                <include name="../../../bin/OpenSim.Framework.dll" />
                <include name="../../../bin/OpenSim.Framework.Console.dll" />
                <include name="../../../bin/OpenSim.Region.Environment.dll" />
                <include name="System.dll" />
                <include name="System.Data.dll" />
                <include name="System.Xml.dll" />
            </references>
        </csc>
        <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
        <mkdir dir="${project::get-base-directory()}/../../../bin/"/>
        <copy todir="${project::get-base-directory()}/../../../bin/">
            <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
                <include name="*.dll"/>
                <include name="*.exe"/>
                <include name="*.mdb" if='${build.debug}'/>
            </fileset>
        </copy>
    </target>
    <target name="clean">
        <delete dir="${obj.dir}" failonerror="false" />
        <delete dir="${bin.dir}" failonerror="false" />
    </target>
    <target name="doc" description="Creates documentation.">
    </target>
</project>
