]>
Commit | Line | Data |
---|---|---|
42bc608b JQ |
1 | #!/bin/sh |
2 | ||
1215c6e7 JQ |
3 | echo "/* Automatically generated by create_config - do not modify */" |
4 | ||
42bc608b JQ |
5 | while read line; do |
6 | ||
7 | case $line in | |
2358a494 JQ |
8 | VERSION=*) # configuration |
9 | version=${line#*=} | |
10 | echo "#define QEMU_VERSION \"$version\"" | |
11 | ;; | |
12 | PKGVERSION=*) # configuration | |
13 | pkgversion=${line#*=} | |
14 | echo "#define QEMU_PKGVERSION \"$pkgversion\"" | |
15 | ;; | |
eb72952b EH |
16 | qemu_*dir=*) # qemu-specific directory configuration |
17 | name=${line%=*} | |
18 | value=${line#*=} | |
19 | define_name=`echo $name | LC_ALL=C tr '[a-z]' '[A-Z]'` | |
20 | eval "define_value=\"$value\"" | |
21 | echo "#define CONFIG_$define_name \"$define_value\"" | |
22 | # save for the next definitions | |
23 | eval "$name=\$define_value" | |
24 | ;; | |
c41cc50f | 25 | prefix=*) |
1dabe05c | 26 | # save for the next definitions |
0b3b7174 | 27 | prefix=${line#*=} |
1dabe05c | 28 | ;; |
2358a494 JQ |
29 | CONFIG_AUDIO_DRIVERS=*) |
30 | drivers=${line#*=} | |
31 | echo "#define CONFIG_AUDIO_DRIVERS \\" | |
32 | for drv in $drivers; do | |
33 | echo " &${drv}_audio_driver,\\" | |
34 | done | |
35 | echo "" | |
36 | ;; | |
eb852011 MA |
37 | CONFIG_BDRV_WHITELIST=*) |
38 | echo "#define CONFIG_BDRV_WHITELIST \\" | |
39 | for drv in ${line#*=}; do | |
40 | echo " \"${drv}\",\\" | |
41 | done | |
42 | echo " NULL" | |
43 | ;; | |
42bc608b JQ |
44 | CONFIG_*=y) # configuration |
45 | name=${line%=*} | |
46 | echo "#define $name 1" | |
47 | ;; | |
48 | CONFIG_*=*) # configuration | |
49 | name=${line%=*} | |
50 | value=${line#*=} | |
51 | echo "#define $name $value" | |
52 | ;; | |
2358a494 JQ |
53 | ARCH=*) # configuration |
54 | arch=${line#*=} | |
bb55b712 | 55 | arch_name=`echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]'` |
2358a494 JQ |
56 | echo "#define HOST_$arch_name 1" |
57 | ;; | |
58 | HOST_USB=*) | |
59 | # do nothing | |
60 | ;; | |
61 | HOST_CC=*) | |
62 | # do nothing | |
63 | ;; | |
64 | HOST_*=y) # configuration | |
65 | name=${line%=*} | |
66 | echo "#define $name 1" | |
67 | ;; | |
68 | HOST_*=*) # configuration | |
69 | name=${line%=*} | |
70 | value=${line#*=} | |
71 | echo "#define $name $value" | |
72 | ;; | |
42bc608b JQ |
73 | TARGET_ARCH=*) # configuration |
74 | target_arch=${line#*=} | |
42bc608b | 75 | echo "#define TARGET_ARCH \"$target_arch\"" |
42bc608b JQ |
76 | ;; |
77 | TARGET_BASE_ARCH=*) # configuration | |
78 | target_base_arch=${line#*=} | |
79 | if [ "$target_base_arch" != "$target_arch" ]; then | |
bb55b712 | 80 | base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'` |
42bc608b JQ |
81 | echo "#define TARGET_$base_arch_name 1" |
82 | fi | |
83 | ;; | |
84 | TARGET_XML_FILES=*) | |
85 | # do nothing | |
86 | ;; | |
87 | TARGET_ABI_DIR=*) | |
88 | # do nothing | |
89 | ;; | |
90 | TARGET_ARCH2=*) | |
91 | # do nothing | |
92 | ;; | |
2358a494 JQ |
93 | TARGET_DIRS=*) |
94 | # do nothing | |
95 | ;; | |
42bc608b JQ |
96 | TARGET_*=y) # configuration |
97 | name=${line%=*} | |
98 | echo "#define $name 1" | |
99 | ;; | |
100 | TARGET_*=*) # configuration | |
101 | name=${line%=*} | |
102 | value=${line#*=} | |
103 | echo "#define $name $value" | |
104 | ;; | |
42bc608b JQ |
105 | esac |
106 | ||
107 | done # read |