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