[edk2-devel] [PATCH v3 01/10] BaseTools: add BASETOOLS define

Gerd Hoffmann posted 10 patches 2 years, 10 months ago
There is a newer version of this series
[edk2-devel] [PATCH v3 01/10] BaseTools: add BASETOOLS define
Posted by Gerd Hoffmann 2 years, 10 months ago
Allows for BaseTools-specific tweaks in include files.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 BaseTools/Source/C/Makefiles/header.makefile | 3 +++
 BaseTools/Source/C/Makefiles/ms.common       | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
index 1bf003523baf..6b743fa297b0 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -124,6 +124,9 @@ ifeq ($(DARWIN),Darwin)
 endif
 endif
 
+CFLAGS   += -D BASETOOLS=1
+CXXFLAGS += -D BASETOOLS=1
+
 # keep BUILD_OPTFLAGS last
 CFLAGS   += $(BUILD_OPTFLAGS)
 CXXFLAGS += $(BUILD_OPTFLAGS)
diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common
index 8391f10d5dd2..6fc4c6477847 100644
--- a/BaseTools/Source/C/Makefiles/ms.common
+++ b/BaseTools/Source/C/Makefiles/ms.common
@@ -57,5 +57,5 @@ LINKER = $(LD)
 
 INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common
 
-CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
-CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
+CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D BASETOOLS
+CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D BASETOOLS
-- 
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#102932): https://edk2.groups.io/g/devel/message/102932
Mute This Topic: https://groups.io/mt/98236904/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-