Get rid of old makefiles.
[mirror_edk2.git] / Tools / Source / TianoTools / CompressDll / build.xml
1 <?xml version="1.0" encoding="UTF-8"?>
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 <!--EDK GenDepex Tool
14 Copyright (c) 2006, Intel Corporation-->
15 <property environment="env"/>
16 <property name="WORKSPACE" value="${env.WORKSPACE}"/>
17 <property name="ToolName" value="CompressDll"/>
18 <property name="LibName" value="CompressDll"/>
19 <property name="FileSet" value="CompressDll.c CompressDll.h"/>
20 <property name="LibFileSet" value="CompressDll.c DepexParser.h"/>
21 <taskdef resource="cpptasks.tasks"/>
22 <typedef resource="cpptasks.types"/>
23 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
24 <property name="LINK_OUTPUT_TYPE" value="static"/>
25 <property name="BUILD_DIR" value="${WORKSPACE}/Tools/Source/TianoTools/${ToolName}/tmp"/>
26 <target name="GenTool" depends="init,Lib" >
27 <echo message="Building the EDK Tool: ${ToolName}"/>
28 </target>
29 <target name="init">
30 <echo message="The EDK Tool: ${ToolName}"/>
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 <else>
53 <echo>Unsupported Operating System
54 Please Contact Intel Corporation</echo>
55 </else>
56 </if>
57 <if>
58 <equals arg1="${ToolChain}" arg2="msvc"/>
59 <then>
60 <property name="ext_static" value=".lib"/>
61 <property name="ext_dynamic" value=".dll"/>
62 <property name="ext_exe" value=".exe"/>
63 </then>
64 <elseif>
65 <equals arg1="${ToolChain}" arg2="gcc"/>
66 <then>
67 <property name="ext_static" value=".a"/>
68 <property name="ext_dynamic" value=".so"/>
69 <property name="ext_exe" value=""/>
70 </then>
71 </elseif>
72 </if>
73 </target>
74
75 <target name="Lib" depends="init">
76 <cc name="${ToolChain}"
77 objdir="${BUILD_DIR}"
78 outtype="shared"
79 optimize="speed"
80 outfile="${BIN_DIR}/${LibName}"
81 outputfileproperty="result"
82 >
83 <fileset dir="${ToolName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
84 <includepath path="${PACKAGE_DIR}/Include"/>
85 <includepath path="${PACKAGE_DIR}/Include/Ia32"/>
86 <includepath path="${PACKAGE_DIR}/Include/Common"/>
87 <includepath path="${PACKAGE_DIR}/Common"/>
88 <includepath path="${env.JAVA_HOME}/include"/>
89 <includepath path="${env.JAVA_HOME}/include/win32" if="windows"/>
90 <includepath path="${env.JAVA_HOME}/include/linux" if="gcc"/>
91 <libset dir="${LIB_DIR}" libs="CommonTools"/>
92 <syslibset libs="kernel32" unless="gcc"/>
93 </cc>
94 <copy file="${result}" tofile="${BIN_DIR}/CompressDll.dll"/>
95 <chmod file="${BIN_DIR}/CompressDll.dll" perm="ugo+x"/>
96 </target>
97 <target name="clean" depends="init">
98 <echo message="Removing Intermediate Files Only"/>
99 <delete>
100 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
101 </delete>
102 </target>
103 <target name="cleanall" depends="init">
104 <echo message="Removing Object Files and the Executable: ${ToolName}${ext_exe}"/>
105 <delete dir="${BUILD_DIR}">
106 <fileset dir="${BIN_DIR}" includes="${ToolName}${ext_dynamic}"/>
107 </delete>
108 </target>
109 </project>