]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Conf/build_rule.template
BaseTools: Add rules to build NASM source file into a binary
[mirror_edk2.git] / BaseTools / Conf / build_rule.template
index c1c0d4cca6e3a54d6227756a6a3b1de73a867ba4..55f56c2a74006986192ec9d4a89b06849f58b108 100644 (file)
       otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}\r
       \r
 \r
+[Nasm-to-Binary-Code-File]\r
+    <InputFile>\r
+        ?.nasmb, ?.NASMB\r
+\r
+    <ExtraDependency>\r
+        $(MAKE_FILE)\r
+\r
+    <OutputFile>\r
+        $(OUTPUT_DIR)(+)${s_base}.bin\r
+\r
+    <Command>\r
+        "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i\r
+        Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i\r
+        "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii\r
+\r
+\r
 [Microcode-File.USER_DEFINED, Microcode-File.Microcode]\r
     <InputFile>\r
         ?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc\r