EHCI Controllers with a CapLen of 0 are ignored.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / CommonTools.env
CommitLineData
3eb9473e 1#/*++\r
2# \r
4b1e1121
HT
3# Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
4# This program and the accompanying materials \r
3eb9473e 5# are licensed and made available under the terms and conditions of the BSD License \r
6# which accompanies this distribution. The full text of the license may be found at \r
7# http://opensource.org/licenses/bsd-license.php \r
8# \r
9# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11# \r
12# Module Name:\r
13# \r
14# CommonTools.env \r
15# \r
16# Abstract:\r
17# \r
18# This file should not need to be customized. Customizations should\r
19# be done in LocalTools.env if at all possible.\r
20#\r
21# This file can be included by other makefiles. \r
22# \r
23# It defines variables used by the different toolchains. It first includes\r
24# the user-customized LocalTools.env, and then uses those defines to \r
25# define other variables.\r
26#\r
27# It basically has sections for different toolchains which define variables\r
28# used to build.\r
29# \r
30#--*/\r
31\r
32#\r
33# Everything depends on EDK_SOURCE. Make sure it's defined\r
34#\r
35!IFNDEF EDK_SOURCE\r
36!ERROR EDK_SOURCE environmental variable not set \r
37!ENDIF\r
38\r
39#\r
40# Tools depend on BUILD_DIR. Make sure it's defined\r
41#\r
42!IFNDEF BUILD_DIR\r
43!ERROR BUILD_DIR environmental variable not set. Should be set in PlatformTools.env\r
44!ENDIF\r
45\r
46#\r
47# This include file gets customized by the developer. Get the customizations.\r
48#\r
49!INCLUDE $(EDK_SOURCE)\Sample\LocalTools.env\r
50\r
51################################################################################\r
52#\r
53# Define paths for EFI build tools\r
54#\r
55################################################################################\r
56!IFNDEF EDK_TOOLS_PATH\r
57EDK_TOOLS_BIN = $(EDK_SOURCE)\Tools\Bin\r
58!ELSE\r
59EDK_TOOLS_BIN = $(EDK_TOOLS_PATH)\Bin\r
60!ENDIF\r
61EDK_TOOLS_DIR = $(EDK_SOURCE)\Sample\Tools\r
62EDK_TOOLS_SOURCE = $(EDK_TOOLS_DIR)\Source\r
63EDK_TOOLS_COMMON = $(EDK_TOOLS_DIR)\Source\Common\r
64EDK_TOOLS_OUTPUT = $(BUILD_DIR)\Tools\r
65PCCTS_DIR = $(EDK_SOURCE)\Other\Maintained\Tools\Pccts\r
66\r
67#\r
68# This include file gets some version info.\r
69#\r
70!INCLUDE $(EDK_SOURCE)\Sample\Version.env\r
71\r
72#\r
73# Macros to define the build tools\r
74#\r
75ANTLR = $(PCCTS_DIR)\bin\antlr\r
76DLG = $(PCCTS_DIR)\bin\dlg\r
565cfeea 77EXE2BIN = $(EDK_TOOLS_OUTPUT)\Strip\r
3eb9473e 78FWIMAGE = $(EDK_TOOLS_OUTPUT)\FwImage\r
79GENDEPEX = $(EDK_TOOLS_OUTPUT)\GenDepex\r
80GENFDIMAGE = $(EDK_TOOLS_OUTPUT)\GenFdImage\r
81GENFFSFILE = $(EDK_TOOLS_OUTPUT)\GenFfsFile\r
82GENFVIMAGE = $(EDK_TOOLS_OUTPUT)\GenFvImage\r
83GENSECTION = $(EDK_TOOLS_OUTPUT)\GenSection\r
565cfeea 84GENTEIMAGE = $(EDK_TOOLS_OUTPUT)\GenTEImage\r
3eb9473e 85GUIDCHK = $(EDK_TOOLS_OUTPUT)\GuidChk\r
86MAKEDEPS = $(EDK_TOOLS_OUTPUT)\MakeDeps\r
87PROCESSDSC = $(EDK_TOOLS_OUTPUT)\ProcessDsc\r
88STRGATHER = $(EDK_TOOLS_OUTPUT)\StrGather\r
89SETSTAMP = $(EDK_TOOLS_OUTPUT)\SetStamp\r
90VFRCOMPILE = $(EDK_TOOLS_OUTPUT)\VfrCompile\r
91GENAPRIORI = $(EDK_TOOLS_OUTPUT)\GenAprioriFile\r
92MODIFYINF = $(EDK_TOOLS_OUTPUT)\ModifyInf\r
93\r
94MAKE = nmake -nologo\r
95\r
96#\r
97# Everything else requires that TOOLCHAIN be defined. This should be defined\r
98# by the calling makefile. \r
99#\r
100!IFNDEF TOOLCHAIN\r
101!ERROR TOOLCHAIN not defined for $(EDK_SOURCE)\Sample\CommonTools.env\r
102!ENDIF\r
103\r
104###############################################################################\r
105#\r
106# Specify the path and macros for ASL tools\r
107#\r
108###############################################################################\r
109!IF "$(EFI_ASL_LOCAL)" == "YES"\r
110ASL = $(ASLPATH)\Iasl\r
111!ELSE\r
112ASL = $(EDK_TOOLS_BIN)\Iasl\r
113!ENDIF\r
114\r
115ASL_FLAGS =\r
116C_FLAGS_ASL = /nologo /EP /C\r
117\r
118###############################################################################\r
119#\r
120# Specify the path and macros for IA32 tools\r
121#\r
122###############################################################################\r
123\r
124!IF "$(TOOLCHAIN)" == "TOOLCHAIN_IA32"\r
125\r
126#\r
127# Globally relevant flags. Options not appropriate for all builds may be \r
128# appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or\r
129# in the platform specific macros (xxx_PROJ_FLAGS)\r
130#\r
131C_STD_INCLUDE = /X\r
565cfeea 132\r
3eb9473e 133!IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"\r
565cfeea 134\r
3eb9473e 135!IF "$(USE_VC8)" == "YES"\r
565cfeea 136C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /D USE_VC8 /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
3eb9473e 137!ELSE\r
565cfeea 138C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
3eb9473e 139!ENDIF\r
565cfeea 140ASM_STD_FLAGS = /nologo /Fl$*.lst $(INC)\r
141\r
3eb9473e 142!ELSE\r
565cfeea 143\r
3eb9473e 144!IF "$(USE_VC8)" == "YES"\r
565cfeea 145C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /D USE_VC8 /c /Fo$@ $(INC)\r
3eb9473e 146!ELSE\r
565cfeea 147C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fo$@ $(INC)\r
3eb9473e 148!ENDIF\r
149ASM_STD_FLAGS = /nologo $(INC) \r
565cfeea 150\r
151!ENDIF\r
152\r
3eb9473e 153LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF /BASE:0 /IGNORE:4001,4078,4086,4096,4108 $(BUILD_DIR)\IA32\CompilerStub.lib\r
154LIB_STD_FLAGS = /nologo \r
155\r
156#\r
157# Build type specific flags. Globally relevant flags belong in the standard \r
158# macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the\r
159# PlatformTools.env file in macros named xxx_PROJ_FLAGS.\r
160#\r
161C_ARCH_FLAGS = /D EFI32\r
162ASM_ARCH_FLAGS = /W3 /WX /c /coff /Fo$@ /DEFI32\r
163LINK_ARCH_FLAGS = /MACHINE:I386\r
164LIB_ARCH_FLAGS =\r
165\r
166ASM16_FLAGS = /nologo /c /omf /Fo$@\r
167ASMLINK16_FLAGS =\r
168\r
169#\r
170# Build tools\r
171#\r
172CC = cl\r
173LINK = link\r
174LIB = lib\r
175#\r
176# When using VS ml to compile 16bit code, please add /omf compiler option \r
177#\r
178ASM = ml\r
179\r
180!IF "$(EFI_ASSEMBLER_NAME)" == ""\r
181ASM16 = $(MASMPATH)\bin\ml\r
182ASMLINK16 = $(MASMPATH)\binr\link\r
183ASMLINK = $(MASMPATH)\binr\link\r
184!ELSE\r
185ASM16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\bin\ml\r
186ASMLINK16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link\r
187ASMLINK = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link\r
188!ENDIF\r
189\r
190BSCMAKE = bscmake\r
191\r
192!IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"\r
193ASM_ARCH_FLAGS = $(ASM_ARCH_FLAGS) /Zi /DDEBUG\r
194C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(DEST_DIR)\$(BASE_NAME)Obj\r
195LINK_STD_FLAGS = $(LINK_STD_FLAGS) /DEBUG\r
196!ENDIF\r
197\r
198# END OF TOOLCHAIN_IA32\r
199###############################################################################\r
200\r
201###############################################################################\r
202#\r
203# Specify the path and macros for the X64 (also called x86-64, EM64T, AMD64) tools\r
204#\r
205###############################################################################\r
206\r
207!ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_X64"\r
208\r
209#\r
210# Globally relevant flags. Options not appropriate for all builds may be \r
211# appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or\r
212# in the platform specific macros (xxx_PROJ_FLAGS)\r
213#\r
214C_STD_INCLUDE = /X\r
215!IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"\r
565cfeea 216C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /c /GS- /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC) \r
217ASM_STD_FLAGS = /nologo /Fl$*.lst $(INC)\r
3eb9473e 218!ELSE\r
565cfeea 219C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /c /GS- /Fo$@ $(INC) \r
3eb9473e 220ASM_STD_FLAGS = /nologo $(INC)\r
565cfeea 221!ENDIF\r
3eb9473e 222LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF /BASE:0 /IGNORE:4001,4078,4086,4096,4108 $(BUILD_DIR)\X64\CompilerStub.lib\r
223LIB_STD_FLAGS = /nologo \r
224\r
225#\r
226# Build type specific flags. Globally relevant flags belong in the standard \r
227# macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the\r
228# PlatformTools.env file in macros named xxx_PROJ_FLAGS.\r
229#\r
230C_ARCH_FLAGS = /D EFIX64\r
231ASM_ARCH_FLAGS = /W3 /WX /c /Fo$@ /DEFIX64\r
232LINK_ARCH_FLAGS = /Machine:AMD64\r
233LIB_ARCH_FLAGS =\r
234\r
235ASM16_FLAGS = /nologo /c /omf /Fo$@\r
236ASMLINK16_FLAGS =\r
237\r
238#\r
239# Build tools\r
240#\r
241!IF "$(EFI_COMPILER_X64_NAME)" == ""\r
242!IF "$(USE_VC8_X64)" == "YES"\r
243#\r
244# Use VC8 as X64 compiler\r
245#\r
246CC = "$(VC8_X64_PATH)\cl"\r
247LINK = "$(VC8_X64_PATH)\link"\r
248LIB = "$(VC8_X64_PATH)\lib"\r
249ASM = "$(VC8_X64_PATH)\ml64"\r
250!ELSE\r
251#\r
252# Use DDK as X64 compiler\r
253#\r
254CC = $(WIN_DDK_X64_PATH)\cl\r
255LINK = $(WIN_DDK_X64_PATH)\link\r
256LIB = $(WIN_DDK_X64_PATH)\lib\r
257ASM = $(WIN_DDK_X64_PATH)\ml64\r
258!ENDIF\r
259!ELSE\r
260CC = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\cl\r
261LINK = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\link\r
262LIB = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\lib\r
263ASM = $(EDK_TOOLS_BIN)\X64\$(EFI_COMPILER_X64_NAME)\ml64\r
264!ENDIF\r
265\r
266!IF "$(EFI_ASSEMBLER_NAME)" == ""\r
267ASM16 = $(MASMPATH)\bin\ml\r
268ASMLINK16 = $(MASMPATH)\binr\link\r
269ASMLINK = $(MASMPATH)\binr\link\r
270!ELSE\r
271ASM16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\bin\ml\r
272ASMLINK16 = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link\r
273ASMLINK = $(EDK_TOOLS_BIN)\Ia32\$(EFI_ASSEMBLER_NAME)\binr\link\r
274!ENDIF\r
275\r
276BSCMAKE = bscmake\r
277\r
278!IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"\r
279ASM_ARCH_FLAGS = $(ASM_ARCH_FLAGS) /Zi /DDEBUG\r
280C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(DEST_DIR)\$(BASE_NAME)Obj\r
281LINK_STD_FLAGS = $(LINK_STD_FLAGS) /DEBUG\r
282!ENDIF\r
283\r
284# END OF TOOLCHAIN_X64\r
285###############################################################################\r
286\r
287###############################################################################\r
288#\r
289# Specify the path and macros for the IPF tools\r
290#\r
291###############################################################################\r
292\r
293!ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_IPF"\r
294\r
295#\r
296# Globally relevant flags. Options not appropriate for all builds may be \r
297# appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or\r
298# in the platform specific macros (xxx_PROJ_FLAGS)\r
299#\r
300C_STD_INCLUDE = /X\r
565cfeea 301\r
3eb9473e 302!IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"\r
565cfeea 303\r
3eb9473e 304!IF "$(USE_VC8_IPF)" == "YES"\r
565cfeea 305C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
3eb9473e 306!ELSE\r
307!IF "$(USE_NEWDDK)" == "YES"\r
565cfeea 308C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
3eb9473e 309!ELSE\r
565cfeea 310C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
3eb9473e 311!ENDIF\r
312!ENDIF\r
565cfeea 313\r
3eb9473e 314!ELSE\r
565cfeea 315\r
3eb9473e 316!IF "$(USE_VC8_IPF)" == "YES"\r
565cfeea 317C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fo$@ $(INC)\r
3eb9473e 318!ELSE\r
319!IF "$(USE_NEWDDK)" == "YES"\r
565cfeea 320C_STD_FLAGS = /nologo /W4 /WX /EHs-c- /GR- /Gy /GS- /c /Fo$@ $(INC)\r
3eb9473e 321!ELSE\r
565cfeea 322C_STD_FLAGS = /nologo /W4 /WX /GX- /GR- /Gy /c /Fo$@ $(INC)\r
3eb9473e 323!ENDIF\r
324!ENDIF\r
565cfeea 325\r
3eb9473e 326!ENDIF\r
327\r
328ASM_STD_FLAGS = $(INC) \r
329LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF /BASE:0 /IGNORE:4001,4078,4086,4096,4108\r
330LIB_STD_FLAGS = /nologo \r
331\r
332#\r
333# Build type specific flags. Globally relevant flags belong in the standard \r
334# macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the\r
335# PlatformTools.env file in macros named xxx_PROJ_FLAGS.\r
336#\r
337C_ARCH_FLAGS = /D EFI64\r
338ASM_ARCH_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -o $@\r
339LINK_ARCH_FLAGS = /MACHINE:IA64\r
340LIB_ARCH_FLAGS =\r
341\r
342#\r
343# This is used for preprocessing IPF Assembly files\r
344#\r
345C_FLAGS_PRO = /nologo /EP /C $(C_STD_FLAGS) $(C_ARCH_FLAGS) $(C_PROJ_FLAGS) $(C_STD_INCLUDE)\r
346\r
347!IF "$(EFI_DEBUG)" == "YES"\r
348ASM_ARCH_FLAGS = $(ASM_ARCH_FLAGS) -d debug\r
349!ENDIF\r
350\r
351#\r
352# Build tools\r
353#\r
354!IF "$(EFI_COMPILER_NAME)" == ""\r
355!IF "$(USE_VC8_IPF)" == "YES"\r
356CC = "$(VC8_IPF_PATH)\cl"\r
357LINK = "$(VC8_IPF_PATH)\link"\r
358LIB = "$(VC8_IPF_PATH)\lib"\r
359!ELSE\r
360CC = $(EFI_IA64TOOLPATH)\cl\r
361LINK = $(EFI_IA64TOOLPATH)\link\r
362LIB = $(EFI_IA64TOOLPATH)\lib\r
363!ENDIF\r
364!ELSE\r
365CC = $(EDK_TOOLS_BIN)\Ipf\$(EFI_COMPILER_NAME)\cl\r
366LINK = $(EDK_TOOLS_BIN)\Ipf\$(EFI_COMPILER_NAME)\link\r
367LIB = $(EDK_TOOLS_BIN)\Ipf\$(EFI_COMPILER_NAME)\lib\r
368!ENDIF\r
369\r
370!IF "$(EFI_ASSEMBLER_NAME)" == ""\r
371!IF "$(USE_VC8_IPF)" == "YES"\r
372ASM = "$(VC8_IPF_PATH)\ias"\r
373ASMLINK = "$(VC8_IPF_PATH)\link"\r
374!ELSE\r
375ASM = $(EFI_IA64ASMPATH)\ias\r
376ASMLINK = $(EFI_IA64ASMPATH)\link\r
377!ENDIF\r
378!ELSE\r
379ASM = $(EDK_TOOLS_BIN)\Ipf\$(EFI_ASSEMBLER_NAME)\ias\r
380ASMLINK = $(EDK_TOOLS_BIN)\Ipf\$(EFI_ASSEMBLER_NAME)\link\r
381!ENDIF\r
382\r
383BSCMAKE = bscmake\r
384\r
385!IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"\r
386C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(DEST_DIR)\$(BASE_NAME)Obj\r
387LINK_STD_FLAGS = $(LINK_STD_FLAGS) /DEBUG\r
388!ENDIF\r
389\r
390# END TOOLCHAIN_IPF\r
391###############################################################################\r
392\r
393###############################################################################\r
394#\r
395# Define toolchain for building the EFI tools on an IA32 system.\r
396#\r
397###############################################################################\r
398\r
399!ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_MSVC"\r
400\r
401#\r
402# Globally relevant flags. Options not appropriate for all builds may be \r
403# appropriate in the processor architecture specific macros (xxx_ARCH_FLAGS) or\r
404# in the platform specific macros (xxx_PROJ_FLAGS)\r
405#\r
406!IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"\r
565cfeea 407\r
3eb9473e 408!IF "$(USE_VC8)" == "YES"\r
409C_STD_FLAGS = /nologo /W4 /WX /EHsc /Gy /D _CRT_SECURE_NO_DEPRECATE /D USE_VC8 /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
410!ELSE\r
411C_STD_FLAGS = /nologo /W4 /WX /GX /Gy /c /Fa$* /FAsc /Fo$@ /FR$(@R).SBR $(INC)\r
412!ENDIF\r
565cfeea 413ASM_STD_FLAGS = /nologo /Fl$*.lst $(INC)\r
414\r
3eb9473e 415!ELSE\r
565cfeea 416\r
3eb9473e 417!IF "$(USE_VC8)" == "YES"\r
418C_STD_FLAGS = /nologo /W4 /WX /EHsc /Gy /D _CRT_SECURE_NO_DEPRECATE /D USE_VC8 /c /Fo$@ $(INC)\r
419!ELSE\r
420C_STD_FLAGS = /nologo /W4 /WX /GX /Gy /c /Fo$@ $(INC)\r
421!ENDIF\r
3eb9473e 422ASM_STD_FLAGS = /nologo $(INC)\r
565cfeea 423\r
424!ENDIF\r
425\r
3eb9473e 426LINK_STD_FLAGS = /nologo /SUBSYSTEM:CONSOLE /NODEFAULTLIB /MAP /OPT:REF\r
427LIB_STD_FLAGS = /nologo \r
428\r
429MSVS_LINK_LIBPATHS = \r
430\r
431#\r
432# Build type specific flags. Globally relevant flags belong in the standard \r
433# macros, xxx_STD_FLAGS defined above. Platform specific macros belong in the\r
434# PlatformTools.env file in macros named xxx_PROJ_FLAGS.\r
435#\r
436\r
437#\r
438# Add a define to skip inclusion of Microsoft include file rpcasync.h, which\r
439# results in a compile warning at W4.\r
440#\r
441C_ARCH_FLAGS = /Od /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D __RPCASYNC_H__ \r
442ASM_ARCH_FLAGS =\r
443LINK_ARCH_FLAGS = /MACHINE:i386\r
444LIB_ARCH_FLAGS =\r
445\r
446#\r
447# Always turn on debug for the build tools so that we can debug problems \r
448# quickly.\r
449# NOTE: Ideally all the tools makefiles should be updated to use LINK_FLAGS_EXE\r
450# instead of L_FLAGS for linking. When this happens we can get rid of\r
451# the L_FLAGS definition here.\r
452#\r
453\r
454#!IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"\r
455C_STD_FLAGS = $(C_STD_FLAGS) /Zi /Gm /Fd$(EDK_TOOLS_OUTPUT)\$(TARGET_NAME)Obj\r
456LINK_ARCH_FLAGS = $(LINK_ARCH_FLAGS) /DEBUG\r
457L_FLAGS = $(L_FLAGS) /DEBUG\r
458#!ENDIF\r
459\r
460#\r
461# Clear any project flags when building tools\r
462#\r
463C_PROJ_FLAGS =\r
464ASM_PROJ_FLAGS =\r
465LINK_PROJ_FLAGS =\r
466LIB_PROJ_FLAGS =\r
467EBC_C_PROJ_FLAGS =\r
468EBC_LINK_PROJ_FLAGS =\r
469EBC_LIB_PROJ_FLAGS =\r
470\r
471#\r
472# Build tools\r
473#\r
474CC = cl\r
475LINK = link\r
476BSCMAKE = bscmake\r
477ASM = ml\r
478ASMLINK = link\r
479#\r
480# Use a different macro name for tools build to avoid conflict with environment\r
481# variable LIB\r
482#\r
483LIB_EXE = lib\r
484\r
485INC = -I $(EDK_SOURCE)\Foundation \\r
486 -I $(EDK_SOURCE)\Foundation\Efi \\r
487 -I $(EDK_SOURCE)\Foundation\Framework \\r
488 -I $(EDK_SOURCE)\Sample\Platform\Nt32 \\r
489 -I $(EDK_SOURCE)\Foundation\Core\Dxe \\r
490 -I $(EDK_SOURCE)\Foundation\Include \\r
491 -I $(EDK_SOURCE)\Foundation\Efi\Include \\r
492 -I $(EDK_SOURCE)\Foundation\Framework\Include \\r
493 -I $(EDK_SOURCE)\Foundation\Include\IndustryStandard \\r
494 -I $(EDK_SOURCE)\Foundation\Include\Ia32 \\r
495 -I $(EDK_SOURCE)\Foundation\Include\Pei \\r
496 -I $(EDK_SOURCE)\Foundation\Library\Pei\Include \\r
497 -I $(EDK_SOURCE)\Sample\Include \\r
498 -I "$(EDK_TOOLS_COMMON)"\r
499\r
500# END TOOLCHAIN_MSVC\r
501###############################################################################\r
502\r
503###############################################################################\r
504#\r
505# Specify the path and macros for the EBC tools\r
506#\r
507###############################################################################\r
508\r
509!ELSEIF "$(TOOLCHAIN)" == "TOOLCHAIN_EBC"\r
510\r
511!IF "$(EFI_GENERATE_INTERMEDIATE_FILE)" == "YES"\r
512EBC_C_STD_FLAGS = /nologo /W3 /WX /c /Fa$* /FAsc /Fo$@ $(INC) /X\r
513!ELSE\r
514EBC_C_STD_FLAGS = /nologo /W3 /WX /c /Fo$@ $(INC) /X\r
515!ENDIF\r
516\r
517#\r
518# All EBC entry point functions must be called EfiMain. Redefine it.\r
519#\r
520!IF "$(IMAGE_ENTRY_POINT)" == ""\r
521IMAGE_ENTRY_POINT = EfiMain\r
522!ENDIF\r
523EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /D $(IMAGE_ENTRY_POINT)=EfiMain\r
524EBC_LINK_STD_FLAGS = /nologo /MACHINE:EBC /BASE:0 /OPT:REF /NODEFAULTLIB\r
525EBC_LIB_STD_FLAGS = /nologo /MACHINE:EBC \r
526\r
527#\r
528# EBC tools path should be defined in LocalTools.env.\r
529#\r
530EBC_CC = $(EBC_TOOLS_PATH)\Bin\Iec\r
531EBC_LINK = $(EBC_TOOLS_PATH)\Bin\Link\r
532EBC_LIB = $(EBC_TOOLS_PATH)\Bin\Link /lib\r
533\r
534!IF "$(EFI_SYMBOLIC_DEBUG)" == "YES"\r
535EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) /Zd /Zi\r
536EBC_LINK_STD_FLAGS = $(EBC_LINK_STD_FLAGS) /DEBUG\r
537!ENDIF\r
538\r
539# END TOOLCHAIN_EBC\r
540\r
541###############################################################################\r
542#\r
543# Let the caller define a NULL toolchain if they don't care. This way you can\r
544# pick up at least some defines.\r
545#\r
546###############################################################################\r
547\r
548!ELSEIF "$(TOOLCHAIN)" == ""\r
549\r
550###############################################################################\r
551#\r
552# You get this if the calling makefile did not define TOOLCHAIN_xxx before\r
553# including this file.\r
554#\r
555###############################################################################\r
556\r
557!ELSE\r
558!ERROR Unknown toolchain $(TOOLCHAIN) defined for $(EDK_SOURCE)\Sample\CommonTools.env use\r
559!ENDIF\r
560\r
561\r
562###############################################################################\r
563#\r
564# These are standard settings for all tool chains\r
565#\r
566###############################################################################\r
567\r
568#\r
569# These are standard build options\r
570#\r
571VERSION_FLAGS = /D EFI_SPECIFICATION_VERSION=$(EFI_SPECIFICATION_VERSION) \\r
572 /D PI_SPECIFICATION_VERSION=$(PI_SPECIFICATION_VERSION) \\r
573 /D TIANO_RELEASE_VERSION=$(TIANO_RELEASE_VERSION)\r
574C_STD_FLAGS = $(C_STD_FLAGS) $(VERSION_FLAGS)\r
575EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) $(VERSION_FLAGS)\r
565cfeea 576C_FLAGS_ASL = $(C_FLAGS_ASL) $(VERSION_FLAGS)\r
3eb9473e 577VFRCOMPILE_FLAGS = $(VFRCOMPILE_FLAGS) -ppflag "$(VERSION_FLAGS)"\r
565cfeea 578!IF "$(TOOLCHAIN)" != "TOOLCHAIN_IPF"\r
579ASM_STD_FLAGS = $(ASM_STD_FLAGS) $(VERSION_FLAGS)\r
580!ENDIF\r
3eb9473e 581\r
582!IF "$(EFI_DEBUG)" == "YES"\r
565cfeea 583FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_DEBUG\r
3eb9473e 584!ENDIF\r
585\r
586!IF "$(EFI_DEBUG_CLEAR_MEMORY)" == "YES"\r
565cfeea 587FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_DEBUG_CLEAR_MEMORY\r
3eb9473e 588!ENDIF\r
589\r
590!IF "$(EFI_PEI_PERFORMANCE)" == "YES"\r
565cfeea 591FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_PEI_PERFORMANCE /D EFI_DXE_PERFORMANCE\r
3eb9473e 592!ENDIF\r
593\r
594!IF "$(EFI_ADDTIONAL_DRIVERS)" == "YES"\r
565cfeea 595FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_ADDTIONAL_DRIVERS\r
3eb9473e 596!ENDIF\r
597\r
598!IF "$(EFI_USE_CUSTOM_COMPRESS)" == "YES"\r
565cfeea 599FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_USE_CUSTOM_COMPRESS\r
3eb9473e 600!ENDIF\r
601\r
602!IF "$(EFI_UNLOCK_FWH)" == "YES"\r
565cfeea 603FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_UNLOCK_FWH\r
3eb9473e 604!ENDIF\r
605\r
606!IF "$(EFI_DXE_PERFORMANCE)" == "YES"\r
565cfeea 607FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_DXE_PERFORMANCE\r
3eb9473e 608!ENDIF\r
609\r
565cfeea 610!IF "$(EFI_S3_RESUME)" == "YES"\r
611FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_S3_RESUME\r
3eb9473e 612!ENDIF\r
613\r
565cfeea 614!IF "$(EFI_SIZE_REDUCTION_APPLIED)" == "YES"\r
615FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_SIZE_REDUCTION_APPLIED\r
3eb9473e 616!ENDIF\r
617\r
618!IF "$(EFI_PEI_REPORT_STATUS_CODE)" == "YES"\r
565cfeea 619FEATURE_FLAGS = $(FEATURE_FLAGS) /D EFI_PEI_REPORT_STATUS_CODE_ON\r
3eb9473e 620!ENDIF\r
621\r
565cfeea 622!IF "$(SIZE_REDUCTION_ISA_COMBINED)" == "YES"\r
623FEATURE_FLAGS = $(FEATURE_FLAGS) /D SIZE_REDUCTION_ISA_COMBINED\r
624!ENDIF\r
625\r
626C_STD_FLAGS = $(C_STD_FLAGS) $(FEATURE_FLAGS)\r
627EBC_C_STD_FLAGS = $(EBC_C_STD_FLAGS) $(FEATURE_FLAGS)\r
628C_FLAGS_ASL = $(C_FLAGS_ASL) $(FEATURE_FLAGS)\r
629VFRCOMPILE_FLAGS = $(VFRCOMPILE_FLAGS) -ppflag "$(FEATURE_FLAGS)"\r
630!IF "$(TOOLCHAIN)" != "TOOLCHAIN_IPF"\r
631ASM_STD_FLAGS = $(ASM_STD_FLAGS) $(FEATURE_FLAGS)\r
632!ENDIF\r
633\r
634#\r
635# This is used for preprocessing dependency files\r
636#\r
637C_FLAGS_DPX = /nologo /EP $(INC) $(VERSION_FLAGS) $(FEATURE_FLAGS)\r
638\r
3eb9473e 639###############################################################################\r
640\r
641###############################################################################\r
642#\r
643# Collect final build flags for components. These flags are used to build\r
644# any standard component and some non-standard components.\r
645#\r
646###############################################################################\r
647C_FLAGS = $(C_STD_FLAGS) $(C_ARCH_FLAGS) $(C_PROJ_FLAGS) $(C_STD_INCLUDE)\r
648ASM_FLAGS = $(ASM_STD_FLAGS) $(ASM_ARCH_FLAGS) $(ASM_PROJ_FLAGS)\r
649LINK_FLAGS_DLL = $(LINK_STD_FLAGS) $(LINK_ARCH_FLAGS) $(LINK_PROJ_FLAGS) /DLL \r
650LINK_FLAGS_EXE = $(LINK_STD_FLAGS) $(LINK_ARCH_FLAGS) $(LINK_PROJ_FLAGS) \r
651LIB_FLAGS = $(LIB_STD_FLAGS) $(LIB_ARCH_FLAGS) $(LIB_PROJ_FLAGS)\r
652EBC_C_FLAGS = $(EBC_C_STD_FLAGS) $(EBC_C_ARCH_FLAGS) $(EBC_C_PROJ_FLAGS)\r
653EBC_LINK_FLAGS = $(EBC_LINK_STD_FLAGS) $(EBC_LINK_ARCH_FLAGS) $(EBC_LINK_PROJ_FLAGS)\r
654EBC_LIB_FLAGS = $(EBC_LIB_STD_FLAGS) $(EBC_LIB_ARCH_FLAGS) $(EBC_LIB_PROJ_FLAGS)\r
655\r
656###############################################################################\r
657#\r
658# define X64 denpendant driver files\r
659#\r
660###############################################################################\r
661!IF "$(EFI_BUILD_TARGET_X64)" == "YES"\r
662BUILD_TARGET_PROCESSOR = X64\r
663DXE_IPL = DxeIplX64\r
664!ELSE\r
665BUILD_TARGET_PROCESSOR = IA32\r
666DXE_IPL = DxeIpl\r
667!ENDIF \r
668###############################################################################\r
669#\r
670# define EFI specification denpendant driver files\r
671#\r
672###############################################################################\r
673!IF "$(UEFI_MODE)" == "YES"\r
674UEFI_PREFIX = Uefi\r
675ATAPI_PASS_THRU_INF = Sample\Bus\Pci\AtapiExtPassThru\Dxe\AtapiExtPassThru.inf\r
676!IF "$(CAPSULE_INF)" == ""\r
677CAPSULE_INF = Sample\Universal\Capsule\RuntimeDxe\Capsule.inf \r
678!ENDIF\r
679DEVPATH_INF = Sample\Universal\DevicePath\Dxe\DevicePath.inf\r
680!ELSE\r
681UEFI_PREFIX =\r
682CAPSULE_INF =\r
683DEVPATH_INF =\r
684ATAPI_PASS_THRU_INF = Sample\Bus\Pci\AtapiPassThru\Dxe\AtapiPassThru.inf\r
685!ENDIF\r
686###############################################################################\r
687#\r
688# define PIWG specification denpendant driver files\r
689#\r
690###############################################################################\r
691!IF "$(PI_MODE)" == "YES"\r
692PI_PREFIX = Pi\r
693!ELSE\r
694PI_PREFIX =\r
695!ENDIF\r
696###############################################################################\r
697#\r
698# define customized compress makefile\r
699#\r
700###############################################################################\r
701CUSTOMIZEDCOMPRESS_MAKEFILE = $(EDK_TOOLS_SOURCE)\CustomizedCompress\Makefile \r
702COMPRESS_METHOD = Dummy \r
703############################################################################### \r
704# \r
705# define EFI_BINARY default path\r
706# \r
707############################################################################### \r
708!IFNDEF EFI_BINARY\r
565cfeea 709EFI_BINARY=$(EDK_SOURCE)\Bin\r
3eb9473e 710!ENDIF\r
711\r
712EFI_PLATFORM_BIN=$(EFI_BINARY)\$(PROJECT_NAME)$(BUILD_TARGET_DIRECTORY)\r