Fix some cleanall issues
[mirror_edk2.git] / Tools / Source / TianoTools / Common / build.xml
CommitLineData
878ddf1f 1<?xml version="1.0" ?>\r
2<!--\r
3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11-->\r
12<project default="CommonTools.lib" basedir=".">\r
13<!--\r
14 EDK Common Tools Library\r
15 Copyright (c) 2006, Intel Corporation\r
16-->\r
17\r
18 <taskdef resource="cpptasks.tasks"/>\r
19 <typedef resource="cpptasks.types"/>\r
20 <taskdef resource="net/sf/antcontrib/antlib.xml"/>\r
21\r
22 <property environment="env"/>\r
23 <property name="tmp" value="tmp"/>\r
24\r
25 <property name="LINK_OUTPUT_TYPE" value="static"/>\r
26 <property name="BUILD_DIR" value="${PACKAGE_DIR}/Common/tmp"/>\r
27\r
28 <target name="CommonTools.lib" depends="init, ToolsLibrary">\r
29 <echo message="Building the EDK CommonTools Library"/>\r
30 </target>\r
31\r
32 <target name="init">\r
33 <echo message="The EDK CommonTools Library"/>\r
34 <mkdir dir="${BUILD_DIR}"/>\r
35 <if>\r
36 <equals arg1="${GCC}" arg2="cygwin"/>\r
37 <then>\r
38 <echo message="Cygwin Family"/>\r
39 <property name="ToolChain" value="gcc"/>\r
40 </then>\r
41 <elseif>\r
42 <os family="dos"/>\r
43 <then>\r
44 <echo message="Windows Family"/>\r
45 <property name="ToolChain" value="msvc"/>\r
46 </then>\r
47 </elseif>\r
48 <elseif>\r
49 <os family="unix"/>\r
50 <then>\r
51 <echo message="UNIX Family"/>\r
52 <property name="ToolChain" value="gcc"/>\r
53 </then>\r
54 </elseif>\r
55\r
56 <else>\r
57 <echo>\r
58 Unsupported Operating System\r
59 Please Contact Intel Corporation\r
60 </echo>\r
61 </else>\r
62 </if>\r
63 <if>\r
64 <equals arg1="${ToolChain}" arg2="msvc"/>\r
65 <then>\r
66 <property name="ext_static" value=".lib"/>\r
67 <property name="ext_dynamic" value=".dll"/>\r
68 </then>\r
69 <elseif>\r
70 <equals arg1="${ToolChain}" arg2="gcc"/>\r
71 <then>\r
72 <property name="ext_static" value=".a"/>\r
73 <property name="ext_dynamic" value=".so"/>\r
74 </then>\r
75 </elseif>\r
76 </if>\r
77 </target>\r
78\r
79 <target name="ToolsLibrary" depends="init">\r
80 <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
81 outfile="${LIB_DIR}/CommonTools"\r
82 outtype="static"\r
878ddf1f 83 optimize="speed">\r
84\r
85 <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
86 <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
87 <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
88\r
89 <fileset dir="${basedir}/Common" \r
dce914c0 90 includes="*.c" />\r
878ddf1f 91 </cc>\r
878ddf1f 92 </target>\r
93\r
94 <target name="clean" depends="init">\r
95 <echo message="Removing Intermediate Files Only from ${BUILD_DIR}"/> \r
96 <delete>\r
97 <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r
98 </delete>\r
99 </target>\r
100\r
101 <target name="cleanall" depends="init">\r
102 <echo message="Removing Object Files and the Library: CommonTools${ext_static}"/> \r
9e792382 103 <delete dir="${BUILD_DIR}" failonerror="false">\r
878ddf1f 104 <fileset dir="${LIB_DIR}" includes="CommonTools${ext_static}"/>\r
105 </delete>\r
106 </target>\r
107\r
108</project>\r