audk/Tools/CCode/Source/PeCoffLoader/build.xml

154 lines
5.0 KiB
XML

<?xml version="1.0" ?>
<!--
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-->
<project default="GenTool" basedir=".">
<!--
EDK PeCoffLoader
Copyright (c) 2006, Intel Corporation
-->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<property name="LibName" value="PeCoffLoader"/>
<property name="LINK_OUTPUT_TYPE" value="static"/>
<property name="BUILD_DIR_IA32" value="${PACKAGE_DIR}/${LibName}/tmp/Ia32"/>
<property name="BUILD_DIR_X64" value="${PACKAGE_DIR}/${LibName}/tmp/X64"/>
<property name="BUILD_DIR_IPF" value="${PACKAGE_DIR}/${LibName}/tmp/Ipf"/>
<target name="GenTool" depends="init, PeCoffLoaderLib">
<echo message="The EDK Library: ${LibName} build has completed!"/>
</target>
<target name="init">
<echo message="Building the EDK Library: ${LibName}"/>
<mkdir dir="${BUILD_DIR_IA32}"/>
<mkdir dir="${BUILD_DIR_X64}"/>
<mkdir dir="${BUILD_DIR_IPF}"/>
<condition property="syslibdirs" value="">
<os family="mac"/>
</condition>
<condition property="syslibs" value="">
<os family="mac"/>
</condition>
<condition property="syslibdirs" value="${env.CYGWIN_HOME}/lib/e2fsprogs">
<os family="windows"/>
</condition>
<condition property="syslibs" value="uuid">
<os family="windows"/>
</condition>
<condition property="syslibdirs" value="/usr/lib">
<os name="Linux"/>
</condition>
<condition property="syslibs" value="uuid">
<os name="Linux"/>
</condition>
</target>
<target name="PeCoffLoaderLib" depends="init, PeCoffLoader_Ia32, PeCoffLoader_Ipf, PeCoffLoader_X64"/>
<target name="PeCoffLoader_Ia32" >
<cc name="${ToolChain}" objdir="${BUILD_DIR_IA32}"
outfile="${LIB_DIR}/${LibName}_Ia32"
outtype="static"
debug="true"
optimize="speed">
<defineset>
<define name="BUILDING_TOOLS"/>
<define name="TOOL_BUILD_IA32_TARGET"/>
</defineset>
<fileset dir="${basedir}/${LibName}"
includes="BasePeCoff.c Ia32/PeCoffLoaderEx.c" />
<includepath path="${PACKAGE_DIR}/${LibName}"/>
<includepath path="${PACKAGE_DIR}/Include"/>
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
<includepath path="${PACKAGE_DIR}/Common"/>
</cc>
</target>
<target name="PeCoffLoader_Ipf" >
<cc name="${ToolChain}" objdir="${BUILD_DIR_IPF}"
outfile="${LIB_DIR}/${LibName}_Ipf"
outtype="static"
debug="true"
optimize="speed">
<defineset>
<define name="BUILDING_TOOLS"/>
<define name="TOOL_BUILD_IPF_TARGET"/>
</defineset>
<fileset dir="${basedir}/${LibName}"
includes="BasePeCoff.c Ipf/PeCoffLoaderEx.c" />
<includepath path="${PACKAGE_DIR}/${LibName}"/>
<includepath path="${PACKAGE_DIR}/Include"/>
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
<includepath path="${PACKAGE_DIR}/Common"/>
</cc>
</target>
<target name="PeCoffLoader_X64" >
<cc name="${ToolChain}" objdir="${BUILD_DIR_X64}"
outfile="${LIB_DIR}/${LibName}_X64"
outtype="static"
debug="true"
optimize="speed">
<defineset>
<define name="BUILDING_TOOLS"/>
<define name="TOOL_BUILD_X64_TARGET"/>
</defineset>
<fileset dir="${basedir}/${LibName}"
includes="BasePeCoff.c X64/PeCoffLoaderEx.c" />
<includepath path="${PACKAGE_DIR}/${LibName}"/>
<includepath path="${PACKAGE_DIR}/Include"/>
<includepath path="${PACKAGE_DIR}/Include/Ia32"/>
<includepath path="${PACKAGE_DIR}/Common"/>
</cc>
</target>
<target name="clean">
<echo message="Removing Intermediate Files Only"/>
<delete>
<fileset dir="${BUILD_DIR_IA32}" includes="*.obj"/>
<fileset dir="${BUILD_DIR_X64}" includes="*.obj"/>
<fileset dir="${BUILD_DIR_IPF}" includes="*.obj"/>
</delete>
</target>
<target name="cleanall">
<echo message="Removing Object Files and the Executable: ${LibName}${ext_exe}"/>
<delete dir="${PACKAGE_DIR}/${LibName}/tmp">
</delete>
<delete failonerror="false" quiet="true" includeEmptyDirs="true">
<fileset dir="${BUILD_DIR_IA32}"/>
<fileset dir="${BUILD_DIR_X64}"/>
<fileset dir="${BUILD_DIR_IPF}"/>
<fileset file="${LIB_DIR}/${LibName}_Ia32${ext_static}"/>
<fileset file="${BIN_DIR}/${LibName}_X64${ext_static}"/>
<fileset file="${BIN_DIR}/${LibName}_IPF${ext_static}"/>
</delete>
</target>
</project>