From: Juergen Gross <jgross@suse.com>
To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
samuel.thibault@ens-lyon.org, wei.liu2@citrix.com
Subject: [PATCH 3/3] mini-os: support "make config" for out-of-tree users
Date: Tue, 30 Aug 2016 13:51:23 +0200 [thread overview]
Message-ID: <1472557883-21300-4-git-send-email-jgross@suse.com> (raw)
In-Reply-To: <1472557883-21300-1-git-send-email-jgross@suse.com>
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@suse.com>
---
.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 +=
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-30 11:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 11:51 [PATCH 0/3] repair stubdoms Juergen Gross
2016-08-30 11:51 ` [PATCH 1/3] mini-os: support newer xen interface Juergen Gross
2016-08-30 13:53 ` Wei Liu
2016-08-30 21:30 ` Samuel Thibault
2016-08-30 11:51 ` [PATCH 2/3] mini-os: provide irq on/off/save/restore functions for Mini-OS apps Juergen Gross
2016-08-30 13:54 ` [Minios-devel] " Wei Liu
2016-08-30 14:08 ` Juergen Gross
2016-08-30 21:34 ` Samuel Thibault
2016-08-30 11:51 ` Juergen Gross [this message]
2016-08-30 13:57 ` [Minios-devel] [PATCH 3/3] mini-os: support "make config" for out-of-tree users Wei Liu
2016-09-02 1:22 ` Samuel Thibault
2016-08-30 21:38 ` Samuel Thibault
2016-09-01 6:21 ` Juergen Gross
2016-09-02 1:21 ` Samuel Thibault
2016-09-02 5:42 ` Juergen Gross
2016-09-02 7:02 ` Samuel Thibault
2016-09-02 8:26 ` [Minios-devel] [PATCH 0/3] repair stubdoms Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472557883-21300-4-git-send-email-jgross@suse.com \
--to=jgross@suse.com \
--cc=minios-devel@lists.xenproject.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).