]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/CodeTools/Source/GenFvImage/build.xml
More renames for Tool Packages
[mirror_edk2.git] / Tools / CodeTools / Source / GenFvImage / build.xml
diff --git a/Tools/CodeTools/Source/GenFvImage/build.xml b/Tools/CodeTools/Source/GenFvImage/build.xml
new file mode 100644 (file)
index 0000000..ae930b0
--- /dev/null
@@ -0,0 +1,124 @@
+<?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 GenFvImage Tool\r
+  Copyright (c) 2006, Intel Corporation\r
+-->\r
+  <property name="ToolName" value="GenFvImage"/>\r
+  <property name="FileSet" value="GenFvImageLib.c GenFvImageExe.c"/>\r
+\r
+  <taskdef resource="cpptasks.tasks"/>\r
+  <typedef resource="cpptasks.types"/>\r
+  <taskdef resource="net/sf/antcontrib/antlib.xml"/>\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="The EDK Tool: ${ToolName} build has completed"/>\r
+  </target>\r
+\r
+  <target name="init">\r
+    <echo message="Building the EDK Tool: ${ToolName}"/>\r
+    <mkdir dir="${BUILD_DIR}"/>\r
+    <if>\r
+      <istrue value="${OSX}"/>\r
+      <then>\r
+        <property name="syslibdirs" value=""/>\r
+        <property name="syslibs" value=""/>\r
+      </then>\r
+    </if>\r
+\r
+    <if>\r
+      <istrue value="${cygwin}"/>\r
+      <then>\r
+        <property name="syslibdirs" value="${env.CYGWIN_HOME}/lib/e2fsprogs"/>\r
+        <property name="syslibs" value="uuid"/>\r
+      </then>\r
+    </if>\r
+    \r
+    <if>\r
+      <istrue value="${msft}"/>\r
+      <then>\r
+        <property name="syslibdirs" value=""/>\r
+        <property name="syslibs" value="uuid"/>\r
+      </then>\r
+    </if>\r
+    \r
+    <if>\r
+      <istrue value="${linux}"/>\r
+      <then>\r
+        <if>\r
+          <istrue value="${x86_64_linux}"/>\r
+          <then>\r
+            <property name="syslibdirs" value="/lib64"/>\r
+          </then>\r
+          <else>\r
+            <property name="syslibdirs" value="/usr/lib"/>\r
+          </else>\r
+        </if>\r
+        <property name="syslibs" value="uuid"/>\r
+      </then>\r
+    </if>\r
+    <echo message="syslibdirs set to: ${syslibdirs}"/>\r
+  </target>\r
+\r
+  <target name="Tool" depends="init, GenFvImage"/>\r
+\r
+  <target name="GenFvImage" >\r
+    <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
+        outfile="${BIN_DIR}/${ToolName}"\r
+        outtype="executable"\r
+        debug="true"\r
+        optimize="speed">\r
+      <compilerarg value="${ExtraArgus}" if="ExtraArgus" />\r
+\r
+      <defineset>\r
+        <define name="BUILDING_TOOLS"/>\r
+        <define name="TOOL_BUILD_IA32_TARGET"/>\r
+      </defineset>\r
+    \r
+      <fileset dir="${basedir}/${ToolName}" \r
+        includes="${FileSet}"/>\r
+\r
+      <includepath path="${PACKAGE_DIR}/${ToolName}"/>\r
+      <includepath path="${PACKAGE_DIR}/Include"/>\r
+      <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>\r
+      <includepath path="${PACKAGE_DIR}/Common"/>\r
+      <libset dir="${LIB_DIR}" libs="CommonTools"/>\r
+\r
+      <linkerarg value="/nodefaultlib:libc.lib" if="msft"/>\r
+      <syslibset dir="${syslibdirs}" libs="${syslibs}" if="cyglinux"/>\r
+      <syslibset libs="RpcRT4" if="msft"/>\r
+    </cc>\r
+  </target>\r
+\r
+  <target name="clean">\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">\r
+    <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>  \r
+    <delete failonerror="false" quiet="true" includeEmptyDirs="true">\r
+      <fileset dir="${BUILD_DIR}"/>\r
+      <fileset file="${BIN_DIR}/${ToolName}_Ia32${ext_exe}"/>\r
+      <fileset file="${BIN_DIR}/${ToolName}_X64${ext_exe}"/>\r
+      <fileset file="${BIN_DIR}/${ToolName}${ext_exe}"/>\r
+      <fileset file="${BIN_DIR}/${ToolName}_Ipf${ext_exe}"/>\r
+    </delete>\r
+  </target>\r
+\r
+</project>\r