]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/Pccts/dlg/build.xml
74f31b01b4e1616475636252061d13080ba39f26
[mirror_edk2.git] / Tools / Source / TianoTools / Pccts / dlg / 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 dlg Tool
15 Copyright (c) 2006, Intel Corporation
16 -->
17 <property name="ToolName" value="dlg"/>
18
19 <taskdef resource="cpptasks.tasks"/>
20 <typedef resource="cpptasks.types"/>
21 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
22
23 <property environment="env"/>
24 <property name="PACKAGE_DIR" value="${WORKSPACE}/Tools"/>
25
26 <target name="init">
27 <echo message="The EDK Tool: ${ToolName}"/>
28 <if>
29 <equals arg1="${GCC}" arg2="cygwin"/>
30 <then>
31 <echo message="Cygwin Family"/>
32 <property name="ToolChain" value="gcc"/>
33 </then>
34 <elseif>
35 <os family="dos"/>
36 <then>
37 <echo message="Windows Family"/>
38 <property name="ToolChain" value="msvc"/>
39 </then>
40 </elseif>
41 <elseif>
42 <os family="unix"/>
43 <then>
44 <echo message="UNIX Family"/>
45 <property name="ToolChain" value="gcc"/>
46 </then>
47 </elseif>
48
49 <else>
50 <echo>
51 Unsupported Operating System
52 Please Contact Intel Corporation
53 </echo>
54 </else>
55 </if>
56 <if>
57 <equals arg1="${ToolChain}" arg2="msvc"/>
58 <then>
59 <property name="ext_static" value=".lib"/>
60 <property name="ext_dynamic" value=".dll"/>
61 <property name="ext_exe" value=".exe"/>
62 </then>
63 <elseif>
64 <equals arg1="${ToolChain}" arg2="gcc"/>
65 <then>
66 <property name="ext_static" value=".a"/>
67 <property name="ext_dynamic" value=".so"/>
68 <property name="ext_exe" value=""/>
69 </then>
70 </elseif>
71 </if>
72 <condition property="CheckDepends">
73 <uptodate targetfile="${WORKSPACE}/Tools/bin/dlg.exe">
74 <srcfiles dir="." includes="*.c *.h *.g"/>
75 </uptodate>
76 </condition>
77 <if>
78 <equals arg1="${CheckDepends}" arg2="true"/>
79 <then>
80 <echo message="Executable, dlg.exe, is up to date."/>
81 </then>
82 </if>
83 </target>
84
85 <target name="GenTool" depends="init" unless="CheckDepends">
86 <echo message="Building the EDK Tool: ${ToolName}"/>
87 <if>
88 <equals arg1="${ToolChain}" arg2="msvc"/>
89 <then>
90 <exec dir="${basedir}" executable="nmake" failonerror="TRUE">
91 <arg line="-f DlgMS.mak"/>
92 </exec>
93 </then>
94 <elseif>
95 <equals arg1="${ToolChain}" arg2="gcc"/>
96 <then>
97 <exec dir="${basedir}" executable="make" failonerror="TRUE">
98 <arg line="-f makefile"/>
99 </exec>
100 </then>
101 </elseif>
102 </if>
103 </target>
104
105 <target name="clean" depends="init">
106 <echo message="Removing Intermediate Files Only"/>
107 <if>
108 <equals arg1="${ToolChain}" arg2="msvc"/>
109 <then>
110 <exec dir="${basedir}" executable="nmake" failonerror="TRUE">
111 <arg line="-f DlgMS.mak clean"/>
112 </exec>
113 </then>
114 <elseif>
115 <equals arg1="${ToolChain}" arg2="gcc"/>
116 <then>
117 <exec dir="${basedir}" executable="make" failonerror="TRUE">
118 <arg line="-f makefile clean"/>
119 </exec>
120 </then>
121 </elseif>
122 </if>
123 </target>
124
125 <target name="cleanall" depends="init">
126 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
127 <if>
128 <equals arg1="${ToolChain}" arg2="msvc"/>
129 <then>
130 <exec dir="${basedir}" executable="nmake" failonerror="TRUE">
131 <arg line="-f DlgMS.mak distclean"/>
132 </exec>
133 </then>
134 <elseif>
135 <equals arg1="${ToolChain}" arg2="gcc"/>
136 <then>
137 <exec dir="${basedir}" executable="make" failonerror="TRUE">
138 <arg line="-f makefile distclean"/>
139 </exec>
140 </then>
141 </elseif>
142 </if>
143 </target>
144
145 </project>