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

[Minios-devel] [UNIKRAFT PATCH] build: Make a platform configurable



In our build system, default platform libraries are included even while
the platform is disabled. This patch ensures that the platforms are built
only when the corresponding CONFIG is enabled.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
 plat/Linker.uk               | 4 +---
 support/build/Makefile.rules | 8 +++++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/plat/Linker.uk b/plat/Linker.uk
index 3e33bcc..f80c7ae 100644
--- a/plat/Linker.uk
+++ b/plat/Linker.uk
@@ -1,3 +1 @@
-include $(UK_PLAT_XEN_BASE)/Linker.uk
-include $(UK_PLAT_KVM_BASE)/Linker.uk
-include $(UK_PLAT_LINUXU_BASE)/Linker.uk
+$(foreach plat,$(UK_PLATS),$(eval $(call _import_linker,$(plat))))
diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 926a533..809def0 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -123,6 +123,10 @@ _IMPORT_BASE := $(1)
 include $(1)/Makefile.uk
 undefine _IMPORT_BASE
 endef
+# _import_linker $plat_name
+define _import_linker =
+ include $(UK_PLAT_$(call uc,$(1))_BASE)/Linker.uk
+endef
 
 # Register a platform to the build system
 define addplat =
@@ -132,9 +136,7 @@ endef
 
 # addplat_s $platname,$switch
 define addplat_s =
-ifeq ($(2),y)
-$(call addplat,$(1))
-endif
+$(if $(filter y,$(2)),$(call addplat,$(1)),)
 endef
 
 
-- 
2.7.4


_______________________________________________
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®.