mirror of
https://github.com/utmapp/edk2.git
synced 2026-12-01 14:00:40 -10:00
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389 Add subhook submodule that is required to hook internal functions when using gmock. https://github.com/Zeex/subhook Add SubhookLib library class and SubhookLib library instance. Include the SUBHOOK_STATIC define in the SubhookLib INF file so it builds as a static library. Also include the SUBHOOK_STATIC define in SubhookLib.h so all modules using SubhookLib properly link SubhookLib as a static library. Cc: Andrew Fish <[email protected]> Cc: Leif Lindholm <[email protected]> Cc: Michael D Kinney <[email protected]> Cc: Michael Kubacki <[email protected]> Cc: Sean Brogan <[email protected]> Signed-off-by: Chris Johnson <[email protected]> Reviewed-by: Leif Lindholm <[email protected]> Reviewed-by: Michael Kubacki <[email protected]> Reviewed-by: Oliver Smith-Denny <[email protected]> Reviewed-by: Michael D Kinney <[email protected]>
32 lines
776 B
INI
32 lines
776 B
INI
## @file
|
|
# This module provides Subhook Library implementation.
|
|
#
|
|
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010018
|
|
BASE_NAME = SubhookLib
|
|
MODULE_UNI_FILE = SubhookLib.uni
|
|
FILE_GUID = 70E03378-E140-46A8-8E65-7719DA14A240
|
|
MODULE_TYPE = HOST_APPLICATION
|
|
VERSION_STRING = 0.1
|
|
LIBRARY_CLASS = SubhookLib
|
|
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64
|
|
#
|
|
|
|
[Sources]
|
|
subhook/subhook.c
|
|
|
|
[Packages]
|
|
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
|
|
|
|
[BuildOptions]
|
|
MSFT:*_*_*_CC_FLAGS == /c /EHsc /Zi /DSUBHOOK_STATIC /Od
|
|
GCC:*_*_IA32_CC_FLAGS == -g -c -O0 -m32
|
|
GCC:*_*_X64_CC_FLAGS == -g -c -O0 -m64
|