Updated to handle cygwin/gcc and moved msvc,gcc property settings to the TianoTools/build.xml file. Properties are inherited, so we only need to set them one. Cleaned up clean and cleanall targets to remove the executables and library files. Added makefile.cygwin to antlr and dlg programs to generate the .exe needed for cygwin.

FlashMap.c needed a newline at the end of the file to remove a warning message in cygwin.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1174 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lhauch
2006-08-01 23:58:18 +00:00
parent c80da0c442
commit af1dd46d37
42 changed files with 960 additions and 1804 deletions

View File

@@ -9,21 +9,15 @@ 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="all" basedir=".">
<project default="all" basedir="." name="C_Code">
<!-- Copyright (c) 2006, Intel Corporation -->
<!-- Filename: Tools/Source/build.xml -->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<property name="ReallyVerbose" value="false"/>
<property environment="env" />
<condition property="HostArch" value="x64">
<os arch="amd64"/>
</condition>
<condition property="HostArch" value="Ia32">
<os arch="x86"/>
</condition>
<condition property="HostArch" value="Ia32">
<os arch="i386"/>
</condition>
<property name="WORKSPACE" value="${env.WORKSPACE}" />
<property name="WORKSPACE_DIR" value="${WORKSPACE}" />
<property name="PACKAGE" value="Tools" />
@@ -32,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<property name="BIN_DIR" value="${WORKSPACE}/Tools/bin" />
<property name="BUILD_MODE" value="PACKAGE" />
<property name="Libs"
value="String/build.xml Common/build.xml CustomizedCompress/build.xml PeCoffLoader/build.xml"/>
value="Common/build.xml CustomizedCompress/build.xml PeCoffLoader/build.xml String/build.xml"/>
<import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml" />
@@ -41,46 +35,71 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<fileset dir="${env.XMLBEANS_HOME}/lib" includes="*.jar"/>
</path>
<target name="all" depends="init, Tools" />
<taskdef classpathref="classpath" resource="GenBuild.tasks" />
<taskdef classpathref="classpath" resource="net/sf/antcontrib/antlib.xml" />
<taskdef classpathref="classpath" resource="cpptasks.tasks"/>
<typedef classpathref="classpath" resource="cpptasks.types"/>
<target name="all" depends="init, Tools">
<echo message="The EDK II C Tools build complete!"/>
</target>
<target name="init">
<taskdef classpathref="classpath" resource="GenBuild.tasks" />
<taskdef classpathref="classpath" resource="net/sf/antcontrib/antlib.xml" />
<taskdef classpathref="classpath" resource="cpptasks.tasks"/>
<typedef classpathref="classpath" resource="cpptasks.types"/>
<echo message="EDK C Code Tools, build initialization"/>
<mkdir dir="${BIN_DIR}" />
<mkdir dir="${LIB_DIR}" />
<condition property="HostArch" value="X64">
<os arch="amd64"/>
</condition>
<condition property="HostArch" value="Ia32">
<or>
<os arch="x86"/>
<os arch="i386"/>
</or>
</condition>
<condition property="HostArch" value="Ia32">
<os arch="i386"/>
</condition>
<if>
<os family="unix" />
<then>
<echo message="OS Family UNIX" />
<echo message="OS Family UNIX, ${HostArch}" />
</then>
<elseif>
<os family="dos" />
<then>
<echo message="OS Family DOS" />
<echo message="OS Family DOS, ${HostArch}" />
</then>
</elseif>
<elseif>
<os family="mac" />
<then>
<echo message="OS Family OS X" />
<echo message="OS Family OS X, ${HostArch}" />
</then>
</elseif>
<else>
<echo message="OS Family Unsupported" />
<fail message="OS Family Unsupported, ${HostArch}" />
</else>
</if>
<if>
<isset property="env.TOOL_CHAIN" />
<not>
<isset property="ToolChain" />
</not>
<then>
<property name="ToolChain" value="${env.TOOL_CHAIN}"/>
<condition property="gcc">
<equals arg1="${ToolChain}" arg2="gcc"/>
</condition>
<if>
<isset property="env.TOOL_CHAIN" />
<then>
<property name="ToolChain" value="${env.TOOL_CHAIN}"/>
</then>
<else>
<!-- Default Tool Chain is Microsoft Visual Studio -->
<property name="ToolChain" value="msvc"/>
</else>
</if>
</then>
</if>
@@ -88,10 +107,37 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<os name="Linux"/>
</condition>
<condition property="intel_win">
<and>
<os family="dos"/>
<equals arg1="${ToolChain}" arg2="intel"/>
</and>
</condition>
<condition property="intel_linux">
<and>
<os name="Linux"/>
<equals arg1="${ToolChain}" arg2="intel"/>
</and>
</condition>
<condition property="intel_mac">
<and>
<os family="mac"/>
<equals arg1="${ToolChain}" arg2="intel"/>
</and>
</condition>
<condition property="gcc">
<and>
<equals arg1="${ToolChain}" arg2="gcc"/>
</and>
</condition>
<condition property="cygwin">
<and>
<os family="dos"/>
<istrue value="${gcc}"/>
<equals arg1="${ToolChain}" arg2="gcc"/>
</and>
</condition>
@@ -109,10 +155,74 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<condition property="OSX" value="true">
<os family="Mac"/>
</condition>
<condition property="cyglinux">
<or>
<istrue value="linux"/>
<istrue value="${cygwin}"/>
</or>
</condition>
<!-- msft is a family, used by both Microsoft and Intel Windows compiler tool chains -->
<condition property="msft">
<isfalse value="${gcc}"/>
</condition>
<if>
<istrue value="${ReallyVerbose}"/>
<then>
<echo message="Test property msvc: ${msvc}"/>
<echo message="Test property gcc: ${gcc}"/>
<echo message="Test property intel_win: ${intel_win}"/>
<echo message="Test property intel_linux: ${intel_linux}"/>
<echo message="Test property intel_mac: ${intel_mac}"/>
<echo message="Test property msft: ${msft}"/>
<echo message="Test property cygwin: ${cygwin}"/>
<echo message="Test property cyglinux: ${cyglinux}"/>
<echo message="Test property windows: ${windows}"/>
<echo message="Test property linux: ${linux}"/>
<echo message="Test property OSX: ${OSX}"/>
<echo message="Test property x86_64_linux: ${x86_64_linux}"/>
</then>
</if>
<property name="haveLibtool" value="false"/>
<if>
<and>
<not>
<isset property="env.CYGWIN_HOME"/>
</not>
<isset property="cygwin"/>
</and>
<then>
<fail message="You must set the environment variable: CYGWIN_HOME"/>
</then>
</if>
<if>
<istrue value="${gcc}"/>
<then>
<property name="ext_static" value=".a"/>
<property name="ext_dynamic" value=".so"/>
<if>
<istrue value="${cygwin}"/>
<then>
<property name="ext_exe" value=".exe"/>
</then>
<else>
<property name="ext_exe" value=""/>
</else>
</if>
</then>
<else>
<property name="ext_static" value=".lib"/>
<property name="ext_dynamic" value=".dll"/>
<property name="ext_exe" value=".exe"/>
</else>
</if>
</target>
<target name="Libraries">
<target name="Libraries" depends="init">
<subant target="" inheritall="true">
<fileset dir="${PACKAGE_DIR}"
includes="${Libs}"/>
@@ -126,13 +236,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</subant>
</target>
<target name="clean">
<target name="clean" depends="init">
<subant target="clean" inheritall="true">
<fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>
</subant>
</target>
<target name="cleanall">
<target name="cleanall" depends="init">
<subant target="cleanall" inheritall="true">
<fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>
</subant>