summaryrefslogtreecommitdiffstats
path: root/BaseTools/Conf/build_rule.template
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2014-08-18 23:03:17 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-18 23:03:17 +0000
commitabb158ded41fffe92a6c0a4f6157d5153b011e00 (patch)
treec36626dfbe7ac12517fcf0cc4aec1c60ecc7378d /BaseTools/Conf/build_rule.template
parentde08c53b0f65f212c25f0eea13d6cdf4bd9c7fb4 (diff)
downloadedk2-abb158ded41fffe92a6c0a4f6157d5153b011e00.tar.gz
edk2-abb158ded41fffe92a6c0a4f6157d5153b011e00.tar.bz2
edk2-abb158ded41fffe92a6c0a4f6157d5153b011e00.zip
BaseTools: Add rules to build NASM source file into a binary
v2: * Use EDK II tool name of NASMB rather than NASMBIN * Use EDK II extension of .nasmb rather than .nasmbin v3: * Create listing file * Don't change into source directory * Add ENV(NASM_PREFIX) before nasm for NASM_PATH Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15820 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf/build_rule.template')
-rw-r--r--BaseTools/Conf/build_rule.template16
1 files changed, 16 insertions, 0 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index c1c0d4cca6..55f56c2a74 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -440,6 +440,22 @@
otool -t $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.slib | hex2bin.py ${dst}
+[Nasm-to-Binary-Code-File]
+ <InputFile>
+ ?.nasmb, ?.NASMB
+
+ <ExtraDependency>
+ $(MAKE_FILE)
+
+ <OutputFile>
+ $(OUTPUT_DIR)(+)${s_base}.bin
+
+ <Command>
+ "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
+ Trim --source-code --convert-hex -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
+ "$(NASM)" -I${s_path}(+) -l ${d_path}(+)${s_base}.lst $(NASMB_FLAGS) -o $dst ${d_path}(+)${s_base}.iii
+
+
[Microcode-File.USER_DEFINED, Microcode-File.Microcode]
<InputFile>
?.txt, ?.TXT, ?.Txt, ?.mut, ?.inc