Skip to contentSkip to conversation

Split block-raw.c into block-raw-posix.c and block-raw-win32.c

PATCH New Anthony Liguori 1 participant 1 message Dec 6, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Split block-raw.c into block-raw-posix.c and block-raw-win32.c

There's virtually no shared code between the two.

Regards,

Anthony Liguori

Makefile.target +5 -1
Index: qemu/Makefile.target
===================================================================
@@ -398,7 +398,11 @@
 # must use static linking to avoid leaving stuff in virtual address space
 VL_OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o
 # XXX: suppress QEMU_TOOL tests
-VL_OBJS+=block-raw.o
+ifdef CONFIG_WIN32
+VL_OBJS+=block-raw-win32.o
+else
+VL_OBJS+=block-raw-posix.o
+endif
 
 ifdef CONFIG_ALSA
 LIBS += -lasound
block-raw-posix.c new file +901 -0

901 lines not on this page · raw message

block-raw-win32.c new file +544 -0

544 lines not on this page · raw message

block-raw.c deleted +0 -1421

1,421 lines not on this page · raw message

Makefile +8 -1
Index: qemu/Makefile
===================================================================
@@ -119,9 +119,16 @@
 	rm -f $@ 
 	$(AR) rcs $@ $(OBJS)
 
+QEMU_IMG_BLOCK_OBJS = $(BLOCK_OBJS)
+ifdef CONFIG_WIN32
+QEMU_IMG_BLOCK_OBJS += qemu-img-block-raw-win32.o
+else
+QEMU_IMG_BLOCK_OBJS += qemu-img-block-raw-posix.o
+endif
+
 ######################################################################
 
-qemu-img$(EXESUF): qemu-img.o qemu-img-block.o qemu-img-block-raw.o $(BLOCK_OBJS)
+qemu-img$(EXESUF): qemu-img.o qemu-img-block.o $(QEMU_IMG_BLOCK_OBJS)
 	$(CC) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS)
 
 qemu-img-%.o: %.c