qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/7] Always build roms in a separate directory


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 2/7] Always build roms in a separate directory
Date: Wed, 29 Jul 2009 13:45:54 -0500

For some roms, the same source will get built multiple times for each board
type.

Signed-off-by: Anthony Liguori <address@hidden>
---
 Makefile  |    9 ++++++---
 configure |   13 ++++++++++---
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index c510ff3..059696a 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,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
 
@@ -220,9 +220,12 @@ clean:
        rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
        rm -f qemu-img-cmds.h
        $(MAKE) -C tests clean
-       for d in $(TARGET_DIRS) $(ROMS) libhw32 libhw64; do \
+       for d in $(TARGET_DIRS) libhw32 libhw64; do \
        $(MAKE) -C $$d $@ || exit 1 ; \
         done
+       for d in $(ROMS); do \
+       $(MAKE) -C pc-bios/$$d $@ || exit 1 ; \
+       done
 
 distclean: clean
        rm -f config-host.mak config-host.h config-host.ld $(DOCS) 
qemu-options.texi qemu-img-cmds.texi
@@ -247,7 +250,7 @@ endif
 
 roms:
        for d in $(ROMS); do \
-       $(MAKE) -C $$d || exit 1 ; \
+       $(MAKE) -C pc-bios/$$d || exit 1 ; \
         done
 
 install-doc: $(DOCS)
diff --git a/configure b/configure
index 264cc7b..f477aaf 100755
--- a/configure
+++ b/configure
@@ -1743,7 +1743,7 @@ echo "TOOLS=$tools" >> $config_host_mak
 roms=
 if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
         "$targetos" != "Darwin" ; then
-  roms="roms/multiboot"
+  roms="multiboot"
 fi
 echo "ROMS=$roms" >> $config_host_mak
 
@@ -2109,13 +2109,20 @@ fi
 
 done # for target in $targets
 
+# make directories for roms
+for rom in $roms; do
+    mkdir -p pc-bios/$rom
+    rm -f pc-bios/$rom/Makefile
+    ln -s $source_path/roms/$rom/Makefile pc-bios/$rom/Makefile
+done
+
 # build tree in object directory if source path is different from current one
 if test "$source_path_used" = "yes" ; then
-    DIRS="tests tests/cris slirp audio block roms/multiboot"
+    DIRS="tests tests/cris slirp audio block"
     FILES="Makefile tests/Makefile"
     FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
     FILES="$FILES tests/test-mmap.c"
-    FILES="$FILES roms/multiboot/Makefile pc-bios/keymaps pc-bios/video.x"
+    FILES="$FILES pc-bios/keymaps pc-bios/video.x"
     for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.dtb 
$source_path/pc-bios/openbios-*; do
         FILES="$FILES pc-bios/`basename $bios_file`"
     done
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]