]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/GenDepex/build.xml
Top-level builds are not supported yet.
[mirror_edk2.git] / Tools / Source / TianoTools / GenDepex / 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 GenDepex Tool
15 Copyright (c) 2006, Intel Corporation
16 -->
17 <property name="ToolName" value="GenDepex"/>
18 <property name="LibName" value="DepexParser"/>
19 <property name="FileSet" value="GenDepex.c GenDepex.h"/>
20 <property name="LibFileSet" value="DepexParser.c DepexParser.h" />
21
22 <taskdef resource="cpptasks.tasks"/>
23 <typedef resource="cpptasks.types"/>
24 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
25
26 <property environment="env"/>
27
28 <property name="LINK_OUTPUT_TYPE" value="static"/>
29 <property name="BUILD_DIR" value="${PACKAGE_DIR}/${ToolName}/tmp"/>
30
31 <target name="GenTool" depends="init, Lib, Tool">
32 <echo message="Building the EDK Tool: ${ToolName}"/>
33 </target>
34
35 <target name="init">
36 <echo message="The EDK Tool: ${ToolName}"/>
37 <mkdir dir="${BUILD_DIR}"/>
38 <if>
39 <equals arg1="${GCC}" arg2="cygwin"/>
40 <then>
41 <echo message="Cygwin Family"/>
42 <property name="ToolChain" value="gcc"/>
43 </then>
44 <elseif>
45 <os family="dos"/>
46 <then>
47 <echo message="Windows Family"/>
48 <property name="ToolChain" value="msvc"/>
49 </then>
50 </elseif>
51 <elseif>
52 <os family="unix"/>
53 <then>
54 <echo message="UNIX Family"/>
55 <property name="ToolChain" value="gcc"/>
56 </then>
57 </elseif>
58
59 <else>
60 <echo>
61 Unsupported Operating System
62 Please Contact Intel Corporation
63 </echo>
64 </else>
65 </if>
66 <if>
67 <equals arg1="${ToolChain}" arg2="msvc"/>
68 <then>
69 <property name="ext_static" value=".lib"/>
70 <property name="ext_dynamic" value=".dll"/>
71 <property name="ext_exe" value=".exe"/>
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, Lib">
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 <linkerarg value="${LIB_DIR}/${LibName}${ext_static}"/>
102 </cc>
103 </target>
104
105 <target name="Lib" depends="init">
106 <cc name="${ToolChain}" objdir="${BUILD_DIR}"
107 outfile="${LIB_DIR}/${LibName}"
108 outtype="static"
109 libtool="${haveLibtool}"
110 optimize="speed">
111
112 <fileset dir="${basedir}/${ToolName}"
113 includes="${LibFileSet}"
114 defaultexcludes="TRUE"
115 excludes="*.xml *.inf"/>
116
117 <includepath path="${env.WORKSPACE}/MdePkg/Include"/>
118 <includepath path="${env.WORKSPACE}/MdePkg/Include/Ia32"/>
119 <includepath path="${env.WORKSPACE}/MdePkg/Include/Common"/>
120 <includepath path="${PACKAGE_DIR}/Common"/>
121 </cc>
122 <if>
123 <os family="dos"/>
124 <then>
125 <exec dir="${BUILD_DIR}" executable="lib" failonerror="false">
126 <arg line="/NOLOGO *.lib /OUT:${LIB_DIR}/${LibName}${ext_static}"/>
127 </exec>
128 </then>
129 </if>
130 </target>
131
132 <target name="clean" depends="init">
133 <echo message="Removing Intermediate Files Only"/>
134 <delete>
135 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
136 </delete>
137 </target>
138
139 <target name="cleanall" depends="init">
140 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
141 <delete dir="${BUILD_DIR}">
142 <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_exe}"/>
143 </delete>
144 </target>
145
146 </project>