[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 2/6] plat: Add -DxxxPLAT define for each platform



This allows common code to distinguish for which platform it is
currently being built.

Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
---
 plat/kvm/Makefile.uk    | 3 +++
 plat/linuxu/Makefile.uk | 3 +++
 plat/xen/Makefile.uk    | 6 +++---
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/plat/kvm/Makefile.uk b/plat/kvm/Makefile.uk
index cc5bcdd..b4d105f 100644
--- a/plat/kvm/Makefile.uk
+++ b/plat/kvm/Makefile.uk
@@ -18,6 +18,9 @@ LIBKVMPLAT_ASINCLUDES-y        += 
-I$(UK_PLAT_COMMON_BASE)/include
 LIBKVMPLAT_CINCLUDES-y         += -I$(LIBKVMPLAT_BASE)/include
 LIBKVMPLAT_CINCLUDES-y         += -I$(UK_PLAT_COMMON_BASE)/include
 
+LIBKVMPLAT_ASFLAGS             += -DKVMPLAT
+LIBKVMPLAT_CFLAGS              += -DKVMPLAT
+
 ##
 ## Architecture library definitions for x86_64
 ##
diff --git a/plat/linuxu/Makefile.uk b/plat/linuxu/Makefile.uk
index f466d8a..3c59de4 100644
--- a/plat/linuxu/Makefile.uk
+++ b/plat/linuxu/Makefile.uk
@@ -16,6 +16,9 @@ LIBLINUXUPLAT_ASINCLUDES-y        += 
-I$(UK_PLAT_COMMON_BASE)/include
 LIBLINUXUPLAT_CINCLUDES-y         += -I$(LIBLINUXUPLAT_BASE)/include
 LIBLINUXUPLAT_CINCLUDES-y         += -I$(UK_PLAT_COMMON_BASE)/include
 
+LIBLINUXUPLAT_ASFLAGS             += -DLINUXUPLAT
+LIBLINUXUPLAT_CFLAGS              += -DLINUXUPLAT
+
 LIBLINUXUPLAT_SRCS-$(CONFIG_ARCH_X86_32) += $(LIBLINUXUPLAT_BASE)/x86/entry32.S
 LIBLINUXUPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBLINUXUPLAT_BASE)/x86/entry64.S
 LIBLINUXUPLAT_SRCS-$(CONFIG_ARCH_ARM_32) += $(LIBLINUXUPLAT_BASE)/arm/entry32.S
diff --git a/plat/xen/Makefile.uk b/plat/xen/Makefile.uk
index 7e8f114..43866e4 100644
--- a/plat/xen/Makefile.uk
+++ b/plat/xen/Makefile.uk
@@ -14,9 +14,9 @@ $(eval $(call 
addplatlib_s,xen,libxenbus,$(CONFIG_XEN_XENBUS)))
 ##
 ## Xen platform compilation settings
 ##
-LIBXENPLAT_ASFLAGS-y     += 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
-LIBXENPLAT_CFLAGS-y      += 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
-LIBXENPLAT_CXXFLAGS-y    += 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+LIBXENPLAT_ASFLAGS-y     += -DXENPLAT 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+LIBXENPLAT_CFLAGS-y      += -DXENPLAT 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+LIBXENPLAT_CXXFLAGS-y    += -DXENPLAT 
-D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
 
 ##
 ## Platform library definitions
-- 
2.19.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.