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
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.
12 <project default=
"GenTool" basedir=
".">
15 Copyright (c) 2006, Intel Corporation
17 <property name=
"ToolName" value=
"antlr"/>
19 <taskdef resource=
"cpptasks.tasks"/>
20 <typedef resource=
"cpptasks.types"/>
21 <taskdef resource=
"net/sf/antcontrib/antlib.xml"/>
23 <property environment=
"env"/>
26 <echo message=
"The EDK Tool: ${ToolName}"/>
28 <equals arg1=
"${GCC}" arg2=
"cygwin"/>
30 <echo message=
"Cygwin Family"/>
31 <property name=
"ToolChain" value=
"gcc"/>
36 <echo message=
"Windows Family"/>
37 <property name=
"ToolChain" value=
"msvc"/>
43 <echo message=
"UNIX Family"/>
44 <property name=
"ToolChain" value=
"gcc"/>
50 Unsupported Operating System
51 Please Contact Intel Corporation
56 <equals arg1=
"${ToolChain}" arg2=
"msvc"/>
58 <property name=
"ext_static" value=
".lib"/>
59 <property name=
"ext_dynamic" value=
".dll"/>
60 <property name=
"ext_exe" value=
".exe"/>
63 <equals arg1=
"${ToolChain}" arg2=
"gcc"/>
65 <property name=
"ext_static" value=
".a"/>
66 <property name=
"ext_dynamic" value=
".so"/>
67 <property name=
"ext_exe" value=
""/>
71 <condition property=
"CheckDepends">
72 <uptodate targetfile=
"${WORKSPACE}/Tools/bin/antlr.exe">
73 <srcfiles dir=
"." includes=
"*.c *.h *.g"/>
77 <equals arg1=
"${CheckDepends}" arg2=
"true"/>
79 <echo message=
"Executable, antlr.exe, is up to date."/>
84 <target name=
"GenTool" depends=
"init" unless=
"CheckDepends">
85 <echo message=
"Building the EDK Tool: ${ToolName}"/>
87 <equals arg1=
"${ToolChain}" arg2=
"msvc"/>
89 <exec dir=
"${basedir}" executable=
"nmake" failonerror=
"TRUE">
90 <arg line=
"-f AntlrMS.mak"/>
94 <equals arg1=
"${ToolChain}" arg2=
"gcc"/>
96 <exec dir=
"${basedir}" executable=
"make" failonerror=
"TRUE">
97 <arg line=
"-f makefile"/>
104 <target name=
"clean" depends=
"init">
105 <echo message=
"Removing Intermediate Files Only"/>
107 <equals arg1=
"${ToolChain}" arg2=
"msvc"/>
109 <exec dir=
"${basedir}" executable=
"nmake" failonerror=
"TRUE">
110 <arg line=
"-f AntlrMS.mak clean"/>
114 <equals arg1=
"${ToolChain}" arg2=
"gcc"/>
116 <exec dir=
"${basedir}" executable=
"make" failonerror=
"TRUE">
117 <arg line=
"-f makefile clean"/>
124 <target name=
"cleanall" depends=
"init">
125 <echo message=
"Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
127 <equals arg1=
"${ToolChain}" arg2=
"msvc"/>
129 <exec dir=
"${basedir}" executable=
"nmake" failonerror=
"TRUE">
130 <arg line=
"-f AntlrMS.mak distclean"/>
134 <equals arg1=
"${ToolChain}" arg2=
"gcc"/>
136 <exec dir=
"${basedir}" executable=
"make" failonerror=
"TRUE">
137 <arg line=
"-f makefile distclean"/>