]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/String/build.xml
A couple of cleanups in the TianoTools build.
[mirror_edk2.git] / Tools / Source / TianoTools / String / 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 String
15 Copyright (c) 2006, Intel Corporation
16 -->
17 <taskdef resource="cpptasks.tasks"/>
18 <typedef resource="cpptasks.types"/>
19 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
20
21 <property name="LibName" value="String"/>
22 <property name="LINK_OUTPUT_TYPE" value="static"/>
23 <property name="BUILD_DIR" value="${PACKAGE_DIR}/${LibName}/tmp"/>
24
25 <target name="GenTool" depends="init, String">
26 <echo message="Building the EDK Tool: ${LibName}"/>
27 </target>
28
29 <target name="init">
30 <echo message="The EDK Library: ${LibName}"/>
31 <mkdir dir="${BUILD_DIR}"/>
32 <if>
33 <equals arg1="${GCC}" arg2="cygwin"/>
34 <then>
35 <echo message="Cygwin Family"/>
36 <property name="ToolChain" value="gcc"/>
37 </then>
38 <elseif>
39 <os family="dos"/>
40 <then>
41 <echo message="Windows Family"/>
42 <property name="ToolChain" value="msvc"/>
43 </then>
44 </elseif>
45 <elseif>
46 <os family="unix"/>
47 <then>
48 <echo message="UNIX Family"/>
49 <property name="ToolChain" value="gcc"/>
50 </then>
51 </elseif>
52
53 <else>
54 <echo>
55 Unsupported Operating System
56 Please Contact Intel Corporation
57 </echo>
58 </else>
59 </if>
60 <property name="ToolChain" value="gcc"/>
61 <if>
62 <equals arg1="${ToolChain}" arg2="msvc"/>
63 <then>
64 <property name="ext_static" value=".lib"/>
65 <property name="ext_dynamic" value=".dll"/>
66 <property name="ext_exe" value=".exe"/>
67 </then>
68 <elseif>
69 <equals arg1="${ToolChain}" arg2="gcc"/>
70 <then>
71 <property name="ext_static" value=".a"/>
72 <property name="ext_dynamic" value=".so"/>
73 <property name="ext_exe" value=""/>
74 </then>
75 </elseif>
76 </if>
77
78 <condition property="syslibdirs" value="">
79 <os family="mac"/>
80 </condition>
81
82 <condition property="syslibs" value="">
83 <os family="mac"/>
84 </condition>
85
86 <condition property="syslibdirs" value="${env.CYGWIN_HOME}/lib/e2fsprogs">
87 <os family="windows"/>
88 </condition>
89
90 <condition property="syslibs" value="uuid">
91 <os family="windows"/>
92 </condition>
93
94 <condition property="syslibdirs" value="/usr/lib">
95 <os name="Linux"/>
96 </condition>
97
98 <condition property="syslibs" value="uuid">
99 <os name="Linux"/>
100 </condition>
101
102 </target>
103
104 <target name="String" depends="init">
105 <cc name="${ToolChain}" objdir="${BUILD_DIR}"
106 outfile="${LIB_DIR}/${LibName}"
107 outtype="static"
108 debug="true"
109 optimize="speed">
110
111 <compilerarg value="-fshort-wchar" if="gcc"/>
112
113 <fileset dir="${basedir}/${LibName}"
114 includes="*.c" />
115
116 <includepath path="${PACKAGE_DIR}/${LibName}"/>
117 <includepath path="${PACKAGE_DIR}/Include"/>
118 <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
119 <includepath path="${PACKAGE_DIR}/Common"/>
120 </cc>
121 </target>
122
123
124 <target name="clean" depends="init">
125 <echo message="Removing Intermediate Files Only"/>
126 <delete>
127 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
128 </delete>
129 </target>
130
131 <target name="cleanall" depends="init">
132 <echo message="Removing Object Files and the Executable: ${LibName}${ext_exe}"/>
133 <delete dir="${PACKAGE_DIR}/${LibName}/tmp">
134 </delete>
135 </target>
136
137 </project>