Patchwork [06/30] Add new config-devices.mak for each target

login
register
mail settings
Submitter Juan Quintela
Date Aug. 27, 2009, 7:17 p.m.
Message ID <7fa15fc7eef2d6dfb3796f6effecf0507e099fb2.1251399960.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/32283/
State Superseded
Headers show

Comments

Juan Quintela - Aug. 27, 2009, 7:17 p.m.
We generate config-devices.h from there automatically.
We need to do it in main Makefile, because we are going to need a main
Makefile for them.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 .gitignore                                 |    2 ++
 Makefile                                   |    8 +++++++-
 Makefile.hw                                |    1 +
 Makefile.target                            |    1 +
 configure                                  |   15 +++++++++++++++
 default-configs/alpha-linux-user.mak       |    1 +
 default-configs/arm-linux-user.mak         |    1 +
 default-configs/arm-softmmu.mak            |    1 +
 default-configs/armeb-linux-user.mak       |    1 +
 default-configs/cris-linux-user.mak        |    1 +
 default-configs/cris-softmmu.mak           |    1 +
 default-configs/i386-bsd-user.mak          |    1 +
 default-configs/i386-darwin-user.mak       |    1 +
 default-configs/i386-linux-user.mak        |    1 +
 default-configs/i386-softmmu.mak           |    1 +
 default-configs/m68k-linux-user.mak        |    1 +
 default-configs/m68k-softmmu.mak           |    1 +
 default-configs/microblaze-linux-user.mak  |    1 +
 default-configs/microblaze-softmmu.mak     |    1 +
 default-configs/mips-linux-user.mak        |    1 +
 default-configs/mips-softmmu.mak           |    1 +
 default-configs/mips64-softmmu.mak         |    1 +
 default-configs/mips64el-softmmu.mak       |    1 +
 default-configs/mipsel-linux-user.mak      |    1 +
 default-configs/mipsel-softmmu.mak         |    1 +
 default-configs/ppc-darwin-user.mak        |    1 +
 default-configs/ppc-linux-user.mak         |    1 +
 default-configs/ppc-softmmu.mak            |    1 +
 default-configs/ppc64-linux-user.mak       |    1 +
 default-configs/ppc64-softmmu.mak          |    1 +
 default-configs/ppc64abi32-linux-user.mak  |    1 +
 default-configs/ppcemb-softmmu.mak         |    1 +
 default-configs/sh4-linux-user.mak         |    1 +
 default-configs/sh4-softmmu.mak            |    1 +
 default-configs/sh4eb-linux-user.mak       |    1 +
 default-configs/sh4eb-softmmu.mak          |    1 +
 default-configs/sparc-bsd-user.mak         |    1 +
 default-configs/sparc-linux-user.mak       |    1 +
 default-configs/sparc-softmmu.mak          |    1 +
 default-configs/sparc32plus-linux-user.mak |    1 +
 default-configs/sparc64-bsd-user.mak       |    1 +
 default-configs/sparc64-linux-user.mak     |    1 +
 default-configs/sparc64-softmmu.mak        |    1 +
 default-configs/x86_64-bsd-user.mak        |    1 +
 default-configs/x86_64-linux-user.mak      |    1 +
 default-configs/x86_64-softmmu.mak         |    1 +
 46 files changed, 67 insertions(+), 1 deletions(-)
 create mode 100644 default-configs/alpha-linux-user.mak
 create mode 100644 default-configs/arm-linux-user.mak
 create mode 100644 default-configs/arm-softmmu.mak
 create mode 100644 default-configs/armeb-linux-user.mak
 create mode 100644 default-configs/cris-linux-user.mak
 create mode 100644 default-configs/cris-softmmu.mak
 create mode 100644 default-configs/i386-bsd-user.mak
 create mode 100644 default-configs/i386-darwin-user.mak
 create mode 100644 default-configs/i386-linux-user.mak
 create mode 100644 default-configs/i386-softmmu.mak
 create mode 100644 default-configs/m68k-linux-user.mak
 create mode 100644 default-configs/m68k-softmmu.mak
 create mode 100644 default-configs/microblaze-linux-user.mak
 create mode 100644 default-configs/microblaze-softmmu.mak
 create mode 100644 default-configs/mips-linux-user.mak
 create mode 100644 default-configs/mips-softmmu.mak
 create mode 100644 default-configs/mips64-softmmu.mak
 create mode 100644 default-configs/mips64el-softmmu.mak
 create mode 100644 default-configs/mipsel-linux-user.mak
 create mode 100644 default-configs/mipsel-softmmu.mak
 create mode 100644 default-configs/ppc-darwin-user.mak
 create mode 100644 default-configs/ppc-linux-user.mak
 create mode 100644 default-configs/ppc-softmmu.mak
 create mode 100644 default-configs/ppc64-linux-user.mak
 create mode 100644 default-configs/ppc64-softmmu.mak
 create mode 100644 default-configs/ppc64abi32-linux-user.mak
 create mode 100644 default-configs/ppcemb-softmmu.mak
 create mode 100644 default-configs/sh4-linux-user.mak
 create mode 100644 default-configs/sh4-softmmu.mak
 create mode 100644 default-configs/sh4eb-linux-user.mak
 create mode 100644 default-configs/sh4eb-softmmu.mak
 create mode 100644 default-configs/sparc-bsd-user.mak
 create mode 100644 default-configs/sparc-linux-user.mak
 create mode 100644 default-configs/sparc-softmmu.mak
 create mode 100644 default-configs/sparc32plus-linux-user.mak
 create mode 100644 default-configs/sparc64-bsd-user.mak
 create mode 100644 default-configs/sparc64-linux-user.mak
 create mode 100644 default-configs/sparc64-softmmu.mak
 create mode 100644 default-configs/x86_64-bsd-user.mak
 create mode 100644 default-configs/x86_64-linux-user.mak
 create mode 100644 default-configs/x86_64-softmmu.mak

Patch

diff --git a/.gitignore b/.gitignore
index 5d6a78e..0c4d7c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@ 
+config-devices.*
+config-all-devices.*
 config-host.*
 config-target.*
 i386
diff --git a/Makefile b/Makefile
index 7664c83..acca106 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,13 @@  else
 DOCS=
 endif

+SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
+
+config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
+	$(call quiet-command,grep "=y$$" $(SUBDIR_DEVICES_MAK) | sort -u > $@,"  GEN  $@")
+
+include config-all-devices.mak
+
 build-all: config-host.h $(TOOLS) $(DOCS) recurse-all

 %.c %.h: config-host.h
@@ -42,7 +49,6 @@  subdir-%: config-host.h
 $(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
 $(filter %-user,$(SUBDIR_RULES)): libqemu_user.a

-
 ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
 romsubdir-%:
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
diff --git a/Makefile.hw b/Makefile.hw
index 6472ec1..b48d1af 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -1,6 +1,7 @@ 
 # Makefile for qemu target independent devices.

 include ../config-host.mak
+include ../config-all-devices.mak
 include config.mak
 include $(SRC_PATH)/rules.mak

diff --git a/Makefile.target b/Makefile.target
index 2f75e6d..4ce6a3d 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -1,6 +1,7 @@ 
 # -*- Mode: makefile -*-

 include ../config-host.mak
+include config-devices.mak
 include config-target.mak
 include $(SRC_PATH)/rules.mak

diff --git a/configure b/configure
index 93bc4d0..27822f9 100755
--- a/configure
+++ b/configure
@@ -1772,11 +1772,16 @@  if test -f ${config_host_ld}~ ; then
   fi
 fi

+# Temporary all devices configuration
+rm -f config-all-devices.mak.temp
+touch config-all-devices.mak.temp
+
 for target in $target_list; do
 target_dir="$target"
 config_target_mak=$target_dir/config-target.mak
 target_arch2=`echo $target | cut -d '-' -f 1`
 target_bigendian="no"
+
 case "$target_arch2" in
   armeb|m68k|microblaze|mips|mipsn32|mips64|ppc|ppcemb|ppc64|ppc64abi32|sh4eb|sparc|sparc64|sparc32plus)
   target_bigendian=yes
@@ -1816,6 +1821,11 @@  if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$targ
   mkdir -p $target_dir/nwfpe
 fi

+if test ! -f $target_dir/config-devices.mak ; then
+  cp $source_path/default-configs/${target}.mak $target_dir/config-devices.mak
+  cat $source_path/default-configs/${target}.mak >> config-all-devices.mak.temp
+fi
+
 #
 # don't use ln -sf as not all "ln -sf" over write the file/link
 #
@@ -2158,6 +2168,11 @@  echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak

 done # for target in $targets

+echo "# This is a generated config file from all the devices selected" > config-all-devices.mak
+echo "# Don't edit it" >> config-all-devices.mak
+grep "=y$" config-all-devices.mak.temp >> config-all-devices.mak
+rm config-all-devices.mak.temp
+
 # 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 pc-bios/optionrom"
diff --git a/default-configs/alpha-linux-user.mak b/default-configs/alpha-linux-user.mak
new file mode 100644
index 0000000..7956e29
--- /dev/null
+++ b/default-configs/alpha-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for alpha-linux-user
diff --git a/default-configs/arm-linux-user.mak b/default-configs/arm-linux-user.mak
new file mode 100644
index 0000000..413361a
--- /dev/null
+++ b/default-configs/arm-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for arm-linux-user
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
new file mode 100644
index 0000000..372a549
--- /dev/null
+++ b/default-configs/arm-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for arm-softmmu
diff --git a/default-configs/armeb-linux-user.mak b/default-configs/armeb-linux-user.mak
new file mode 100644
index 0000000..bf2ffe7
--- /dev/null
+++ b/default-configs/armeb-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for armeb-linux-user
diff --git a/default-configs/cris-linux-user.mak b/default-configs/cris-linux-user.mak
new file mode 100644
index 0000000..e3aec7b
--- /dev/null
+++ b/default-configs/cris-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for cris-linux-user
diff --git a/default-configs/cris-softmmu.mak b/default-configs/cris-softmmu.mak
new file mode 100644
index 0000000..3726699
--- /dev/null
+++ b/default-configs/cris-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for cris-softmmu
diff --git a/default-configs/i386-bsd-user.mak b/default-configs/i386-bsd-user.mak
new file mode 100644
index 0000000..af1b31a
--- /dev/null
+++ b/default-configs/i386-bsd-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for i386-bsd-user
diff --git a/default-configs/i386-darwin-user.mak b/default-configs/i386-darwin-user.mak
new file mode 100644
index 0000000..19afd3d
--- /dev/null
+++ b/default-configs/i386-darwin-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for i386-darwin-user
diff --git a/default-configs/i386-linux-user.mak b/default-configs/i386-linux-user.mak
new file mode 100644
index 0000000..8657e68
--- /dev/null
+++ b/default-configs/i386-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for i386-linux-user
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
new file mode 100644
index 0000000..15586a0
--- /dev/null
+++ b/default-configs/i386-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for i386-softmmu
diff --git a/default-configs/m68k-linux-user.mak b/default-configs/m68k-linux-user.mak
new file mode 100644
index 0000000..06cd5ed
--- /dev/null
+++ b/default-configs/m68k-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for m68k-linux-user
diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak
new file mode 100644
index 0000000..572b868
--- /dev/null
+++ b/default-configs/m68k-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for m68k-softmmu
diff --git a/default-configs/microblaze-linux-user.mak b/default-configs/microblaze-linux-user.mak
new file mode 100644
index 0000000..566fdc0
--- /dev/null
+++ b/default-configs/microblaze-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for microblaze-linux-user
diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak
new file mode 100644
index 0000000..c42009d
--- /dev/null
+++ b/default-configs/microblaze-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for microblaze-softmmu
diff --git a/default-configs/mips-linux-user.mak b/default-configs/mips-linux-user.mak
new file mode 100644
index 0000000..31df570
--- /dev/null
+++ b/default-configs/mips-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for mips-linux-user
diff --git a/default-configs/mips-softmmu.mak b/default-configs/mips-softmmu.mak
new file mode 100644
index 0000000..a9e89ec
--- /dev/null
+++ b/default-configs/mips-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for mips-softmmu
diff --git a/default-configs/mips64-softmmu.mak b/default-configs/mips64-softmmu.mak
new file mode 100644
index 0000000..4211452
--- /dev/null
+++ b/default-configs/mips64-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for mips64-softmmu
diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak
new file mode 100644
index 0000000..8ca46a2
--- /dev/null
+++ b/default-configs/mips64el-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for mips64el-softmmu
diff --git a/default-configs/mipsel-linux-user.mak b/default-configs/mipsel-linux-user.mak
new file mode 100644
index 0000000..4d0e4af
--- /dev/null
+++ b/default-configs/mipsel-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for mipsel-linux-user
diff --git a/default-configs/mipsel-softmmu.mak b/default-configs/mipsel-softmmu.mak
new file mode 100644
index 0000000..fe8af41
--- /dev/null
+++ b/default-configs/mipsel-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for mipsel-softmmu
diff --git a/default-configs/ppc-darwin-user.mak b/default-configs/ppc-darwin-user.mak
new file mode 100644
index 0000000..117f176
--- /dev/null
+++ b/default-configs/ppc-darwin-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppc-darwin-user
diff --git a/default-configs/ppc-linux-user.mak b/default-configs/ppc-linux-user.mak
new file mode 100644
index 0000000..6273df2
--- /dev/null
+++ b/default-configs/ppc-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppc-linux-user
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
new file mode 100644
index 0000000..ba80ba2
--- /dev/null
+++ b/default-configs/ppc-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppc-softmmu
diff --git a/default-configs/ppc64-linux-user.mak b/default-configs/ppc64-linux-user.mak
new file mode 100644
index 0000000..422d3fb
--- /dev/null
+++ b/default-configs/ppc64-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppc64-linux-user
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
new file mode 100644
index 0000000..0b72c70
--- /dev/null
+++ b/default-configs/ppc64-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppc64-softmmu
diff --git a/default-configs/ppc64abi32-linux-user.mak b/default-configs/ppc64abi32-linux-user.mak
new file mode 100644
index 0000000..1c657ec
--- /dev/null
+++ b/default-configs/ppc64abi32-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppc64abi32-linux-user
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
new file mode 100644
index 0000000..951bfa0
--- /dev/null
+++ b/default-configs/ppcemb-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for ppcemb-softmmu
diff --git a/default-configs/sh4-linux-user.mak b/default-configs/sh4-linux-user.mak
new file mode 100644
index 0000000..a469e19
--- /dev/null
+++ b/default-configs/sh4-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sh4-linux-user
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
new file mode 100644
index 0000000..4466835
--- /dev/null
+++ b/default-configs/sh4-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for sh4-softmmu
diff --git a/default-configs/sh4eb-linux-user.mak b/default-configs/sh4eb-linux-user.mak
new file mode 100644
index 0000000..be08ca1
--- /dev/null
+++ b/default-configs/sh4eb-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sh4eb-linux-user
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
new file mode 100644
index 0000000..2f60e53
--- /dev/null
+++ b/default-configs/sh4eb-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for sh4eb-softmmu
diff --git a/default-configs/sparc-bsd-user.mak b/default-configs/sparc-bsd-user.mak
new file mode 100644
index 0000000..21e0950
--- /dev/null
+++ b/default-configs/sparc-bsd-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc-bsd-user
diff --git a/default-configs/sparc-linux-user.mak b/default-configs/sparc-linux-user.mak
new file mode 100644
index 0000000..9c716d1
--- /dev/null
+++ b/default-configs/sparc-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc-linux-user
diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-softmmu.mak
new file mode 100644
index 0000000..2e0e621
--- /dev/null
+++ b/default-configs/sparc-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc-softmmu
diff --git a/default-configs/sparc32plus-linux-user.mak b/default-configs/sparc32plus-linux-user.mak
new file mode 100644
index 0000000..432e880
--- /dev/null
+++ b/default-configs/sparc32plus-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc32plus-linux-user
diff --git a/default-configs/sparc64-bsd-user.mak b/default-configs/sparc64-bsd-user.mak
new file mode 100644
index 0000000..b8b9eea
--- /dev/null
+++ b/default-configs/sparc64-bsd-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc64-bsd-user
diff --git a/default-configs/sparc64-linux-user.mak b/default-configs/sparc64-linux-user.mak
new file mode 100644
index 0000000..bf1bdd6
--- /dev/null
+++ b/default-configs/sparc64-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc64-linux-user
diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
new file mode 100644
index 0000000..fead2ea
--- /dev/null
+++ b/default-configs/sparc64-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for sparc64-softmmu
diff --git a/default-configs/x86_64-bsd-user.mak b/default-configs/x86_64-bsd-user.mak
new file mode 100644
index 0000000..73e5d34
--- /dev/null
+++ b/default-configs/x86_64-bsd-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for x86_64-bsd-user
diff --git a/default-configs/x86_64-linux-user.mak b/default-configs/x86_64-linux-user.mak
new file mode 100644
index 0000000..bec1d9e
--- /dev/null
+++ b/default-configs/x86_64-linux-user.mak
@@ -0,0 +1 @@ 
+# Default configuration for x86_64-linux-user
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
new file mode 100644
index 0000000..ec98af2
--- /dev/null
+++ b/default-configs/x86_64-softmmu.mak
@@ -0,0 +1 @@ 
+# Default configuration for x86_64-softmmu