Fix some cleanall issues
[mirror_edk2.git] / Tools / Source / TianoTools / CustomizedCompress / 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="CustomizedCompress.lib" basedir=".">\r
13<!--\r
14 EDK Customized Compress 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\r
24 <property name="LINK_OUTPUT_TYPE" value="static"/>\r
25 <property name="BUILD_DIR" value="${PACKAGE_DIR}/CustomizedCompress/tmp"/>\r
26\r
27 <target name="CustomizedCompress.lib" depends="ToolsLibrary">\r
28 <echo message="Building the EDK CustomizedCompress Library"/>\r
29 </target>\r
30\r
31 <target name="init">\r
32 <echo message="The EDK CustomizedCompress Library"/>\r
33 <mkdir dir="${BUILD_DIR}"/>\r
34 <if>\r
35 <equals arg1="${GCC}" arg2="cygwin"/>\r
36 <then>\r
37 <echo message="Cygwin Family"/>\r
38 <property name="ToolChain" value="gcc"/>\r
39 </then>\r
40 <elseif>\r
41 <os family="dos"/>\r
42 <then>\r
43 <echo message="Windows Family"/>\r
44 <property name="ToolChain" value="msvc"/>\r
45 </then>\r
46 </elseif>\r
47 <elseif>\r
48 <os family="unix"/>\r
49 <then>\r
50 <echo message="UNIX Family"/>\r
51 <property name="ToolChain" value="gcc"/>\r
52 </then>\r
53 </elseif>\r
54\r
55 <else>\r
56 <echo>\r
57 Unsupported Operating System\r
58 Please Contact Intel Corporation\r
59 </echo>\r
60 </else>\r
61 </if>\r
62 <property name="HOST_ARCH" value="IA32" />\r
63 <ToolChainSetup confPath="${WORKSPACE}/Tools/Conf" />\r
64 <echo message="Compiler: ${CC}"/>\r
65 <if>\r
66 <equals arg1="${ToolChain}" arg2="msvc"/>\r
67 <then>\r
68 <property name="ext_static" value=".lib"/>\r
69 <property name="ext_dynamic" value=".dll"/>\r
70 </then>\r
71 <elseif>\r
72 <equals arg1="${ToolChain}" arg2="gcc"/>\r
73 <then>\r
74 <property name="ext_static" value=".a"/>\r
75 <property name="ext_dynamic" value=".so"/>\r
76 </then>\r
77 </elseif>\r
78 </if>\r
79 </target>\r
80\r
81 <target name="ToolsLibrary" depends="init">\r
82 <cc name="${ToolChain}" objdir="${BUILD_DIR}" \r
83 outfile="${LIB_DIR}/CustomizedCompress"\r
84 outtype="static"\r
85 libtool="${haveLibtool}"\r
86 optimize="speed">\r
87\r
88 <fileset dir="${basedir}/CustomizedCompress" \r
89 includes="*.h *.c" \r
90 defaultexcludes="TRUE" \r
91 excludes="*.xml *.inf"/>\r
92\r
93 <includepath path="${env.WORKSPACE}/MdePkg/Include"/>\r
94 <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>\r
95 <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>\r
96 </cc>\r
97 <if>\r
98 <os family="dos"/>\r
99 <then>\r
100 <exec dir="${BUILD_DIR}" executable="lib" failonerror="false">\r
101 <arg line="/NOLOGO *.lib /OUT:${LIB_DIR}/CustomizedCompress${ext_static}"/>\r
102 </exec>\r
103 </then>\r
104 </if>\r
105 </target>\r
106\r
107 <target name="clean">\r
108 <echo message="Removing Intermediate Files Only"/> \r
109 <delete>\r
110 <fileset dir="${BUILD_DIR}" includes="*.obj"/>\r
111 </delete>\r
112 </target>\r
113\r
114 <target name="cleanall">\r
115 <echo message="Removing Object Files and the Library: CustomizedCompress${ext_static}"/> \r
9e792382 116 <delete dir="${BUILD_DIR}" failonerror="false">\r
878ddf1f 117 <fileset dir="${LIB_DIR}" includes="CustomizedCompress${ext_static}"/>\r
118 </delete>\r
119 </target>\r
120\r
121</project>\r