2.4 [Defines] Section
This is a required section.
The [Defines]
section of EDK II INF files is used to define variable assignments that can be used in later build steps. The INF_VERSION of existing INF files does not need to be updated unless content in the file has been updated to match new content specified by this revision of the specification.
Architectural modifiers are not permitted in the [Defines] section.
The parsing utilities process any local symbol assignments defined in this section. The
EDK II parsing utilities will use some of this section's information for generating AutoGen.c
and AutoGen.h
files. Note that the sections are processed in the order listed in the INF file, and later assignments of these local symbols override previous assignments.
[Defines]
The format for entries in this section is:
Name = Value
The following is an example of a driver's [Defines]
section.
The following is an example of a library's [Defines]
section.
Drivers may expose library functionality, such as a DXE_CORE
module that may implement functions that satisfy the BaseMemoryAllocation library class. In this instance, the driver module would also specify the LIBRARY_CLASS
in the [Defines]
section. Other DXE drivers that would require a library instance for the BaseMemoryAllocation
class could specify the DXE_CORE
INF file as the recommended instance for satisfying the required library class instance.
Appendix F lists the available MODULE_TYPE
values supported by EDK II INF files.
The EDK II [Defines]
section is common to all architectures and does not permit using architectural modifiers in the section tag name.
The following table shows EDK II unique elements of a defines section that may be required for generating the AutoGen.c
and AutoGen.h
files. Library modules must never specify driver elements.
Note: Any lines not starting with one of the tag names defined in the table below are added to the top of the INF's generated makefile exactly as typed on the line in the INF file.
Note: COMBINED_PEIM_DRIVER
is a driver that may be dispatched by either the PEI Core or the Dxe Core. EDK II only references the first possible dispatch instance.
Table 1 EDK II [Defines] Section Elements
Last updated