]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/TianoTools/CompressDll/build.xml
Refine the code for PCD tools.
[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 <!--
14 EDK CompressDll Tool Library
15 Copyright (c) 2006, Intel Corporation
16 -->
17
18 <property name="WORKSPACE" value="${env.WORKSPACE}"/>
19 <property name="LibName" value="CompressDll"/>
20 <property name="FileSet" value="CompressDll.c CompressDll.h"/>
21 <property name="LibFileSet" value="CompressDll.c DepexParser.h"/>
22
23 <taskdef resource="cpptasks.tasks"/>
24 <typedef resource="cpptasks.types"/>
25 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
26
27 <property name="LINK_OUTPUT_TYPE" value="static"/>
28 <property name="BUILD_DIR" value="${WORKSPACE}/Tools/Source/TianoTools/${LibName}/tmp"/>
29
30 <target name="GenTool" depends="init,Lib" >
31 <echo message="The EDK Tool Library: ${LibName} build has completed!"/>
32 </target>
33
34 <target name="init">
35 <echo message="Building the EDK Tool Library: ${LibName}"/>
36 <mkdir dir="${BUILD_DIR}"/>
37 </target>
38
39 <target name="Lib" depends="init">
40 <cc name="${ToolChain}"
41 objdir="${BUILD_DIR}"
42 outtype="shared"
43 optimize="speed"
44 outfile="${BIN_DIR}/${LibName}"
45 outputfileproperty="result"
46 >
47 <compilerarg value="${ExtraArgus}" if="ExtraArgus" />
48 <fileset dir="${LibName}" includes="${LibFileSet}" defaultexcludes="TRUE" excludes="*.xml *.inf"/>
49 <includepath path="${PACKAGE_DIR}/Include"/>
50 <includepath path="${PACKAGE_DIR}/Include/${HostArch}"/>
51 <includepath path="${PACKAGE_DIR}/Common"/>
52 <includepath path="${env.JAVA_HOME}/include"/>
53 <includepath path="${env.JAVA_HOME}/include/linux" if="gcc"/>
54 <includepath path="${env.JAVA_HOME}/include/win32" if="cygwin"/>
55 <includepath path="${env.JAVA_HOME}/include/win32" if="msft"/>
56 <libset dir="${LIB_DIR}" libs="CommonTools"/>
57 <syslibset libs="kernel32" if="msft"/>
58 <linkerarg value="-mno-cygwin" if="cygwin"/>
59 <linkerarg value="--add-stdcall-alias" if="cygwin"/>
60 </cc>
61 <copy file="${result}" tofile="${BIN_DIR}/CompressDll.dll"/>
62 <chmod file="${BIN_DIR}/CompressDll.dll" perm="ugo+x"/>
63 </target>
64
65 <target name="clean">
66 <echo message="Removing Intermediate Files Only"/>
67 <delete>
68 <fileset dir="${BUILD_DIR}" includes="*.obj"/>
69 </delete>
70 </target>
71
72 <target name="cleanall">
73 <echo message="Removing Object Files and the Executable: ${LibName}${ext_shared}"/>
74 <delete failonerror="false" quiet="true" includeEmptyDirs="true">
75 <fileset dir="${BUILD_DIR}"/>
76 <fileset file="${BIN_DIR}/${LibName}.*"/>
77 </delete>
78 </target>
79 </project>