Re-designed build_rule.template and updated build.exe to support the new format

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3677 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jwang36 2007-08-18 03:54:24 +00:00
parent 46d9097615
commit dce323a67c
2 changed files with 298 additions and 296 deletions

Binary file not shown.

View File

@ -1,296 +1,298 @@
# file extention : file type #
FileTypeMapping = { # Copyright (c) 2007, Intel Corporation
".c" : "C-Code", #
".C" : "C-Code", # All rights reserved. This program and the accompanying materials
".cpp" : "C-Code", # are licensed and made available under the terms and conditions of the BSD License
".Cpp" : "C-Code", # which accompanies this distribution. The full text of the license may be found at
".CPP" : "C-Code", # http://opensource.org/licenses/bsd-license.php
".h" : "C-Header",
".H" : "C-Header", # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
".inc" : "Masm-Header", # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
".asm" : "Masm-Code", #
".Asm" : "Masm-Code", # Filename: build_rule.template
".ASM" : "Masm-Code", #
".asm16" : "Masm16-Code", #RealAsm16 Link Code
".Asm16" : "Masm16-Code", ## Syntax
".ASM16" : "Masm16-Code", #
".s" : "Iasm-Code", # IPF assembly code # "*" is used to indicate that the source files will be processed at the same time.
".S" : "Gasm-Code", # GNU assembly code # "?" is used to indicate that the source files will be processed one by one.
".uni" : "Unicode-Text", #
".Uni" : "Unicode-Text", # "[" Build.<File-Type>[.<version>][, Build.<File-Type>[.<version>]] "]"
".UNI" : "Unicode-Text", # <InputFile[.<ToolChainFamily>]>
".vfr" : "Visual-Form-Representation", # [File-Type =] (?|*).<File-Extension> [(\n|,|;) (?|*).<File-Extension>]
".Vfr" : "Visual-Form-Representation", #
".VFR" : "Visual-Form-Representation", # <OutputFile[.<ToolChainFamily>]>
".dxs" : "Dependency-Expression", # <FileFullPath>
".Dxs" : "Dependency-Expression", #
".DXS" : "Dependency-Expression", # <Command[.<ToolChainFamily>]>
".TXT" : "MicorCode-Text", # <Command1>
".txt" : "MicorCode-Text", # [<Command2>]
".fv" : "FirmwareVolume", #
".Fv" : "FirmwareVolume",
".FV" : "FirmwareVolume", ## Placeholders for string substitution
".efi" : "Efi-Image", #
".Efi" : "Efi-Image", # ${src} Source file(s) to be built (full path)
".EFI" : "Efi-Image", # ${s_path} Source file directory (absolute path)
".SEC" : "Firmware-File-System", # ${s_dir} Source file relative directory within a module
".PEI" : "Firmware-File-System", # (Note: ${s_dir} is always equals to "." if source file is given in absolute path.)
".DXE" : "Firmware-File-System", # ${s_name} Source file name without path
".APP" : "Firmware-File-System", # ${s_base} Source file name without extension and path
".FYI" : "Firmware-File-System", # ${s_ext} Source file extension
".FFS" : "Firmware-File-System", #
".bmp" : "Bmp-Image", # ${dst} Destination file(s) built from ${src} (full path)
".i" : "Preprocessed-Code", # ${d_path} Destination file directory (absolute path)
".asl" : "Acpi-Source-Language", # ${d_name} Destination file name without path
".Asl" : "Acpi-Source-Language", # ${d_base} Destination file name without extension and path
".ASL" : "Acpi-Source-Language", # ${d_ext} Destination file extension
".aslc" : "Acpi-Table-Source", #
".obj" : "Object", # (+) Directory separator
".o" : "Object", #
".lib" : "Static-Library",
".a" : "Static-Library", ## Macro
".dll" : "Dynamic-Library", # $(WORKSPACE) Workspace directory
".so" : "Dynamic-Library", # $(OUTPUT_DIR) Directory for intermediate files for building a module
} # $(DEBUG_DIR) Directory for files used to debug a module
# $(BUILD_DIR) All files for building a platform will be put in this directory
ObjectFileMapping = { # $(BIN_DIR) Common directory for executable files
"C-Code" : ".obj", # $(FV_DIR) Directory to store flash image files
# "C-Header" : ".gch", # $(INC) Search path of current module
"Masm-Code" : ".obj", # $(LIBS) Static library files of current module
"Iasm-Code" : ".obj", # IPF assembly code # $(<tool>_FLAGS) Tools flags of current module
"Gasm-Code" : ".obj", # GNU assembly code # $(MODULE_NAME) Current module name
"Visual-Form-Representation" : ".obj", # $(MODULE_TYPE) Current module type
"Preprocessed-Code" : ".obj", # $(ARCH) Architecture of current module
"Object" : ".dll", # $(TOOLCHAIN) Toolchain used to build current module
"Static-Library" : ".dll", # $(TARGET) Target of current module (DEBUG/RELEASE)
"Dynamic-Library" : ".efi", # $(<tool>) Path of tool
"Dependency-Expression" : ".depex", # $(EDK_TOOLS_PATH) Path of build tools
"Acpi-Source-Language" : ".aml", # $(<FILE_TYPE_LIST>) File list of each file type
"Acpi-Table-Source" : ".acpi", # (Note: The macro name is derived from file type name. For example,
"Masm16-Code" : ".com", # C-Code-File will have C_CODE_FILE_LIST macro.)
"MicorCode-Text" : ".bin", #
} # $(CP) copy command
# $(MV) move command
DefaultToolCode = ["CC", "ASM", "SLINK", "DLINK", "PCH", "PP", "ASL", "ASMLINK"] # $(RM) delete command
# $(MD) create dir command
ToolCodeMapping = { # $(RD) remove dir command
"C-Code" : ["CC"], #
# "C-Header" : ["PCH"],
"Masm-Code" : ["PP", "ASM"], ## Reserved File-Type
"Iasm-Code" : ["PP", "ASM"], # IPF assembly code #
"Gasm-Code" : ["ASM"], # GNU assembly code # Dont't change following names of file types and their associated files,
"Visual-Form-Representation" : ["PP", "CC"], # which are also used in tools' code
"Preprocessed-Code" : ["CC"], #
"Acpi-Source-Language" : ["ASL"], # C-Code-File
"Object" : ["SLINK"], # C-Header-File
"Static-Library" : ["DLINK"], # Dynamic-Library-File
"Dependency-Expression" : ["PP"], # Static-Library-File
"Acpi-Source-Language" : ["PP", "ASL"], # Visual-Form-Representation-File
"Acpi-Table-Source" : ["CC", "DLINK"], # Unicode-Text-File
"Masm16-Code" : ["ASM", "ASMLINK"], #
"MicorCode-Text" : ["CC"],
} [Build.C-Code-File]
<InputFile>
ToolChainFamilyMapping = { ?.c
"C-Code" : ["MSFT", "INTEL", "GCC"], ?.C
"C-Header" : ["MSFT", "INTEL", "GCC"], ?.cc
"Masm-Code" : ["MSFT", "INTEL"], ?.CC
"Iasm-Code" : ["MSFT", "INTEL"], # IPF assembly code ?.cpp
"Gasm-Code" : ["GCC"], # GNU assembly code ?.Cpp
"Unicode-Text" : ["MSFT", "INTEL", "GCC"], ?.CPP
"Visual-Form-Representation" : ["MSFT", "INTEL", "GCC"],
"Dependency-Expression" : ["MSFT", "INTEL", "GCC"], <OutputFile>
"FirmwareVolume" : ["MSFT", "INTEL", "GCC"], $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
"Efi-Image" : ["MSFT", "INTEL", "GCC"],
"Firmware-File-System" : ["MSFT", "INTEL", "GCC"], <Command.MSFT, Command.INTEL>
"Bmp-Image" : ["MSFT", "INTEL", "GCC"], "$(CC)" /Fo${dst} $(CC_FLAGS) $(INC) ${src}
"Preprocessed-Code" : ["MSFT", "INTEL"],
"Acpi-Source-Language" : ["MSFT", "INTEL"], <Command.GCC>
"Acpi-Table-Source" : ["MSFT", "INTEL"], "$(CC)" -o ${dst} $(CC_FLAGS) $(INC) ${src}
"Masm16-Code" : ["MSFT"],
"MicorCode-Text" : ["MSFT", "INTEL"], [Build.C-Header-File]
} <InputFile>
*.h, *.H
## Build rules for makefile
# Placeholders for string substitution <OutputFile>
# ${fpath} File path relative to $(WORKSPACE) $(OUTPUT_DIR)(+)$(MODULE_NAME).gch
# ${fdir} File relative directory within a module $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
# ${fname} File full name without path
# ${fbase} File name without extension and path <Command>
# ${fext} File extension
# ${fdep} File dependencies
# ${_sep_} Directory separator [Build.Assembly-Code-File]
# ${_of_} Output flag <InputFile.MSFT, InputFile.INTEL>
# ${_if_} Include flag Assembly-Code-File = ?.asm, ?.Asm, ?.ASM
#
Makefile = { <InputFile.GCC>
# MSFT tool chain family ?.S
"MSFT" : {
"C-Code" : '''\ <OutputFile>
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep}
${END}\t"$(CC)" /Fo$@ $(CC_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} <Command.MSFT, Command.INTEL>
''', "$(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
"Masm-Code" : '''\ "$(ASM)" /Fo${dst} $(ASM_FLAGS) $(INC) ${d_path}(+)${s_base}.iii
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS)
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} <Command.GCC>
${END}\t"$(PP)" $(PP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i "$(ASM)" -o ${dst} $(ASM_FLAGS) $(INC) ${src}
\tTrim --source-code --convert-hex $(@D)${_sep_}${fbase}.i
\t"$(ASM)" /Fo$@ $(ASM_FLAGS) $(INC) $(@D)${_sep_}${fbase}.iii [Build.Iasm-Code-File]
''', <InputFile>
?.s
"Iasm-Code" : '''\
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) <OutputFile>
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
${END}\t"$(APP)" $(APP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i
\t"$(ASM)" -o $@ $(ASM_FLAGS) $(@D)${_sep_}${fbase}.i <Command.MSFT, Command.INTEL>
''', "$(APP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
"$(ASM)" -o ${dst} $(ASM_FLAGS) ${d_path}(+)${s_base}.i
"Visual-Form-Representation" : '''\
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) [Build.Visual-Form-Representation-File]
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} <InputFile>
${END}\t"$(PP)" $(VFRPP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i ?.vfr
\tTrim --vfr-file $(@D)${_sep_}${fbase}.i ?.Vfr
\t-mkdir $(DEBUG_DIR)${_sep_}${fdir} > NUL 2>&1 ?.VFR
\tVfrCompile -od $(DEBUG_DIR)${_sep_}${fdir} $(@D)${_sep_}${fbase}.iii
\t"$(CC)" /Fo$@ $(CC_FLAGS) $(INC) $(DEBUG_DIR)${_sep_}${fdir}${_sep_}${fbase}.c <OutputFile>
''', $(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
"Acpi-Source-Language" : <Command>
''' "$(PP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.aml : $(COMMON_DEPS) Trim --vfr-file -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.aml : $(WORKSPACE)${_sep_}${fdep} -mkdir ${d_path} > NUL 2>&1
${END}\t"$(PP)" $(APP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i VfrCompile -od ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii
\tTrim --source-code $(@D)${_sep_}${fbase}.i
\t"$(ASL)" -p $@ $(@D)${_sep_}${fbase}.iii [Build.Object-File]
\t-copy $(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.aml $(OUTPUT_DIR)${_sep_}${fbase}.aml /Y <InputFile>
''', *.obj
*.o
"Acpi-Table-Source" :
''' <OutputFile>
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.acpi : $(COMMON_DEPS) $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.acpi : $(WORKSPACE)${_sep_}${fdep}
${END}\t"$(CC)" /Fo$(@D)${_sep_}${fbase}.obj $(CC_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} <Command.MSFT, Command.INTEL>
\t"$(DLINK)" $(@D)${_sep_}${fbase}.obj /out:$(@D)${_sep_}${fbase}.dll $(SLINK_FLAGS) "$(SLINK)" /OUT:${dst} $(SLINK_FLAGS) ${src}
\tGenFw -o $@ -c $(@D)${_sep_}${fbase}.dll
\t-copy $(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.acpi $(OUTPUT_DIR)${_sep_}${fbase}.acpi /Y <Command.GCC>
''', "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src}
"Masm16-Code" : '''\ #[Build.Object-File, Build.Static-Library-File]
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.com : $(COMMON_DEPS) #BUILD_VERSION = 0x00010000
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.com : $(WORKSPACE)${_sep_}${fdep} #
${END}\tpushd . # <InputFile>
\tcd $(OUTPUT_DIR)${_sep_}${fdir} # Object-File = *.obj
\t"$(ASM)" /nologo /omf $(WORKSPACE)${_sep_}${fpath} /Bl"$(ASMLINK)" $(ASMLINK_FLAGS) # Static-Library-File = *.lib, *.a
\t-copy ${fbase}.com $(OUTPUT_DIR)${_sep_}${fbase}.com /Y & popd #
''', # <OutputFile>
# $(OUTPUT_DIR)(+)$(MODULE_NAME).lib
"MicorCode-Text" : '''\ #
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.bin : $(COMMON_DEPS) # <Command.MSFT>
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.bin : $(WORKSPACE)${_sep_}${fdep} # "$(SLINK)" /OUT:${dst} $(SLINK_FLAGS) ${src}
${END}\tGenFw -o $@ -m $(WORKSPACE)${_sep_}${fpath} #
''', # <Command.GCC>
}, # "$(SLINK)" -cr ${dst} $(SLINK_FLAGS) ${src1} -( ${src2} -)
#
# [Build.Static-Library-File]
# INTEL tool chain family <InputFile>
# ?.lib
"INTEL" : {
"C-Code" : '''\ <OutputFile>
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) $(DEBUG_DIR)(+)$(MODULE_NAME).dll
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep}
${END}\t"$(CC)" /Fo$@ $(CC_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} <Command.MSFT, Command.INTEL>
''', "$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) $(LIBS) ${src}
"Masm-Code" : '''\ <Command.GCC>
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) "$(DLINK)" -o ${dst} $(DLINK_FLAGS) -( $(DLINK_SPATH) $(LIBS) ${src} -)
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep}
${END}\t"$(PP)" $(PP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i [Build.Dynamic-Library-File]
\tTrim --source-code --convert-hex $(@D)${_sep_}${fbase}.i <InputFile>
\t"$(ASM)" /Fo$@ $(ASM_FLAGS) $(INC) $(@D)${_sep_}${fbase}.iii ?.dll
''',
<OutputFile>
"Iasm-Code" : '''\ $(DEBUG_DIR)(+)$(MODULE_NAME).efi
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS)
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} <Command>
${END}\t"$(APP)" $(APP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i GenFw -e $(MODULE_TYPE) -o ${dst} ${src}
\t"$(ASM)" -o $@ $(ASM_FLAGS) $(@D)${_sep_}${fbase}.i $(CP) ${dst} $(OUTPUT_DIR)
''', $(CP) ${dst} $(BIN_DIR)
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
"Visual-Form-Representation" : '''\
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) [Build.Dependency-Expression-File]
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} <InputFile>
${END}\t"$(PP)" $(VFRPP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i ?.dxs, ?.Dxs, ?.DXS
\tTrim --vfr-file $(@D)${_sep_}${fbase}.i
\t-mkdir $(DEBUG_DIR)${_sep_}${fdir} > NUL 2>&1 <OutputFile>
\tVfrCompile -od $(DEBUG_DIR)${_sep_}${fdir} $(@D)${_sep_}${fbase}.iii $(OUTPUT_DIR)(+)$(MODULE_NAME).depex
\t"$(CC)" /Fo$@ $(CC_FLAGS) $(INC) $(DEBUG_DIR)${_sep_}${fdir}${_sep_}${fbase}.c
''', <Command.MSFT>
# GenDepex -o ${dst} ${src}
"Acpi-Source-Language" :
''' [Build.Acpi-Source-Language-File]
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.aml : $(COMMON_DEPS) <InputFile>
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.aml : $(WORKSPACE)${_sep_}${fdep} ?.asl, ?.Asl, ?.ASL
${END}\t"$(PP)" $(APP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} > $(@D)${_sep_}${fbase}.i
\t"$(ASL)" -p $@ $(@D)${_sep_}${fbase}.i <OutputFile>
\t-copy $(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.aml $(OUTPUT_DIR)${_sep_}${fbase}.aml /Y $(OUTPUT_DIR)(+)${s_base}.aml
''',
<Command.MSFT, Command.INTEL>
"Acpi-Table-Source" : "$(PP)" $(APP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
''' Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.acpi : $(COMMON_DEPS) "$(ASL)" -p ${dst} ${d_path}(+)${s_base}.iii
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.acpi : $(WORKSPACE)${_sep_}${fdep}
${END}\t"$(CC)" /Fo$(@D)${_sep_}${fbase}.obj $(CC_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} [Build.Acpi-Table-Code-File]
\t"$(DLINK)" $(@D)${_sep_}${fbase}.obj /out:$(@D)${_sep_}${fbase}.dll $(SLINK_FLAGS) <InputFile>
\tGenFw -o $@ -c $(@D)${_sep_}${fbase}.dll ?.aslc
\t-copy $(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.acpi $(OUTPUT_DIR)${_sep_}${fbase}.acpi /Y
''', <OutputFile>
}, $(OUTPUT_DIR)(+)${s_base}.acpi
# <Command.MSFT>
# GCC tool chain family "$(CC)" /Fo$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj $(CC_FLAGS) $(INC) ${src}
# "$(DLINK)" /OUT:$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll $(SLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
"GCC" : { GenFw -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll
"C-Code" : [Build.Masm16-Code-File]
''' <InputFile>
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) ?.asm16, ?.Asm16, ?.ASM16
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep}
${END}\t"$(CC)" -o $@ $(CC_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} <OutputFile>
''', $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.com
"Gasm-Code" : <Command.MSFT, Command.INTEL>
''' pushd .
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS) cd $(OUTPUT_DIR)(+)${s_dir}
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} "$(ASM)" /nologo /omf ${src} /Bl"$(ASMLINK)" $(ASMLINK_FLAGS)
${END}\t"$(ASM)" -o $@ $(ASM_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} -$(CP) ${dst} $(OUTPUT_DIR) & popd
''',
[Build.Microcode-File]
"Visual-Form-Representation" : <InputFile>
''' ?.txt, ?.TXT, ?.Txt
$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(COMMON_DEPS)
${BEGIN}$(OUTPUT_DIR)${_sep_}${fdir}${_sep_}${fbase}.obj : $(WORKSPACE)${_sep_}${fdep} <OutputFile>
${END}\t"$(PP)" $(VFRPP_FLAGS) $(INC) $(WORKSPACE)${_sep_}${fpath} -o $(@D)${_sep_}${fbase}.i $(OUTPUT_DIR)(+)${s_base}.mcb
\tTrim --vfr-file $(@D)${_sep_}${fbase}.i
\t-mkdir $(DEBUG_DIR)${_sep_}${fdir} > NUL 2>&1 <Command>
\tVfrCompile -od $(DEBUG_DIR)${_sep_}${fdir} $(@D)${_sep_}${fbase}.iii GenFw -o ${dst} -m ${src}
\t"$(CC)" -o $@ $(CC_FLAGS) $(INC) $(DEBUG_DIR)${_sep_}${fdir}${_sep_}${fbase}.c
''', [Build.Microcode-Binary-File]
} <InputFile>
} *.mcb
# This acts like the main() function for the script, unless it is 'import'ed into another <OutputFile>
# script. $(OUTPUT_DIR)(+)$(MODULE_NAME).bin
if __name__ == '__main__':
for ext in FileTypeMapping: <Command>
print ext,":",FileTypeMapping[ext] GenFw -o ${dst} -j ${src}
for type in Makefile["nmake"]: [Build.Unicode-Text-File]
print "[",type,"]\n",Makefile["nmake"][type] <InputFile>
print *.uni, *.Uni, *.UNI
for type in Makefile["gmake"]: <OutputFile>
print "[",type,"]\n",Makefile["gmake"][type] $(DEBUG_DIR)(+)AutoGen.c
print $(DEBUG_DIR)(+)AutoGen.h
<Command>