Add build macro to generate section type TE.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@719 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
wuyizhong 2006-07-03 05:22:59 +00:00
parent 3b405e9b04
commit a2d0e90908
1 changed files with 56 additions and 16 deletions

View File

@ -842,23 +842,63 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</macrodef>
-->
<!--
<!--
EFI_SECTION_TE
<macrodef name="EFI_SECTION_TE">
<attribute name="FILEPATH"/>
<attribute name="FILENAME"/>
<attribute name="FILEEXT" default=""/>
<element name="EXTRA.INC" optional="yes"/>
<element name="EXTRA.ARG" optional="yes"/>
<sequential>
<gensection inputfile="${BIN_DIR}/@{FILENAME}.@{FILEEXT}"
outputfile="${BIN_DIR}/@{FILENAME}.pe32"
sectiontype="EFI_SECTION_PE32"/>
</sequential>
</macrodef>
-->
-->
<macrodef name="EFI_SECTION_TE">
<attribute name="FILEPATH"/>
<attribute name="FILENAME"/>
<attribute name="FILEEXT" default="" />
<element name="PRE.PROCESS" optional="yes"/>
<element name="POST.PROCESS" optional="yes"/>
<sequential>
<PRE.PROCESS/>
<if>
<not>
<!-- TBD ${OBJECTS} -->
<equals arg1="${LIBS}" arg2=""/>
</not>
<then>
<GenDll FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="">
<LIB.ARG></LIB.ARG>
<LINK.ARG></LINK.ARG>
</GenDll>
<GenEfi FILEPATH="." FILENAME="@{FILENAME}" FILEEXT="dll"/>
</then>
</if>
<OnDependency>
<sourcefiles>
<file name="${DEST_DIR_OUTPUT}\@{FILENAME}.efi"/>
</sourcefiles>
<targetfiles>
<file name="${DEST_DIR_OUTPUT}\@{FILENAME}.tes"/>
</targetfiles>
<sequential>
<copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" tofile="${BIN_DIR}\@{FILENAME}.efi" />
<copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}\@{FILENAME}.efi" />
<exec executable="${GENTEIMAGE}">
<arg line="-o ${DEST_DIR_OUTPUT}\@{FILENAME}.te ${DEST_DIR_OUTPUT}\@{FILENAME}.efi" />
</exec>
<copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.te" tofile="${BIN_DIR}\@{FILENAME}.te" />
<gensection inputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.te"
outputfile="${DEST_DIR_OUTPUT}\@{FILENAME}.tes"
sectiontype="EFI_SECTION_TE"/>
<POST.PROCESS/>
</sequential>
</OnDependency>
</sequential>
</macrodef>
<!--
EFI_SECTION_RAW