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