From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH 4/4] Introduce global .config to selectively enable compile features
Date: Mon, 11 May 2009 09:26:49 -0500 [thread overview]
Message-ID: <1242052009-27339-5-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1242052009-27339-1-git-send-email-aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/Makefile b/Makefile
index 24b8c0d..845c965 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,16 @@ ifdef CONFIG_WIN32
LIBS+=-lwinmm -lws2_32 -liphlpapi
endif
-all: $(TOOLS) $(DOCS) recurse-all
+ifdef CONFIG_WIN32
+DEFCONFIG=$(SRC_PATH)/configs/win32/defconfig
+else
+DEFCONFIG=$(SRC_PATH)/configs/unix/defconfig
+endif
+
+all: .config $(TOOLS) $(DOCS) recurse-all
+
+.config: $(DEFCONFIG)
+ $(call quiet-command,cp $< $@,)
config-host.mak: configure
ifneq ($(wildcard config-host.mak),)
@@ -60,22 +69,22 @@ $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
recurse-all: $(SUBDIR_RULES)
+-include .config
+
#######################################################################
# BLOCK_OBJS is code used by both qemu system emulation and qemu-img
-BLOCK_OBJS=cutils.o cache-utils.o qemu-malloc.o module.o
-BLOCK_OBJS+=block/cow.o block/qcow.o aes.o block/vmdk.o block/cloop.o
-BLOCK_OBJS+=block/dmg.o block/bochs.o block/vpc.o block/vvfat.o
-BLOCK_OBJS+=block/qcow2.o block/parallels.o block/nbd.o
-BLOCK_OBJS+=nbd.o block.o aio.o
+BLOCK_OBJS=cutils.o cache-utils.o qemu-malloc.o module.o aes.o nbd.o block.o
+BLOCK_OBJS+=aio.o
-ifdef CONFIG_WIN32
-BLOCK_OBJS += block/raw-win32.o
-else
+obj-y=
+include $(SRC_PATH)/block/Makefile
+BLOCK_OBJS+=$(addprefix block/, $(obj-y))
+
+ifndef CONFIG_WIN32
ifdef CONFIG_AIO
BLOCK_OBJS += posix-aio-compat.o
endif
-BLOCK_OBJS += block/raw-posix.o
endif
######################################################################
diff --git a/block/Makefile b/block/Makefile
new file mode 100644
index 0000000..f33c81d
--- /dev/null
+++ b/block/Makefile
@@ -0,0 +1,13 @@
+obj-$(CONFIG_BDRV_RAW_POSIX) += raw-posix.o
+obj-$(CONFIG_BDRV_RAW_WIN32) += raw-win32.o
+obj-$(CONFIG_BDRV_BOCHS) += bochs.o
+obj-$(CONFIG_BDRV_CLOOP) += cloop.o
+obj-$(CONFIG_BDRV_COW) += cow.o
+obj-$(CONFIG_BDRV_DMG) += dmg.o
+obj-$(CONFIG_BDRV_NBD) += nbd.o
+obj-$(CONFIG_BDRV_PARALLELS) += parallels.o
+obj-$(CONFIG_BDRV_QCOW2) += qcow2.o
+obj-$(CONFIG_BDRV_QCOW) += qcow.o
+obj-$(CONFIG_BDRV_VMDK) += vmdk.o
+obj-$(CONFIG_BDRV_VPC) += vpc.o
+obj-$(CONFIG_BDRV_VVFAT) += vvfat.o
diff --git a/block/cow.c b/block/cow.c
index 0a49491..bac1f07 100644
--- a/block/cow.c
+++ b/block/cow.c
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#ifndef _WIN32
#include "qemu-common.h"
#include "block_int.h"
#include "module.h"
@@ -273,4 +272,3 @@ static int bdrv_cow_init(void)
}
block_init(bdrv_cow_init);
-#endif
diff --git a/configs/unix/defconfig b/configs/unix/defconfig
new file mode 100644
index 0000000..d897462
--- /dev/null
+++ b/configs/unix/defconfig
@@ -0,0 +1,13 @@
+CONFIG_BDRV_RAW_POSIX=y
+# CONFIG_BDRV_RAW_WIN32 is not set
+CONFIG_BDRV_BOCHS=y
+CONFIG_BDRV_CLOOP=y
+CONFIG_BDRV_COW=y
+CONFIG_BDRV_DMG=y
+CONFIG_BDRV_NBD=y
+CONFIG_BDRV_PARALLELS=y
+CONFIG_BDRV_QCOW2=y
+CONFIG_BDRV_QCOW=y
+CONFIG_BDRV_VMDK=y
+CONFIG_BDRV_VPC=y
+CONFIG_BDRV_VVFAT=y
diff --git a/configs/win32/defconfig b/configs/win32/defconfig
new file mode 100644
index 0000000..29ed483
--- /dev/null
+++ b/configs/win32/defconfig
@@ -0,0 +1,13 @@
+# CONFIG_BDRV_RAW_POSIX is not set
+CONFIG_BDRV_RAW_WIN32=y
+CONFIG_BDRV_BOCHS=y
+CONFIG_BDRV_CLOOP=y
+# CONFIG_BDRV_COW is not set
+CONFIG_BDRV_DMG=y
+CONFIG_BDRV_NBD=y
+CONFIG_BDRV_PARALLELS=y
+CONFIG_BDRV_QCOW2=y
+CONFIG_BDRV_QCOW=y
+CONFIG_BDRV_VMDK=y
+CONFIG_BDRV_VPC=y
+CONFIG_BDRV_VVFAT=y
--
1.6.0.6
next prev parent reply other threads:[~2009-05-11 14:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 14:26 [Qemu-devel] [PATCH 0/4][RFC] Add module infrastructure to QEMU Anthony Liguori
2009-05-11 14:26 ` [Qemu-devel] [PATCH 1/4] " Anthony Liguori
2009-05-11 21:37 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-11 21:53 ` Anthony Liguori
2009-05-11 21:53 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-11 22:02 ` Anthony Liguori
2009-05-12 9:38 ` Gerd Hoffmann
2009-05-12 10:15 ` Paul Brook
2009-05-12 13:10 ` Anthony Liguori
[not found] ` <9EE414CC7AEE4488A45A263DE5B82EFE@jupiter>
2009-05-12 13:19 ` Anthony Liguori
2009-05-11 14:26 ` [Qemu-devel] [PATCH 2/4] Convert block infrastructure to use new module init functionality Anthony Liguori
2009-05-11 14:26 ` [Qemu-devel] [PATCH 3/4] Move block drivers into their own directory Anthony Liguori
2009-05-11 14:26 ` Anthony Liguori [this message]
2009-05-11 15:22 ` [Qemu-devel] [PATCH 4/4] Introduce global .config to selectively enable compile features Avi Kivity
2009-05-11 18:37 ` Anthony Liguori
2009-05-11 18:41 ` Avi Kivity
2009-05-11 14:48 ` [Qemu-devel] Re: [PATCH 0/4][RFC] Add module infrastructure to QEMU Paul Brook
2009-05-11 15:19 ` Avi Kivity
2009-05-11 16:10 ` [Qemu-devel] Re: [PATCH 0/4][RFC] Add module infrastructure toQEMU Anthony Liguori
2009-05-11 16:45 ` Avi Kivity
2009-05-11 16:05 ` [Qemu-devel] Re: [PATCH 0/4][RFC] Add module infrastructure to QEMU Anthony Liguori
2009-05-11 16:16 ` Paul Brook
2009-05-11 16:20 ` Anthony Liguori
2009-05-11 16:43 ` Paul Brook
[not found] ` <AEED36F4EA194EC2B57D5E4DB7D64896@jupiter>
2009-05-12 13:18 ` [Qemu-devel] " Anthony Liguori
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=1242052009-27339-5-git-send-email-aliguori@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.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).