From ad96090a01d848df67d70c5259ed8aa321fa8716 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Mon, 29 Mar 2010 19:23:52 +0000 Subject: Refactor target specific handling, compile vl.c only once Move target specific functions and RAM handling to arch_init.c. Add a flag to QEMUOptions structure to indicate for which architectures the option is allowed, check the flag in run time and remove conditional code in option handling. Now that no target dependencies remain, compile vl.c only once for all targets. Signed-off-by: Blue Swirl --- Makefile.target | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'Makefile.target') diff --git a/Makefile.target b/Makefile.target index a89158a..36b3408 100644 --- a/Makefile.target +++ b/Makefile.target @@ -161,7 +161,7 @@ endif #CONFIG_BSD_USER # System emulator target ifdef CONFIG_SOFTMMU -obj-y = vl.o cpus.o monitor.o machine.o gdbstub.o +obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o obj-y += qemu-timer.o # virtio has to be here due to weird dependency between PCI and virtio-net. # need to fix this properly @@ -285,11 +285,7 @@ obj-s390x-y = s390-virtio-bus.o s390-virtio.o obj-alpha-y = alpha_palcode.o -main.o vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) - -vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS) - -vl.o: qemu-options.h +main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) monitor.o: qemu-monitor.h @@ -311,16 +307,13 @@ $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") -qemu-options.h: $(SRC_PATH)/qemu-options.hx - $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") - qemu-monitor.h: $(SRC_PATH)/qemu-monitor.hx $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") clean: rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o rm -f *.d */*.d tcg/*.o ide/*.o - rm -f qemu-options.h qemu-monitor.h gdbstub-xml.c + rm -f qemu-monitor.h gdbstub-xml.c install: all ifneq ($(PROGS),) -- cgit v1.1