]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/GenCRC32Section/build.xml
Convert backslashes to forward slashes in many build files. This is necessary for...
[mirror_edk2.git] / Tools / Source / TianoTools / GenCRC32Section / build.xml
1 <?xml version="1.0" ?>
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="GenTool" basedir=".">
13 <!--
14 EDK GenCRC32Section Tool
15 Copyright (c) 2006, Intel Corporation
16 -->
17 <property name="ToolName" value="GenCRC32Section"/>
18 <property name="FileSet" value="GenCRC32Section.c GenCRC32Section.h"/>
19
20 <taskdef resource="cpptasks.tasks"/>
21 <typedef resource="cpptasks.types"/>
22 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
23
24 <property environment="env"/>
25
26 <property name="LINK_OUTPUT_TYPE" value="static"/>
27 <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>
28
29 <target name="GenTool" depends="init, Tool">
30 <echo message="Building the EDK Tool: ${ToolName}"/>
31 </target>
32
33 <target name="init">
34 <echo message="The EDK Tool: ${ToolName}"/>
35 <mkdir dir="${BUILD_DIR}"/>
36 <if>
37 <equals arg1="${GCC}" arg2="cygwin"/>
38 <then>
39 <echo message="Cygwin Family"/>
40 <property name="ToolChain" value="gcc"/>
41 </then>
42 <elseif>
43 <os family="dos"/>
44 <then>
45 <echo message="Windows Family"/>
46 <property name="ToolChain" value="msvc"/>
47 </then>
48 </elseif>
49 <elseif>
50 <os family="unix"/>
51 <then>
52 <echo message="UNIX Family"/>
53 <property name="ToolChain" value="gcc"/>
54 </then>
55 </elseif>
56
57 <else>
58 <echo>
59 Unsupported Operating System
60 Please Contact Intel Corporation
61 </echo>
62 </else>
63 </if>
64 <if>
65 <equals arg1="${ToolChain}" arg2="msvc"/>
66 <then>
67 <property name="ext_static" value=".lib"/>
68 <property name="ext_dynamic" value=".dll"/>
69 <property name="ext_exe" value=".exe"/>
70 <property name="MSVC_DIR" value="C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/Include" />
71 <property name="MSVC_SDK_DIR" value="C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Include" />
72 </then>
73 <elseif>
74 <equals arg1="${ToolChain}" arg2="gcc"/>
75 <then>
76 <property name="ext_static" value=".a"/>
77 <property name="ext_dynamic" value=".so"/>
78 <property name="ext_exe" value=""/>
79 </then>
80 </elseif>
81 </if>
82 </target>
83
84 <target name="Tool" depends="init">
85 <cc name="${ToolChain}" objdir="${BUILD_DIR}"
86 outfile="${BIN_DIR}/${ToolName}"
87 outtype="executable"
88 libtool="${haveLibtool}"
89 optimize="speed">
90
91 <fileset dir="${basedir}/${ToolName}"
92 includes="${FileSet}"
93 defaultexcludes="TRUE"
94 excludes="*.xml *.inf"/>
95
96 <includepath path="${env.WORKSPACE}/MdePkg/Include"/>
97 <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
98 <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
99 <includepath path="${PACKAGE_DIR}/Common"/>
100 <linkerarg value="${LIB_DIR}/CommonTools${ext_static}"/>
101
102 </cc>
103 <if>
104 <os family="dos"/>
105 <then>
106 <exec dir="${BUILD_DIR}" executable="lib" failonerror="false">
107 <arg line="/NOLOGO *.lib /OUT:${LIB_DIR}/${ToolName}${ext_exe}"/>
108 </exec>
109 </then>
110 </if>
111 </target>
112
113 <target name="clean" depends="init">
114 <echo message="Removing Intermediate Files Only"/>
115 <delete>
116 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
117 </delete>
118 </target>
119
120 <target name="cleanall" depends="init">
121 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
122 <delete dir="${BUILD_DIR}">
123 <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_exe}"/>
124 </delete>
125 </target>
126
127 </project>