blob: 5bc8fb6b41f61c7c855864f165a5c878376aa84a [file] [log] [blame]
Juan Quintela42bc6082009-07-16 18:34:20 +02001#!/bin/sh
2
Juan Quintela42bc6082009-07-16 18:34:20 +02003while read line; do
4
5case $line in
Juan Quintela2358a492009-07-27 16:13:25 +02006 VERSION=*) # configuration
7 version=${line#*=}
8 echo "#define QEMU_VERSION \"$version\""
9 ;;
10 PKGVERSION=*) # configuration
11 pkgversion=${line#*=}
12 echo "#define QEMU_PKGVERSION \"$pkgversion\""
13 ;;
14 ARCH=*) # configuration
15 arch=${line#*=}
16 arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
17 echo "#define HOST_$arch_name 1"
18 ;;
Juan Quintela2358a492009-07-27 16:13:25 +020019 CONFIG_AUDIO_DRIVERS=*)
20 drivers=${line#*=}
21 echo "#define CONFIG_AUDIO_DRIVERS \\"
22 for drv in $drivers; do
23 echo " &${drv}_audio_driver,\\"
24 done
25 echo ""
26 ;;
Juan Quintela42bc6082009-07-16 18:34:20 +020027 CONFIG_*=y) # configuration
28 name=${line%=*}
29 echo "#define $name 1"
30 ;;
31 CONFIG_*=*) # configuration
32 name=${line%=*}
33 value=${line#*=}
34 echo "#define $name $value"
35 ;;
Juan Quintela2358a492009-07-27 16:13:25 +020036 ARCH=*) # configuration
37 arch=${line#*=}
38 arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
39 echo "#define HOST_$arch_name 1"
40 ;;
41 HOST_USB=*)
42 # do nothing
43 ;;
44 HOST_CC=*)
45 # do nothing
46 ;;
47 HOST_*=y) # configuration
48 name=${line%=*}
49 echo "#define $name 1"
50 ;;
51 HOST_*=*) # configuration
52 name=${line%=*}
53 value=${line#*=}
54 echo "#define $name $value"
55 ;;
Juan Quintela42bc6082009-07-16 18:34:20 +020056 TARGET_ARCH=*) # configuration
57 target_arch=${line#*=}
Juan Quintela42bc6082009-07-16 18:34:20 +020058 echo "#define TARGET_ARCH \"$target_arch\""
Juan Quintela42bc6082009-07-16 18:34:20 +020059 ;;
60 TARGET_BASE_ARCH=*) # configuration
61 target_base_arch=${line#*=}
62 if [ "$target_base_arch" != "$target_arch" ]; then
63 base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'`
64 echo "#define TARGET_$base_arch_name 1"
65 fi
66 ;;
67 TARGET_XML_FILES=*)
68 # do nothing
69 ;;
70 TARGET_ABI_DIR=*)
71 # do nothing
72 ;;
73 TARGET_ARCH2=*)
74 # do nothing
75 ;;
Juan Quintela2358a492009-07-27 16:13:25 +020076 TARGET_DIRS=*)
77 # do nothing
78 ;;
Juan Quintela42bc6082009-07-16 18:34:20 +020079 TARGET_*=y) # configuration
80 name=${line%=*}
81 echo "#define $name 1"
82 ;;
83 TARGET_*=*) # configuration
84 name=${line%=*}
85 value=${line#*=}
86 echo "#define $name $value"
87 ;;
Juan Quintela42bc6082009-07-16 18:34:20 +020088esac
89
90done # read