mirror of https://github.com/acidanthera/audk.git
Using ${OBJECTS} instead of fileset to trace all obj files. Add a new Macro named Build_Init to provide a way to initial some properties for user.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1252 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7b086bab60
commit
88f858a135
|
@ -10,6 +10,17 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
-->
|
-->
|
||||||
<project name="common">
|
<project name="common">
|
||||||
|
<!--
|
||||||
|
Macro for intialize some properties. This Macro build will be called before source file build.
|
||||||
|
-->
|
||||||
|
<macrodef name="Build_Init">
|
||||||
|
<sequential>
|
||||||
|
<var name="OBJECTS" value="" />
|
||||||
|
<var name="SDB_FILES" value="" />
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
macro definitions for building files with different types
|
macro definitions for building files with different types
|
||||||
-->
|
-->
|
||||||
|
@ -60,6 +71,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -108,6 +120,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -252,6 +265,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -293,6 +307,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -349,6 +364,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -396,7 +412,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
<OnDependency>
|
<OnDependency>
|
||||||
<sourcefiles>
|
<sourcefiles>
|
||||||
<fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
|
<file list="${OBJECTS}" />
|
||||||
</sourcefiles>
|
</sourcefiles>
|
||||||
<targetfiles>
|
<targetfiles>
|
||||||
<file name="${BIN_DIR}/@{FILENAME}.lib"/>
|
<file name="${BIN_DIR}/@{FILENAME}.lib"/>
|
||||||
|
@ -408,7 +424,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
outputFile="${BIN_DIR}/@{FILENAME}.lib">
|
outputFile="${BIN_DIR}/@{FILENAME}.lib">
|
||||||
<argument value="${SLINK_FLAGS}"/>
|
<argument value="${SLINK_FLAGS}"/>
|
||||||
|
|
||||||
<fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
|
<argument value="${OBJECTS}"/>
|
||||||
</command>
|
</command>
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
|
@ -525,7 +541,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
</cc>
|
</cc>
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Strings.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -579,6 +595,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
<delete file="${PLATFORM_DIR}/@{FILENAME}.i" />
|
<delete file="${PLATFORM_DIR}/@{FILENAME}.i" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</OnDependency>
|
</OnDependency>
|
||||||
|
<var name="OBJECTS" value="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj" />
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
@ -618,7 +635,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
<OnDependency>
|
<OnDependency>
|
||||||
<sourcefiles>
|
<sourcefiles>
|
||||||
<file list="${LIBS}"/>
|
<file list="${LIBS}"/>
|
||||||
<fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
|
<file list="${OBJECTS}"/>
|
||||||
</sourcefiles>
|
</sourcefiles>
|
||||||
<targetfiles>
|
<targetfiles>
|
||||||
<file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>
|
<file name="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>
|
||||||
|
@ -630,7 +647,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib">
|
outputFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}Local.lib">
|
||||||
<argument value="${SLINK_FLAGS}"/>
|
<argument value="${SLINK_FLAGS}"/>
|
||||||
|
|
||||||
<fileset casesensitive="on" dir="${DEST_DIR_OUTPUT}" includes="**/*.obj"/>
|
<argument value="${OBJECTS}"/>
|
||||||
</command>
|
</command>
|
||||||
</cc>
|
</cc>
|
||||||
<cc userdefine="on">
|
<cc userdefine="on">
|
||||||
|
|
|
@ -285,7 +285,6 @@ public class GenBuildTask extends Ant {
|
||||||
// MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE
|
// MODULE or BASE_NAME, GUID or FILE_GUID, VERSION, MODULE_TYPE
|
||||||
// MODULE_DIR, MODULE_RELATIVE_DIR
|
// MODULE_DIR, MODULE_RELATIVE_DIR
|
||||||
// SUBSYSTEM, ENTRYPOINT, EBC_TOOL_LIB_PATH
|
// SUBSYSTEM, ENTRYPOINT, EBC_TOOL_LIB_PATH
|
||||||
// LIBS, OBJECTS, SDB_FILES
|
|
||||||
//
|
//
|
||||||
setModuleCommonProperties(archList[k]);
|
setModuleCommonProperties(archList[k]);
|
||||||
|
|
||||||
|
@ -429,12 +428,7 @@ public class GenBuildTask extends Ant {
|
||||||
getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");
|
getProject().setProperty("ENTRYPOINT", "_ModuleEntryPoint");
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// LIBS, OBJECTS, SDB_FILES
|
|
||||||
//
|
|
||||||
getProject().setProperty("OBJECTS", "");
|
getProject().setProperty("OBJECTS", "");
|
||||||
getProject().setProperty("SDB_FILES", "");
|
|
||||||
getProject().setProperty("LIBS", "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getCompilerFlags(String target, String toolchain, FpdModuleIdentification fpdModuleId) throws EdkException {
|
private void getCompilerFlags(String target, String toolchain, FpdModuleIdentification fpdModuleId) throws EdkException {
|
||||||
|
|
|
@ -414,6 +414,12 @@ public class ModuleBuildFileGenerator {
|
||||||
|
|
||||||
FileProcess fileProcess = new FileProcess();
|
FileProcess fileProcess = new FileProcess();
|
||||||
fileProcess.init(project, includes, document);
|
fileProcess.init(project, includes, document);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Initialize some properties by user
|
||||||
|
//
|
||||||
|
Element initEle = document.createElement("Build_Init");
|
||||||
|
root.appendChild(initEle);
|
||||||
|
|
||||||
String moduleDir = project.getProperty("MODULE_DIR");
|
String moduleDir = project.getProperty("MODULE_DIR");
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue