]>
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 | ;; | |
16 | ARCH=*) # configuration | |
17 | arch=${line#*=} | |
18 | arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'` | |
19 | echo "#define HOST_$arch_name 1" | |
20 | ;; | |
2358a494 JQ |
21 | CONFIG_AUDIO_DRIVERS=*) |
22 | drivers=${line#*=} | |
23 | echo "#define CONFIG_AUDIO_DRIVERS \\" | |
24 | for drv in $drivers; do | |
25 | echo " &${drv}_audio_driver,\\" | |
26 | done | |
27 | echo "" | |
28 | ;; | |
42bc608b JQ |
29 | CONFIG_*=y) # configuration |
30 | name=${line%=*} | |
31 | echo "#define $name 1" | |
32 | ;; | |
33 | CONFIG_*=*) # configuration | |
34 | name=${line%=*} | |
35 | value=${line#*=} | |
36 | echo "#define $name $value" | |
37 | ;; | |
2358a494 JQ |
38 | ARCH=*) # configuration |
39 | arch=${line#*=} | |
40 | arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'` | |
41 | echo "#define HOST_$arch_name 1" | |
42 | ;; | |
43 | HOST_USB=*) | |
44 | # do nothing | |
45 | ;; | |
46 | HOST_CC=*) | |
47 | # do nothing | |
48 | ;; | |
49 | HOST_*=y) # configuration | |
50 | name=${line%=*} | |
51 | echo "#define $name 1" | |
52 | ;; | |
53 | HOST_*=*) # configuration | |
54 | name=${line%=*} | |
55 | value=${line#*=} | |
56 | echo "#define $name $value" | |
57 | ;; | |
42bc608b JQ |
58 | TARGET_ARCH=*) # configuration |
59 | target_arch=${line#*=} | |
42bc608b | 60 | echo "#define TARGET_ARCH \"$target_arch\"" |
42bc608b JQ |
61 | ;; |
62 | TARGET_BASE_ARCH=*) # configuration | |
63 | target_base_arch=${line#*=} | |
64 | if [ "$target_base_arch" != "$target_arch" ]; then | |
65 | base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'` | |
66 | echo "#define TARGET_$base_arch_name 1" | |
67 | fi | |
68 | ;; | |
69 | TARGET_XML_FILES=*) | |
70 | # do nothing | |
71 | ;; | |
72 | TARGET_ABI_DIR=*) | |
73 | # do nothing | |
74 | ;; | |
75 | TARGET_ARCH2=*) | |
76 | # do nothing | |
77 | ;; | |
2358a494 JQ |
78 | TARGET_DIRS=*) |
79 | # do nothing | |
80 | ;; | |
42bc608b JQ |
81 | TARGET_*=y) # configuration |
82 | name=${line%=*} | |
83 | echo "#define $name 1" | |
84 | ;; | |
85 | TARGET_*=*) # configuration | |
86 | name=${line%=*} | |
87 | value=${line#*=} | |
88 | echo "#define $name $value" | |
89 | ;; | |
42bc608b JQ |
90 | esac |
91 | ||
92 | done # read |