+<?xml version="1.0" ?>\r
+<!--\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+-->\r
+<project default="GenTool" basedir=".">\r
+<!--\r
+ EDK FlashMap Tool\r
+ Copyright (c) 2006, Intel Corporation\r
+-->\r
+ <property name="ToolName" value="FlashMap"/>\r
+ <property name="FileSet" value="*.c"/>\r
+\r
+ <taskdef resource="cpptasks.tasks"/>\r
+ <typedef resource="cpptasks.types"/>\r
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
+\r
+ <property environment="env"/>\r
+\r
+ <property name="LINK_OUTPUT_TYPE" value="static"/>\r
+ <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>\r
+\r
+ <target name="GenTool" depends="init, Tool">\r
+ <echo message="Building the EDK Tool: ${ToolName}"/>\r
+ </target>\r
+\r
+ <target name="init">\r
+ <echo message="The EDK Tool: ${ToolName}"/>\r
+ <mkdir dir="${BUILD_DIR}"/>\r
+ <if>\r
+ <equals arg1="${GCC}" arg2="cygwin"/>\r
+ <then>\r
+ <echo message="Cygwin Family"/>\r
+ <property name="ToolChain" value="gcc"/>\r
+ </then>\r
+ <elseif>\r
+ <os family="dos"/>\r
+ <then>\r
+ <echo message="Windows Family"/>\r
+ <property name="ToolChain" value="msvc"/>\r
+ </then>\r
+ </elseif>\r
+ <elseif>\r
+ <os family="unix"/>\r
+ <then>\r
+ <echo message="UNIX Family"/>\r
+ <property name="ToolChain" value="gcc"/>\r
+ </then>\r
+ </elseif>\r
+\r
+ <else>\r
+ <echo>\r
+ Unsupported Operating System\r
+ Please Contact Intel Corporation\r
+ </echo>\r
+ </else>\r
+ </if>\r
+ <if>\r
+ <equals arg1="${ToolChain}" arg2="msvc"/>\r
+ <then>\r
+ <property name="ext_static" value=".lib"/>\r
+ <property name="ext_dynamic" value=".dll"/>\r
+ <property name="ext_exe" value=".exe"/>\r
+ </then>\r
+ <elseif>\r
+ <equals arg1="${ToolChain}" arg2="gcc"/>\r
+ <then>\r
+ <property name="ext_static" value=".a"/>\r
+ <property name="ext_dynamic" value=".so"/>\r
+ <property name="ext_exe" value=""/>\r
+ </then>\r
+ </elseif>\r
+ </if>\r
+ </target>\r
+\r
+ <target name="Tool" depends="init">\r
+ <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
+ outfile="${BIN_DIR}/${ToolName}"\r
+ outtype="executable"\r
+ libtool="${haveLibtool}"\r
+ debug="false">\r
+\r
+ <defineset>\r
+ <define name="_malloc" value="malloc"/>\r
+ <define name="_free" value="free"/>\r
+ </defineset>\r
+\r
+ <fileset dir="${basedir}/${ToolName}" \r
+ includes="${FileSet}" \r
+ defaultexcludes="TRUE" \r
+ excludes="*.xml *.inf"/>\r
+\r
+ <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
+ <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
+ <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
+ <includepath path="${env.WORKSPACE}/MdePkg/Include/Protocol"/>\r
+ <includepath path="${PACKAGE_DIR}/Common"/>\r
+ <libset dir="${LIB_DIR}" libs="CommonTools CustomizedCompress"/>\r
+ </cc>\r
+ </target>\r
+\r
+ <target name="clean" depends="init">\r
+ <echo message="Removing Intermediate Files Only"/> \r
+ <delete>\r
+ <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r
+ </delete>\r
+ </target>\r
+\r
+ <target name="cleanall" depends="init">\r
+ <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/> \r
+ <delete dir="${BUILD_DIR}">\r
+ <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_exe}"/>\r
+ </delete>\r
+ </target>\r
+\r
+</project>\r