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