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

[Xen-changelog] [mini-os master] mini-os: support "make config" for out-of-tree users



commit 0f6582dd71454dffba4bbb21258fea25becfdd00
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Aug 30 13:51:23 2016 +0200
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Sep 2 09:24:59 2016 +0100

    mini-os: support "make config" for out-of-tree users
    
    Mini-OS applications being compiled using Mini-OS headers without
    being integrated in the make environment of Mini-OS need a way to set
    CONFIG_* defines according to their Mini-OS configuration.
    
    Add a new make target "config" for that purpose creating a Makefile
    snipplet $(CONFIG_FILE) (defaults to ./minios-config.mk) containing
    the needed information.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 .gitignore | 1 +
 Config.mk  | 4 +++-
 Makefile   | 5 +++++
 minios.mk  | 1 -
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index e55133d..d57c2bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ arch/x86/minios-x86*.lds
 include/list.h
 mini-os
 mini-os.gz
+minios-config.mk
diff --git a/Config.mk b/Config.mk
index aa36761..0e405bf 100644
--- a/Config.mk
+++ b/Config.mk
@@ -51,7 +51,7 @@ endif
 
 libc = $(stubdom)
 
-XEN_INTERFACE_VERSION := 0x00030205
+XEN_INTERFACE_VERSION ?= 0x00030205
 export XEN_INTERFACE_VERSION
 
 # Try to find out the architecture family TARGET_ARCH_FAM.
@@ -193,6 +193,8 @@ DEFINES-$(CONFIG_CONSFRONT) += -DCONFIG_CONSFRONT
 DEFINES-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
 DEFINES-$(CONFIG_BALLOON) += -DCONFIG_BALLOON
 
+DEFINES-y += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
+
 # Override settings for this OS
 PTHREAD_LIBS =
 nosharedlibs=y
diff --git a/Makefile b/Makefile
index 43dcbd6..8e8e56e 100644
--- a/Makefile
+++ b/Makefile
@@ -158,6 +158,11 @@ $(OBJ_DIR)/$(TARGET): $(OBJS) $(APP_O) arch_lib 
$(TARGET_ARCH_DIR)/minios-$(MINI
        $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
        gzip -f -9 -c $@ >$@.gz
 
+.PHONY: config
+CONFIG_FILE ?= $(CURDIR)/minios-config.mk
+config:
+       echo "$(DEFINES-y)" >$(CONFIG_FILE)
+
 .PHONY: clean arch_clean
 
 arch_clean:
diff --git a/minios.mk b/minios.mk
index 9ff6bf7..ef4d2f9 100644
--- a/minios.mk
+++ b/minios.mk
@@ -10,7 +10,6 @@ DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls 
-Wno-format -Wno-redu
 DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
 DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
 DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
-DEF_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
 
 DEF_ASFLAGS += -D__ASSEMBLY__
 DEF_LDFLAGS +=
--
generated by git-patchbot for /home/xen/git/mini-os.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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