]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Conf/build_rule.template
Sync EDKII BaseTools to BaseTools project r1903.
[mirror_edk2.git] / BaseTools / Conf / build_rule.template
index 7e5d4aa0377564d3bbedce525b37b6adaec6e67c..0f2921c7149ac8bae7cadc34e8b4ba09a1e41cef 100644 (file)
@@ -1,5 +1,5 @@
 #\r
-#  Copyright (c) 2007-2009, Intel Corporation\r
+#  Copyright (c) 2007-2010, Intel Corporation\r
 #  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 \r
     <Command.GCC>\r
         "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)\r
-        "$(OBJCOPY)" --only-keep-debug ${dst} $(DEBUG_DIR)(+)$(MODULE_NAME).pdb\r
-        "$(OBJCOPY)" -S ${dst}\r
         "$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}\r
 \r
     <Command.RVCT>\r
     <OutputFile>\r
         $(DEBUG_DIR)(+)$(MODULE_NAME).efi\r
 \r
-    <Command.MSFT, Command.INTEL, Command.GCC, Command.RVCT>      \r
+    <Command.MSFT, Command.INTEL, Command.RVCT>  \r
+        GenFw -e $(MODULE_TYPE) -o ${dst} ${src}\r
+        $(CP) ${dst} $(OUTPUT_DIR)\r
+        $(CP) ${dst} $(BIN_DIR)\r
+        -$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)\r
+\r
+    <Command.GCC>\r
+        $(OBJCOPY) --only-keep-debug ${src} $(BIN_DIR)(+)$(MODULE_NAME).debug\r
+        $(OBJCOPY) --strip-unneeded ${src}\r
+        $(OBJCOPY) --add-gnu-debuglink=$(BIN_DIR)(+)$(MODULE_NAME).debug ${src}\r
         GenFw -e $(MODULE_TYPE) -o ${dst} ${src}\r
         $(CP) ${dst} $(OUTPUT_DIR)\r
         $(CP) ${dst} $(BIN_DIR)\r
     <InputFile>\r
         *.mcb\r
 \r
+    <ExtraDependency>\r
+        $(MAKE_FILE)\r
+\r
     <OutputFile>\r
         $(OUTPUT_DIR)(+)$(MODULE_NAME).bin\r
 \r