]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Conf/BuildMacro.xml
- added process to generate *local.lib and let the .dll be generated from it other...
[mirror_edk2.git] / Tools / Conf / BuildMacro.xml
index b8d3cd5032338f5baf130f5aa171751d344a1e79..93adcaeefed6bdfb326b0cd9a45fdc38b1f2af79 100644 (file)
@@ -282,6 +282,64 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </sequential>\r
   </macrodef>\r
 \r
+  <!--\r
+    GCC Assembly\r
+    -->\r
+  <macrodef name="Build_GCC_Assembly_Code">\r
+    <attribute name="FILEPATH"/>\r
+    <attribute name="FILENAME"/>\r
+    <attribute name="FILEEXT" default="s"/>\r
+\r
+    <element name="EXTRA.INC" optional="yes"/>\r
+    <element name="EXTRA.ARG" optional="yes"/>\r
+\r
+    <sequential>\r
+      <mkdir dir="${DEST_DIR_OUTPUT}/@{FILEPATH}"/>\r
+\r
+      <if>\r
+        <available type="file" file="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
+        <then>\r
+          <makedeps DepsFile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep">\r
+            <input file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+            <includepath path="${WORKSPACE_DIR}"/>\r
+            <includepath path="${MODULE_DIR}"/>\r
+            <includepath path="${MODULE_DIR}/${ARCH}"/>\r
+            <EXTRA.INC/>\r
+          </makedeps>\r
+        </then>\r
+      </if>\r
+\r
+      <OnDependency>\r
+        <sourcefiles>\r
+          <file listfile="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}.dep"/>\r
+        </sourcefiles>\r
+        <targetfiles>\r
+          <file name="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
+        </targetfiles>\r
+\r
+        <sequential>\r
+      \r
+          <cc userdefine="on">\r
+            <command type="ASM" includepathDelimiter="-I">\r
+              <EXTRA.INC/>\r
+      \r
+              <argument value="${ASM_FLAGS}"/>\r
+              <EXTRA.ARG/>\r
+              <!-- <argument value="-o ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/> -->\r
+              <OutputFile value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
+      \r
+              <fileset casesensitive="off" file="${MODULE_DIR}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}"/>\r
+            </command>\r
+          </cc>\r
+        </sequential>\r
+      </OnDependency>\r
+      <!--\r
+        for library generation later\r
+        -->\r
+      <bl NAME="OBJECTS" VALUE="${OBJECTS} ${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.obj"/>\r
+    </sequential>\r
+  </macrodef>\r
+\r
   <!--\r
     IPF Assembly\r
     -->\r
@@ -616,16 +674,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
 \r
         <sequential>\r
+          <cc userdefine="on">\r
+            <command type="LIB">\r
+              <argument value="${LIB_FLAGS}"/>\r
+              <FileList dir="" files="${OBJECTS}"/>\r
+              <LIB.ARG/>\r
+              <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/>\r
+            </command>\r
+          </cc>\r
           <cc userdefine="on">\r
             <command type="LINK">\r
               <argument value="${LINK_FLAGS}"/>\r
-              <libset libs="${LIBS}"/>\r
+              <libset libs="${LIBS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/>\r
               <LINK.ARG/>\r
               <EntryPoint value="_ModuleEntryPoint"/>\r
               <map value="${DEST_DIR_OUTPUT}/@{FILEPATH}/@{FILENAME}.map"/>\r
               <pdb value="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.pdb"/>\r
               <OutputFile value="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.dll"/>\r
-              <FileList dir="" files="${OBJECTS}"/>\r
+              <!-- <FileList dir="" files="${OBJECTS}"/> -->\r
             </command>\r
           </cc>\r
         </sequential>\r
@@ -653,6 +719,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         <sequential>\r
           <fwimage componenttype="${COMPONENT_TYPE}" outImage="${DEST_DIR_OUTPUT}/@{FILENAME}.efi" \r
                    peImage="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.@{FILEEXT}" time="0"/>\r
+          <copy file="${DEST_DIR_OUTPUT}\@{FILENAME}.efi" tofile="${DEST_DIR_DEBUG}\@{FILENAME}.efi" />\r
         </sequential>\r
       </OnDependency>\r
     </sequential>\r