Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M5iJu-0007mi-IY for qemu-devel@nongnu.org; Sun, 17 May 2009 11:30:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M5iJq-0007gt-0C for qemu-devel@nongnu.org; Sun, 17 May 2009 11:30:34 -0400 Received: from [199.232.76.173] (port=42912 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M5iJp-0007gY-G7 for qemu-devel@nongnu.org; Sun, 17 May 2009 11:30:29 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:55652) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M5iJp-0005kg-4r for qemu-devel@nongnu.org; Sun, 17 May 2009 11:30:29 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e39.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4HFQlv5021058 for ; Sun, 17 May 2009 09:26:47 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4HFTBG4156846 for ; Sun, 17 May 2009 09:29:11 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4HFTBc5027362 for ; Sun, 17 May 2009 09:29:11 -0600 From: Anthony Liguori Date: Sun, 17 May 2009 10:29:00 -0500 Message-Id: <1242574141-18488-4-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1242574141-18488-1-git-send-email-aliguori@us.ibm.com> References: <1242574141-18488-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 3/4] Update makefile to build roms List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Glauber Costa , Anthony Liguori , Alex Graf , Avi Kivity , Dustin Kirkland We build the roms in a sub directory of the target build directory. This is anticipating a single source base (like uboot) that gets built differently for multiple target architectures (PPC, SH4, etc.). Signed-off-by: Anthony Liguori --- Makefile | 7 ++++++- Makefile.target | 18 ++++++++++++++++++ configure | 8 ++++++++ 3 files changed, 32 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index f303aff..8677f38 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ config-host.mak: endif .PHONY: all clean cscope distclean dvi html info install install-doc \ - recurse-all speed tar tarbin test + recurse-all speed tar tarbin test roms VPATH=$(SRC_PATH):$(SRC_PATH)/hw @@ -231,6 +231,11 @@ qemu-io$(EXESUF): qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(BLOCK_OBJS) qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz +roms: + @for d in $(TARGET_DIRS); do \ + $(MAKE) -C $$d $@ || exit 1 ; \ + done + clean: # avoid old build problems by removing potentially incorrect old files rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h diff --git a/Makefile.target b/Makefile.target index dd1c442..567618b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -712,6 +712,12 @@ LDFLAGS+=-p main.o: CFLAGS+=-p endif +# Per architecture ROMS +ROMS= +ifeq ($(TARGET_BASE_ARCH),i386) +ROMS+=gplbios vgabios +endif + vl.o: qemu-options.h $(QEMU_PROG): LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) @@ -731,9 +737,21 @@ endif qemu-options.h: $(SRC_PATH)/qemu-options.hx $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") +.PHONY: roms + +roms: + @if test "$(ROMS)" ; then \ + for subdir in $(ROMS); do \ + $(MAKE) -C roms/$${subdir} VPATH=$(SRC_PATH)/roms/$${subdir} ;\ + done; \ + fi + clean: rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o qemu-options.h gdbstub-xml.c rm -f *.d */*.d tcg/*.o + for subdir in $(ROMS); do \ + $(MAKE) -C $${subdir} clean \ + done install: all ifneq ($(PROGS),) diff --git a/configure b/configure index 4111e7c..29a13ca 100755 --- a/configure +++ b/configure @@ -1791,6 +1791,14 @@ if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$targ mkdir -p $target_dir/nwfpe fi +if test "$target" = "i386-softmmu" -o "$target" = "x86_64-softmmu" ; then + for rom in gplbios vgabios ; do + mkdir -p $target_dir/roms/$rom + rm -f $target_dir/roms/$rom/Makefile + ln -s $source_path/roms/$rom/Makefile $target_dir/roms/$rom/Makefile + done +fi + # # don't use ln -sf as not all "ln -sf" over write the file/link # -- 1.6.2.5