From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3WTK-00013w-BT for qemu-devel@nongnu.org; Mon, 11 May 2009 10:27:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3WTG-00012B-3I for qemu-devel@nongnu.org; Mon, 11 May 2009 10:27:13 -0400 Received: from [199.232.76.173] (port=59248 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3WTE-00011m-VX for qemu-devel@nongnu.org; Mon, 11 May 2009 10:27:09 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:43680) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M3WTE-00055n-In for qemu-devel@nongnu.org; Mon, 11 May 2009 10:27:08 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e6.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4BETJ0a007437 for ; Mon, 11 May 2009 10:29:19 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4BEQvsC430320 for ; Mon, 11 May 2009 10:26:57 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4BEQrkc008571 for ; Mon, 11 May 2009 08:26:54 -0600 From: Anthony Liguori Date: Mon, 11 May 2009 09:26:49 -0500 Message-Id: <1242052009-27339-5-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1242052009-27339-1-git-send-email-aliguori@us.ibm.com> References: <1242052009-27339-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 4/4] Introduce global .config to selectively enable compile features List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Paul Brook Signed-off-by: Anthony Liguori 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