3 # Copyright (c) 2004 - 2007, Intel Corporation
4 # All rights reserved. This program and the accompanying materials
5 # are licensed and made available under the terms and conditions of the BSD License
6 # which accompanies this distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 # This file should not need to be customized. Customizations should
19 # be done in LocalTools.env if at all possible.
21 # This file can be included by other makefiles.
23 # It defines variables used by the different toolchains. It first includes
24 # the user-customized LocalTools.env, and then uses those defines to
25 # define other variables.
27 # It basically has sections for different toolchains which define variables
33 # Everything depends on EDK_SOURCE. Make sure it's defined
36 !ERROR EDK_SOURCE environmental variable not set
40 # Tools depend on BUILD_DIR. Make sure it's defined
43 !ERROR BUILD_DIR environmental variable not set. Should be set in PlatformTools.env
47 # This include file gets customized by the developer. Get the customizations.
49 !INCLUDE $(EDK_SOURCE)\Sample\LocalTools.env
51 ################################################################################
53 # Define paths for EFI build tools
55 ################################################################################
56 !IFNDEF EDK_TOOLS_PATH
57 EDK_TOOLS_BIN = $(EDK_SOURCE)\Tools\Bin
59 EDK_TOOLS_BIN = $(EDK_TOOLS_PATH)\Bin
61 EDK_TOOLS_DIR = $(EDK_SOURCE)\Sample\Tools
62 EDK_TOOLS_SOURCE = $(EDK_TOOLS_DIR)\Source
63 EDK_TOOLS_COMMON = $(EDK_TOOLS_DIR)\Source\Common
64 EDK_TOOLS_OUTPUT = $(BUILD_DIR)\Tools
65 PCCTS_DIR = $(EDK_SOURCE)\Other\Maintained\Tools\Pccts
68 # This include file gets some version info.
70 !INCLUDE $(EDK_SOURCE)\Sample\Version.env
73 # Macros to define the build tools
75 ANTLR = $(PCCTS_DIR)\bin\antlr
76 DLG = $(PCCTS_DIR)\bin\dlg
77 EXE2BIN = $(EDK_TOOLS_OUTPUT)\Strip
78 FWIMAGE = $(EDK_TOOLS_OUTPUT)\FwImage
79 GENDEPEX = $(EDK_TOOLS_OUTPUT)\GenDepex
80 GENFDIMAGE = $(EDK_TOOLS_OUTPUT)\GenFdImage
81 GENFFSFILE = $(EDK_TOOLS_OUTPUT)\GenFfsFile
82 GENFVIMAGE = $(EDK_TOOLS_OUTPUT)\GenFvImage
83 GENSECTION = $(EDK_TOOLS_OUTPUT)\GenSection
84 GENTEIMAGE = $(EDK_TOOLS_OUTPUT)\GenTEImage
85 GUIDCHK = $(EDK_TOOLS_OUTPUT)\GuidChk
86 MAKEDEPS = $(EDK_TOOLS_OUTPUT)\MakeDeps
87 PROCESSDSC = $(EDK_TOOLS_OUTPUT)\ProcessDsc
88 STRGATHER = $(EDK_TOOLS_OUTPUT)\StrGather
89 SETSTAMP = $(EDK_TOOLS_OUTPUT)\SetStamp
90 VFRCOMPILE = $(EDK_TOOLS_OUTPUT)\VfrCompile
91 GENAPRIORI = $(EDK_TOOLS_OUTPUT)\GenAprioriFile
92 MODIFYINF = $(EDK_TOOLS_OUTPUT)\ModifyInf
97 # Everything else requires that TOOLCHAIN be defined. This should be defined
98 # by the calling makefile.
101 !ERROR TOOLCHAIN not defined for $(EDK_SOURCE)\Sample\CommonTools.env
104 ###############################################################################
106 # Specify the path and macros for ASL tools
108 ###############################################################################
109 !IF "$(EFI_ASL_LOCAL)" == "YES"
110 ASL = $(ASLPATH)\Iasl
112 ASL = $(EDK_TOOLS_BIN)\Iasl
116 C_FLAGS_ASL = /nologo /EP /C
118 ###############################################################################
120 # Specify the path and macros for IA32 tools
122 ###############################################################################
124 !IF "$(TOOLCHAIN)" == "TOOLCHAIN_IA32"
127 # Globally relevant flags. Options not appropriate for all builds may be
128 # appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or
129 # in the platform specific macros (xxx_PROJ_FLAGS)
133 !IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"
135 !IF "$(USE_VC8)" == "YES"
136 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /D USE_VC8 /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
138 C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
140 ASM_STD_FLAGS = /nologo /Fl$*.lst $(INC)
144 !IF "$(USE_VC8)" == "YES"
145 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /D USE_VC8 /c /Fo$@ $(INC)
147 C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fo$@ $(INC)
149 ASM_STD_FLAGS = /nologo $(INC)
153 LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF /BASE:0 /IGNORE:4001,4078,4086,4096,4108 $(BUILD_DIR)\IA32\CompilerStub.lib
154 LIB_STD_FLAGS = /nologo
157 # Build type specific flags. Globally relevant flags belong in the standard
158 # macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the
159 # PlatformTools.env file in macros named xxx_PROJ_FLAGS.
161 C_ARCH_FLAGS = /D EFI32
162 ASM_ARCH_FLAGS = /W3 /WX /c /coff /Fo$@ /DEFI32
163 LINK_ARCH_FLAGS = /MACHINE:I386
166 ASM16_FLAGS = /nologo /c /omf /Fo$@
176 # When using VS ml to compile 16bit code, please add /omf compiler option
180 !IF "$(EFI_ASSEMBLER_NAME)" == ""
181 ASM16 = $(MASMPATH)\bin\ml
182 ASMLINK16 = $(MASMPATH)\binr\link
183 ASMLINK = $(MASMPATH)\binr\link
185 ASM16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\bin\ml
186 ASMLINK16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link
187 ASMLINK = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link
192 !IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"
193 ASM_ARCH_FLAGS = $(ASM_ARCH_FLAGS) /Zi /DDEBUG
194 C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(DEST_DIR)\$(BASE_NAME)Obj
195 LINK_STD_FLAGS = $(LINK_STD_FLAGS) /DEBUG
198 # END OF TOOLCHAIN_IA32
199 ###############################################################################
201 ###############################################################################
203 # Specify the path and macros for the X64 (also called x86-64, EM64T, AMD64) tools
205 ###############################################################################
207 !ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_X64"
210 # Globally relevant flags. Options not appropriate for all builds may be
211 # appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or
212 # in the platform specific macros (xxx_PROJ_FLAGS)
215 !IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"
216 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /c /GS- /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
217 ASM_STD_FLAGS = /nologo /Fl$*.lst $(INC)
219 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /c /GS- /Fo$@ $(INC)
220 ASM_STD_FLAGS = /nologo $(INC)
222 LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF /BASE:0 /IGNORE:4001,4078,4086,4096,4108 $(BUILD_DIR)\X64\CompilerStub.lib
223 LIB_STD_FLAGS = /nologo
226 # Build type specific flags. Globally relevant flags belong in the standard
227 # macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the
228 # PlatformTools.env file in macros named xxx_PROJ_FLAGS.
230 C_ARCH_FLAGS = /D EFIX64
231 ASM_ARCH_FLAGS = /W3 /WX /c /Fo$@ /DEFIX64
232 LINK_ARCH_FLAGS = /Machine:AMD64
235 ASM16_FLAGS = /nologo /c /omf /Fo$@
241 !IF "$(EFI_COMPILER_X64_NAME)" == ""
242 !IF "$(USE_VC8_X64)" == "YES"
244 # Use VC8 as X64 compiler
246 CC = "$(VC8_X64_PATH)\cl"
247 LINK = "$(VC8_X64_PATH)\link"
248 LIB = "$(VC8_X64_PATH)\lib"
249 ASM = "$(VC8_X64_PATH)\ml64"
252 # Use DDK as X64 compiler
254 CC = $(WIN_DDK_X64_PATH)\cl
255 LINK = $(WIN_DDK_X64_PATH)\link
256 LIB = $(WIN_DDK_X64_PATH)\lib
257 ASM = $(WIN_DDK_X64_PATH)\ml64
260 CC = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\cl
261 LINK = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\link
262 LIB = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\lib
263 ASM = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\ml64
266 !IF "$(EFI_ASSEMBLER_NAME)" == ""
267 ASM16 = $(MASMPATH)\bin\ml
268 ASMLINK16 = $(MASMPATH)\binr\link
269 ASMLINK = $(MASMPATH)\binr\link
271 ASM16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\bin\ml
272 ASMLINK16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link
273 ASMLINK = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link
278 !IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"
279 ASM_ARCH_FLAGS = $(ASM_ARCH_FLAGS) /Zi /DDEBUG
280 C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(DEST_DIR)\$(BASE_NAME)Obj
281 LINK_STD_FLAGS = $(LINK_STD_FLAGS) /DEBUG
284 # END OF TOOLCHAIN_X64
285 ###############################################################################
287 ###############################################################################
289 # Specify the path and macros for the IPF tools
291 ###############################################################################
293 !ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_IPF"
296 # Globally relevant flags. Options not appropriate for all builds may be
297 # appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or
298 # in the platform specific macros (xxx_PROJ_FLAGS)
302 !IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"
304 !IF "$(USE_VC8_IPF)" == "YES"
305 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
307 !IF "$(USE_NEWDDK)" == "YES"
308 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
310 C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
316 !IF "$(USE_VC8_IPF)" == "YES"
317 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fo$@ $(INC)
319 !IF "$(USE_NEWDDK)" == "YES"
320 C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fo$@ $(INC)
322 C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fo$@ $(INC)
328 ASM_STD_FLAGS = $(INC)
329 LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF /BASE:0 /IGNORE:4001,4078,4086,4096,4108
330 LIB_STD_FLAGS = /nologo
333 # Build type specific flags. Globally relevant flags belong in the standard
334 # macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the
335 # PlatformTools.env file in macros named xxx_PROJ_FLAGS.
337 C_ARCH_FLAGS = /D EFI64
338 ASM_ARCH_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -o $@
339 LINK_ARCH_FLAGS = /MACHINE:IA64
343 # This is used for preprocessing IPF Assembly files
345 C_FLAGS_PRO = /nologo /EP /C $(C_STD_FLAGS) $(C_ARCH_FLAGS) $(C_PROJ_FLAGS) $(C_STD_INCLUDE)
347 !IF "$(EFI_DEBUG)" == "YES"
348 ASM_ARCH_FLAGS = $(ASM_ARCH_FLAGS) -d debug
354 !IF "$(EFI_COMPILER_NAME)" == ""
355 !IF "$(USE_VC8_IPF)" == "YES"
356 CC = "$(VC8_IPF_PATH)\cl"
357 LINK = "$(VC8_IPF_PATH)\link"
358 LIB = "$(VC8_IPF_PATH)\lib"
360 CC = $(EFI_IA64TOOLPATH)\cl
361 LINK = $(EFI_IA64TOOLPATH)\link
362 LIB = $(EFI_IA64TOOLPATH)\lib
365 CC = $(EDK_TOOLS_BIN)\Ipf\$(EFI_COMPILER_NAME)\cl
366 LINK = $(EDK_TOOLS_BIN)\Ipf\$(EFI_COMPILER_NAME)\link
367 LIB = $(EDK_TOOLS_BIN)\Ipf\$(EFI_COMPILER_NAME)\lib
370 !IF "$(EFI_ASSEMBLER_NAME)" == ""
371 !IF "$(USE_VC8_IPF)" == "YES"
372 ASM = "$(VC8_IPF_PATH)\ias"
373 ASMLINK = "$(VC8_IPF_PATH)\link"
375 ASM = $(EFI_IA64ASMPATH)\ias
376 ASMLINK = $(EFI_IA64ASMPATH)\link
379 ASM = $(EDK_TOOLS_BIN)\Ipf\$(EFI_ASSEMBLER_NAME)\ias
380 ASMLINK = $(EDK_TOOLS_BIN)\Ipf\$(EFI_ASSEMBLER_NAME)\link
385 !IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"
386 C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(DEST_DIR)\$(BASE_NAME)Obj
387 LINK_STD_FLAGS = $(LINK_STD_FLAGS) /DEBUG
391 ###############################################################################
393 ###############################################################################
395 # Define toolchain for building the EFI tools on an IA32 system.
397 ###############################################################################
399 !ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_MSVC"
402 # Globally relevant flags. Options not appropriate for all builds may be
403 # appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or
404 # in the platform specific macros (xxx_PROJ_FLAGS)
406 !IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"
408 !IF "$(USE_VC8)" == "YES"
409 C_STD_FLAGS = /nologo /W4 /WX /EHsc /Gy /D _CRT_SECURE_NO_DEPRECATE /D USE_VC8 /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
411 C_STD_FLAGS = /nologo /W4 /WX /GX /Gy /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)
413 ASM_STD_FLAGS = /nologo /Fl$*.lst $(INC)
417 !IF "$(USE_VC8)" == "YES"
418 C_STD_FLAGS = /nologo /W4 /WX /EHsc /Gy /D _CRT_SECURE_NO_DEPRECATE /D USE_VC8 /c /Fo$@ $(INC)
420 C_STD_FLAGS = /nologo /W4 /WX /GX /Gy /c /Fo$@ $(INC)
422 ASM_STD_FLAGS = /nologo $(INC)
426 LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF
427 LIB_STD_FLAGS = /nologo
432 # Build type specific flags. Globally relevant flags belong in the standard
433 # macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the
434 # PlatformTools.env file in macros named xxx_PROJ_FLAGS.
438 # Add a define to skip inclusion of Microsoft include file rpcasync.h, which
439 # results in a compile warning at W4.
441 C_ARCH_FLAGS = /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D __RPCASYNC_H__
443 LINK_ARCH_FLAGS = /MACHINE:i386
447 # Always turn on debug for the build tools so that we can debug problems
449 # NOTE: Ideally all the tools makefiles should be updated to use LINK_FLAGS_EXE
450 # instead of L_FLAGS for linking. When this happens we can get rid of
451 # the L_FLAGS definition here.
454 #!IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"
455 C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj
456 LINK_ARCH_FLAGS = $(LINK_ARCH_FLAGS) /DEBUG
457 L_FLAGS = $(L_FLAGS) /DEBUG
461 # Clear any project flags when building tools
468 EBC_LINK_PROJ_FLAGS =
480 # Use a different macro name for tools build to avoid conflict with environment
485 INC = -I $(EDK_SOURCE)\Foundation \
486 -I $(EDK_SOURCE)\Foundation\Efi \
487 -I $(EDK_SOURCE)\Foundation\Framework \
488 -I $(EDK_SOURCE)\Sample\Platform\Nt32 \
489 -I $(EDK_SOURCE)\Foundation\Core\Dxe \
490 -I $(EDK_SOURCE)\Foundation\Include \
491 -I $(EDK_SOURCE)\Foundation\Efi\Include \
492 -I $(EDK_SOURCE)\Foundation\Framework\Include \
493 -I $(EDK_SOURCE)\Foundation\Include\IndustryStandard \
494 -I $(EDK_SOURCE)\Foundation\Include\Ia32 \
495 -I $(EDK_SOURCE)\Foundation\Include\Pei \
496 -I $(EDK_SOURCE)\Foundation\Library\Pei\Include \
497 -I $(EDK_SOURCE)\Sample\Include \
498 -I "$(EDK_TOOLS_COMMON)"
501 ###############################################################################
503 ###############################################################################
505 # Specify the path and macros for the EBC tools
507 ###############################################################################
509 !ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_EBC"
511 !IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"
512 EBC_C_STD_FLAGS = /nologo /W3 /WX /c /Fa$* /FAsc /Fo$@ $(INC) /X
514 EBC_C_STD_FLAGS = /nologo /W3 /WX /c /Fo$@ $(INC) /X
518 # All EBC entry point functions must be called EfiMain. Redefine it.
520 !IF "$(IMAGE_ENTRY_POINT)" == ""
521 IMAGE_ENTRY_POINT = EfiMain
523 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /D $(IMAGE_ENTRY_POINT)=EfiMain
524 EBC_LINK_STD_FLAGS = /nologo /MACHINE:EBC /BASE:0 /OPT:REF /NODEFAULTLIB
525 EBC_LIB_STD_FLAGS = /nologo /MACHINE:EBC
528 # EBC tools path should be defined in LocalTools.env.
530 EBC_CC = $(EBC_TOOLS_PATH)\Bin\Iec
531 EBC_LINK = $(EBC_TOOLS_PATH)\Bin\Link
532 EBC_LIB = $(EBC_TOOLS_PATH)\Bin\Link /lib
534 !IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"
535 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /Zd /Zi
536 EBC_LINK_STD_FLAGS = $(EBC_LINK_STD_FLAGS) /DEBUG
541 ###############################################################################
543 # Let the caller define a NULL toolchain if they don't care. This way you can
544 # pick up at least some defines.
546 ###############################################################################
548 !ELSEIF "$(TOOLCHAIN)" == ""
550 ###############################################################################
552 # You get this if the calling makefile did not define TOOLCHAIN_xxx before
553 # including this file.
555 ###############################################################################
558 !ERROR Unknown toolchain $(TOOLCHAIN) defined for $(EDK_SOURCE)\Sample\CommonTools.env use
562 ###############################################################################
564 # These are standard settings for all tool chains
566 ###############################################################################
569 # These are standard build options
571 VERSION_FLAGS = /D EFI_SPECIFICATION_VERSION=$(EFI_SPECIFICATION_VERSION) \
572 /D PI_SPECIFICATION_VERSION=$(PI_SPECIFICATION_VERSION) \
573 /D TIANO_RELEASE_VERSION=$(TIANO_RELEASE_VERSION)
574 C_STD_FLAGS = $(C_STD_FLAGS) $(VERSION_FLAGS)
575 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) $(VERSION_FLAGS)
576 C_FLAGS_ASL = $(C_FLAGS_ASL) $(VERSION_FLAGS)
577 VFRCOMPILE_FLAGS = $(VFRCOMPILE_FLAGS) -ppflag "$(VERSION_FLAGS)"
578 !IF "$(TOOLCHAIN)" != "TOOLCHAIN_IPF"
579 ASM_STD_FLAGS = $(ASM_STD_FLAGS) $(VERSION_FLAGS)
582 !IF "$(EFI_DEBUG)" == "YES"
583 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_DEBUG
586 !IF "$(EFI_DEBUG_CLEAR_MEMORY)" == "YES"
587 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_DEBUG_CLEAR_MEMORY
590 !IF "$(EFI_PEI_PERFORMANCE)" == "YES"
591 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_PEI_PERFORMANCE /D EFI_DXE_PERFORMANCE
594 !IF "$(EFI_ADDTIONAL_DRIVERS)" == "YES"
595 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_ADDTIONAL_DRIVERS
598 !IF "$(EFI_USE_CUSTOM_COMPRESS)" == "YES"
599 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_USE_CUSTOM_COMPRESS
602 !IF "$(EFI_UNLOCK_FWH)" == "YES"
603 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_UNLOCK_FWH
606 !IF "$(EFI_DXE_PERFORMANCE)" == "YES"
607 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_DXE_PERFORMANCE
610 !IF "$(EFI_S3_RESUME)" == "YES"
611 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_S3_RESUME
614 !IF "$(EFI_SIZE_REDUCTION_APPLIED)" == "YES"
615 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_SIZE_REDUCTION_APPLIED
618 !IF "$(EFI_PEI_REPORT_STATUS_CODE)" == "YES"
619 FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_PEI_REPORT_STATUS_CODE_ON
622 !IF "$(SIZE_REDUCTION_ISA_COMBINED)" == "YES"
623 FEATURE_FLAGS = $(FEATURE_FLAGS) /D SIZE_REDUCTION_ISA_COMBINED
626 C_STD_FLAGS = $(C_STD_FLAGS) $(FEATURE_FLAGS)
627 EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) $(FEATURE_FLAGS)
628 C_FLAGS_ASL = $(C_FLAGS_ASL) $(FEATURE_FLAGS)
629 VFRCOMPILE_FLAGS = $(VFRCOMPILE_FLAGS) -ppflag "$(FEATURE_FLAGS)"
630 !IF "$(TOOLCHAIN)" != "TOOLCHAIN_IPF"
631 ASM_STD_FLAGS = $(ASM_STD_FLAGS) $(FEATURE_FLAGS)
635 # This is used for preprocessing dependency files
637 C_FLAGS_DPX = /nologo /EP $(INC) $(VERSION_FLAGS) $(FEATURE_FLAGS)
639 ###############################################################################
641 ###############################################################################
643 # Collect final build flags for components. These flags are used to build
644 # any standard component and some non-standard components.
646 ###############################################################################
647 C_FLAGS = $(C_STD_FLAGS) $(C_ARCH_FLAGS) $(C_PROJ_FLAGS) $(C_STD_INCLUDE)
648 ASM_FLAGS = $(ASM_STD_FLAGS) $(ASM_ARCH_FLAGS) $(ASM_PROJ_FLAGS)
649 LINK_FLAGS_DLL = $(LINK_STD_FLAGS) $(LINK_ARCH_FLAGS) $(LINK_PROJ_FLAGS) /DLL
650 LINK_FLAGS_EXE = $(LINK_STD_FLAGS) $(LINK_ARCH_FLAGS) $(LINK_PROJ_FLAGS)
651 LIB_FLAGS = $(LIB_STD_FLAGS) $(LIB_ARCH_FLAGS) $(LIB_PROJ_FLAGS)
652 EBC_C_FLAGS = $(EBC_C_STD_FLAGS) $(EBC_C_ARCH_FLAGS) $(EBC_C_PROJ_FLAGS)
653 EBC_LINK_FLAGS = $(EBC_LINK_STD_FLAGS) $(EBC_LINK_ARCH_FLAGS) $(EBC_LINK_PROJ_FLAGS)
654 EBC_LIB_FLAGS = $(EBC_LIB_STD_FLAGS) $(EBC_LIB_ARCH_FLAGS) $(EBC_LIB_PROJ_FLAGS)
656 ###############################################################################
658 # define X64 denpendant driver files
660 ###############################################################################
661 !IF "$(EFI_BUILD_TARGET_X64)" == "YES"
662 BUILD_TARGET_PROCESSOR = X64
665 BUILD_TARGET_PROCESSOR = IA32
668 ###############################################################################
670 # define EFI specification denpendant driver files
672 ###############################################################################
673 !IF "$(UEFI_MODE)" == "YES"
675 ATAPI_PASS_THRU_INF = Sample\Bus\Pci\AtapiExtPassThru\Dxe\AtapiExtPassThru.inf
676 !IF "$(CAPSULE_INF)" == ""
677 CAPSULE_INF = Sample\Universal\Capsule\RuntimeDxe\Capsule.inf
679 DEVPATH_INF = Sample\Universal\DevicePath\Dxe\DevicePath.inf
684 ATAPI_PASS_THRU_INF = Sample\Bus\Pci\AtapiPassThru\Dxe\AtapiPassThru.inf
686 ###############################################################################
688 # define PIWG specification denpendant driver files
690 ###############################################################################
691 !IF "$(PI_MODE)" == "YES"
696 ###############################################################################
698 # define customized compress makefile
700 ###############################################################################
701 CUSTOMIZEDCOMPRESS_MAKEFILE = $(EDK_TOOLS_SOURCE)\CustomizedCompress\Makefile
702 COMPRESS_METHOD = Dummy
703 ###############################################################################
705 # define EFI_BINARY default path
707 ###############################################################################
709 EFI_BINARY=$(EDK_SOURCE)\Bin
712 EFI_PLATFORM_BIN=$(EFI_BINARY)\$(PROJECT_NAME)$(BUILD_TARGET_DIRECTORY)