Add a macro for GCC Assembly.
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 May 2006 20:56:12 +0000 (20:56 +0000)
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 May 2006 20:56:12 +0000 (20:56 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@268 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Conf/BuildMacro.xml

index b8d3cd5..b3a6ff1 100644 (file)
@@ -282,6 +282,64 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </sequential>\r
   </macrodef>\r
 \r
     </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
   <!--\r
     IPF Assembly\r
     -->\r