]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/build.xml
Support building on x64 hosts.
[mirror_edk2.git] / Tools / Source / TianoTools / build.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!--
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 -->
12 <project default="all" basedir=".">
13 <!-- Copyright (c) 2006, Intel Corporation -->
14 <!-- Filename: Tools/Source/build.xml -->
15
16 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
17 <property environment="env" />
18 <condition property="HostArch" value="x64">
19 <os arch="amd64"/>
20 </condition>
21 <condition property="HostArch" value="Ia32">
22 <os arch="x86"/>
23 </condition>
24 <condition property="HostArch" value="Ia32">
25 <os arch="i386"/>
26 </condition>
27 <property name="WORKSPACE" value="${env.WORKSPACE}" />
28 <property name="WORKSPACE_DIR" value="${WORKSPACE}" />
29 <property name="PACKAGE" value="Tools" />
30 <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools/Source/TianoTools" />
31 <property name="LIB_DIR" value="${PACKAGE_DIR}/Library" />
32 <property name="BIN_DIR" value="${WORKSPACE}/Tools/bin" />
33 <property name="BUILD_MODE" value="PACKAGE" />
34 <property name="Libs"
35 value="String/build.xml Common/build.xml CustomizedCompress/build.xml PeCoffLoader/build.xml"/>
36
37 <import file="${WORKSPACE_DIR}/Tools/Conf/BuildMacro.xml" />
38
39 <path id="classpath">
40 <fileset dir="${WORKSPACE}/Tools/Jars" includes="*.jar"/>
41 <fileset dir="${env.XMLBEANS_HOME}/lib" includes="*.jar"/>
42 </path>
43
44 <target name="all" depends="init, Tools" />
45
46 <target name="init">
47 <taskdef classpathref="classpath" resource="GenBuild.tasks" />
48 <taskdef classpathref="classpath" resource="net/sf/antcontrib/antlib.xml" />
49
50 <taskdef classpathref="classpath" resource="cpptasks.tasks"/>
51 <typedef classpathref="classpath" resource="cpptasks.types"/>
52
53 <mkdir dir="${BIN_DIR}" />
54 <mkdir dir="${LIB_DIR}" />
55 <if>
56 <os family="unix" />
57 <then>
58 <echo message="OS Family UNIX" />
59 </then>
60 <elseif>
61 <os family="dos" />
62 <then>
63 <echo message="OS Family DOS" />
64 </then>
65 </elseif>
66 <elseif>
67 <os family="mac" />
68 <then>
69 <echo message="OS Family OS X" />
70 </then>
71 </elseif>
72 <else>
73 <echo message="OS Family Unsupported" />
74 </else>
75 </if>
76
77 <if>
78 <isset property="env.TOOL_CHAIN" />
79 <then>
80 <property name="ToolChain" value="${env.TOOL_CHAIN}"/>
81 <condition property="gcc">
82 <equals arg1="${ToolChain}" arg2="gcc"/>
83 </condition>
84 </then>
85 </if>
86
87 <condition property="linux" value="true">
88 <os name="Linux"/>
89 </condition>
90
91 <condition property="x86_64_linux">
92 <and>
93 <os name="Linux"/>
94 <equals arg1="${HostArch}" arg2="x64"/>
95 </and>
96 </condition>
97
98 <condition property="windows" value="true">
99 <os family="Windows"/>
100 </condition>
101
102 <condition property="OSX" value="true">
103 <os family="Mac"/>
104 </condition>
105
106 </target>
107
108 <target name="Libraries">
109 <subant target="" inheritall="true">
110 <fileset dir="${PACKAGE_DIR}"
111 includes="${Libs}"/>
112 </subant>
113 </target>
114
115 <target name="Tools" depends="Libraries">
116 <subant target="" inheritall="true">
117 <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"
118 excludes="${Libs}"/>
119 </subant>
120 </target>
121
122 <target name="clean">
123 <subant target="clean" inheritall="true">
124 <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>
125 </subant>
126 </target>
127
128 <target name="cleanall">
129 <subant target="cleanall" inheritall="true">
130 <fileset dir="${PACKAGE_DIR}" includes="*/build.xml"/>
131 </subant>
132 <delete dir="${LIB_DIR}"/>
133 </target>
134 </project>