+++ /dev/null
-<?xml version="1.0" encoding="utf-8" ?> \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="all" basedir="." name="C_Code">\r
-<!-- Copyright (c) 2006, Intel Corporation -->\r
-<!-- Filename: Tools/Source/build.xml -->\r
-\r
- <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
-\r
- <property name="ReallyVerbose" value="false"/>\r
- <property environment="env" />\r
-\r
- <property name="WORKSPACE" value="${env.WORKSPACE}" />\r
- <property name="WORKSPACE_DIR" value="${WORKSPACE}" />\r
- <property name="PACKAGE" value="Tools" />\r
- <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools/CCode/Source" />\r
- <property name="LIB_DIR" value="${PACKAGE_DIR}/Library" />\r
- <property name="BIN_DIR" value="${WORKSPACE}/Tools/bin" />\r
- <property name="BUILD_MODE" value="PACKAGE" />\r
- <property name="Libs" \r
- value="Common/build.xml CustomizedCompress/build.xml PeCoffLoader/build.xml String/build.xml"/>\r
-\r
- <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml" />\r
-\r
- <path id="classpath">\r
- <fileset dir="${WORKSPACE}/Tools/Jars" includes="*.jar"/>\r
- <fileset dir="${env.XMLBEANS_HOME}/lib" includes="*.jar"/>\r
- </path>\r
-\r
- <taskdef classpathref="classpath" resource="net/sf/antcontrib/antlib.xml" />\r
-\r
-\r
- <target name="all" depends="initArch, init, Tools">\r
- <echo message="The EDK II C Tools build complete!"/>\r
- </target>\r
- \r
- <target name="init">\r
- <echo message="EDK C Code Tools, build initialization"/>\r
- <taskdef classpathref="classpath" resource="GenBuild.tasks" />\r
- <taskdef classpathref="classpath" resource="cpptasks.tasks"/>\r
- <typedef classpathref="classpath" resource="cpptasks.types"/>\r
- <mkdir dir="${BIN_DIR}" />\r
- <mkdir dir="${LIB_DIR}" />\r
-\r
- </target>\r
-\r
- <target name="initArch">\r
- <condition property="HostArch" value="X64">\r
- <os arch="amd64"/>\r
- </condition>\r
- <condition property="HostArch" value="Ia32">\r
- <or>\r
- <os arch="x86"/>\r
- <os arch="i386"/>\r
- </or>\r
- </condition>\r
- <condition property="HostArch" value="Ia32">\r
- <os arch="i386"/>\r
- </condition> \r
-\r
- <if>\r
- <os family="unix" />\r
- <then>\r
- <echo message="OS Family UNIX, ${HostArch}" />\r
- </then>\r
- <elseif>\r
- <os family="dos" />\r
- <then>\r
- <echo message="OS Family DOS, ${HostArch}" />\r
- </then>\r
- </elseif>\r
- <elseif>\r
- <os family="mac" />\r
- <then>\r
- <echo message="OS Family OS X, ${HostArch}" />\r
- </then>\r
- </elseif>\r
- <else>\r
- <fail message="OS Family Unsupported, ${HostArch}" />\r
- </else>\r
- </if>\r
-\r
- <if>\r
- <not>\r
- <isset property="ToolChain" />\r
- </not>\r
- <then>\r
- <if>\r
- <isset property="env.TOOL_CHAIN" />\r
- <then>\r
- <property name="ToolChain" value="${env.TOOL_CHAIN}"/>\r
- </then>\r
- <else>\r
- <!-- Default Tool Chain is Microsoft Visual Studio -->\r
- <property name="ToolChain" value="msvc"/>\r
- </else>\r
- </if>\r
- </then>\r
- </if>\r
- \r
- <if>\r
- <equals arg1="${ToolChain}" arg2="gcc" />\r
- <then>\r
- <exec executable="gcc" outputproperty="host.gcc.ver">\r
- <arg line="-E" />\r
- <arg line="-P" />\r
- <arg line="-x c" />\r
- <arg line="gcc.ver" />\r
- </exec>\r
- <if>\r
- <contains string="${host.gcc.ver}" substring="4" />\r
- <then>\r
- <property name="ExtraArgus" value="-Wno-pointer-sign" />\r
- </then>\r
- </if>\r
- </then>\r
- </if>\r
-\r
- <condition property="linux" value="true">\r
- <os name="Linux"/>\r
- </condition>\r
- \r
- <condition property="intel_win">\r
- <and>\r
- <os family="dos"/>\r
- <equals arg1="${ToolChain}" arg2="intel"/>\r
- </and>\r
- </condition>\r
- \r
- <condition property="intel_linux">\r
- <and>\r
- <os name="Linux"/>\r
- <equals arg1="${ToolChain}" arg2="intel"/>\r
- </and>\r
- </condition>\r
- \r
- <condition property="intel_mac">\r
- <and>\r
- <os family="mac"/>\r
- <equals arg1="${ToolChain}" arg2="intel"/>\r
- </and>\r
- </condition>\r
- \r
- <condition property="gcc">\r
- <and>\r
- <equals arg1="${ToolChain}" arg2="gcc"/>\r
- </and>\r
- </condition>\r
-\r
- <condition property="cygwin">\r
- <and>\r
- <os family="dos"/>\r
- <equals arg1="${ToolChain}" arg2="gcc"/>\r
- </and>\r
- </condition>\r
- \r
- <condition property="x86_64_linux">\r
- <and>\r
- <os name="Linux"/>\r
- <equals arg1="${HostArch}" arg2="X64"/>\r
- </and>\r
- </condition>\r
- \r
- <condition property="windows" value="true">\r
- <os family="Windows"/>\r
- </condition>\r
- \r
- <condition property="OSX" value="true">\r
- <os family="Mac"/>\r
- </condition>\r
-\r
- <condition property="cyglinux">\r
- <or>\r
- <istrue value="${linux}"/>\r
- <istrue value="${cygwin}"/>\r
- </or>\r
- </condition>\r
-\r
- <!-- msft is a family, used by both Microsoft and Intel Windows compiler tool chains -->\r
- <condition property="msft">\r
- <isfalse value="${gcc}"/>\r
- </condition>\r
-\r
- <if>\r
- <istrue value="${ReallyVerbose}"/>\r
- <then>\r
- <echo message="Test property msvc: ${msvc}"/> \r
- <echo message="Test property gcc: ${gcc}"/> \r
- <echo message="Test property intel_win: ${intel_win}"/> \r
- <echo message="Test property intel_linux: ${intel_linux}"/> \r
- <echo message="Test property intel_mac: ${intel_mac}"/> \r
- <echo message="Test property msft: ${msft}"/> \r
- <echo message="Test property cygwin: ${cygwin}"/> \r
- <echo message="Test property cyglinux: ${cyglinux}"/> \r
- <echo message="Test property windows: ${windows}"/> \r
- <echo message="Test property linux: ${linux}"/> \r
- <echo message="Test property OSX: ${OSX}"/> \r
- <echo message="Test property x86_64_linux: ${x86_64_linux}"/> \r
- </then>\r
- </if>\r
-\r
- <property name="haveLibtool" value="false"/>\r
- <if>\r
- <and>\r
- <not>\r
- <isset property="env.CYGWIN_HOME"/>\r
- </not>\r
- <isset property="cygwin"/>\r
- </and>\r
- <then>\r
- <fail message="You must set the environment variable: CYGWIN_HOME"/>\r
- </then>\r
- </if>\r
-\r
- <if>\r
- <istrue value="${gcc}"/>\r
- <then>\r
- <property name="ext_static" value=".a"/>\r
- <property name="ext_dynamic" value=".so"/>\r
- <if>\r
- <istrue value="${cygwin}"/>\r
- <then>\r
- <property name="ext_exe" value=".exe"/>\r
- </then>\r
- <else>\r
- <property name="ext_exe" value=""/>\r
- </else>\r
- </if>\r
- </then>\r
- <else>\r
- <property name="ext_static" value=".lib"/>\r
- <property name="ext_dynamic" value=".dll"/>\r
- <property name="ext_exe" value=".exe"/>\r
- </else>\r
- </if>\r
- </target>\r
-\r
- <target name="Libraries" depends="initArch, init">\r
- <subant target="" inheritall="true">\r
- <fileset dir="${PACKAGE_DIR}" \r
- includes="${Libs}"/>\r
- </subant>\r
- </target>\r
-\r
- <target name="Tools" depends="Libraries">\r
- <subant target="" inheritall="true">\r
- <fileset dir="${PACKAGE_DIR}" includes="*/build.xml" \r
- excludes="${Libs}"/>\r
- </subant>\r
- </target>\r
-\r
- <target name="clean" depends="initArch">\r
- <subant target="clean" inheritall="true">\r
- <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>\r
- </subant>\r
- </target>\r
-\r
- <target name="cleanall" depends="initArch">\r
- <subant target="cleanall" inheritall="true">\r
- <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>\r
- </subant>\r
- <delete dir="${LIB_DIR}"/>\r
- </target>\r
-</project>\r