root / create_config @ 44e4c0ba
History | View | Annotate | Download (2.1 kB)
1 | 42bc608b | Juan Quintela | #!/bin/sh |
---|---|---|---|
2 | 42bc608b | Juan Quintela | |
3 | 1215c6e7 | Juan Quintela | echo "/* Automatically generated by create_config - do not modify */" |
4 | 1215c6e7 | Juan Quintela | |
5 | 42bc608b | Juan Quintela | while read line; do |
6 | 42bc608b | Juan Quintela | |
7 | 42bc608b | Juan Quintela | case $line in |
8 | 2358a494 | Juan Quintela | VERSION=*) # configuration |
9 | 2358a494 | Juan Quintela | version=${line#*=} |
10 | 2358a494 | Juan Quintela | echo "#define QEMU_VERSION \"$version\"" |
11 | 2358a494 | Juan Quintela | ;; |
12 | 2358a494 | Juan Quintela | PKGVERSION=*) # configuration |
13 | 2358a494 | Juan Quintela | pkgversion=${line#*=} |
14 | 2358a494 | Juan Quintela | echo "#define QEMU_PKGVERSION \"$pkgversion\"" |
15 | 2358a494 | Juan Quintela | ;; |
16 | 2358a494 | Juan Quintela | ARCH=*) # configuration |
17 | 2358a494 | Juan Quintela | arch=${line#*=} |
18 | 2358a494 | Juan Quintela | arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'` |
19 | 2358a494 | Juan Quintela | echo "#define HOST_$arch_name 1" |
20 | 2358a494 | Juan Quintela | ;; |
21 | 2358a494 | Juan Quintela | CONFIG_AUDIO_DRIVERS=*) |
22 | 2358a494 | Juan Quintela | drivers=${line#*=} |
23 | 2358a494 | Juan Quintela | echo "#define CONFIG_AUDIO_DRIVERS \\" |
24 | 2358a494 | Juan Quintela | for drv in $drivers; do |
25 | 2358a494 | Juan Quintela | echo " &${drv}_audio_driver,\\" |
26 | 2358a494 | Juan Quintela | done |
27 | 2358a494 | Juan Quintela | echo "" |
28 | 2358a494 | Juan Quintela | ;; |
29 | eb852011 | Markus Armbruster | CONFIG_BDRV_WHITELIST=*) |
30 | eb852011 | Markus Armbruster | echo "#define CONFIG_BDRV_WHITELIST \\" |
31 | eb852011 | Markus Armbruster | for drv in ${line#*=}; do |
32 | eb852011 | Markus Armbruster | echo " \"${drv}\",\\" |
33 | eb852011 | Markus Armbruster | done |
34 | eb852011 | Markus Armbruster | echo " NULL" |
35 | eb852011 | Markus Armbruster | ;; |
36 | 42bc608b | Juan Quintela | CONFIG_*=y) # configuration |
37 | 42bc608b | Juan Quintela | name=${line%=*} |
38 | 42bc608b | Juan Quintela | echo "#define $name 1" |
39 | 42bc608b | Juan Quintela | ;; |
40 | 42bc608b | Juan Quintela | CONFIG_*=*) # configuration |
41 | 42bc608b | Juan Quintela | name=${line%=*} |
42 | 42bc608b | Juan Quintela | value=${line#*=} |
43 | 42bc608b | Juan Quintela | echo "#define $name $value" |
44 | 42bc608b | Juan Quintela | ;; |
45 | 2358a494 | Juan Quintela | ARCH=*) # configuration |
46 | 2358a494 | Juan Quintela | arch=${line#*=} |
47 | 2358a494 | Juan Quintela | arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'` |
48 | 2358a494 | Juan Quintela | echo "#define HOST_$arch_name 1" |
49 | 2358a494 | Juan Quintela | ;; |
50 | 2358a494 | Juan Quintela | HOST_USB=*) |
51 | 2358a494 | Juan Quintela | # do nothing |
52 | 2358a494 | Juan Quintela | ;; |
53 | 2358a494 | Juan Quintela | HOST_CC=*) |
54 | 2358a494 | Juan Quintela | # do nothing |
55 | 2358a494 | Juan Quintela | ;; |
56 | 2358a494 | Juan Quintela | HOST_*=y) # configuration |
57 | 2358a494 | Juan Quintela | name=${line%=*} |
58 | 2358a494 | Juan Quintela | echo "#define $name 1" |
59 | 2358a494 | Juan Quintela | ;; |
60 | 2358a494 | Juan Quintela | HOST_*=*) # configuration |
61 | 2358a494 | Juan Quintela | name=${line%=*} |
62 | 2358a494 | Juan Quintela | value=${line#*=} |
63 | 2358a494 | Juan Quintela | echo "#define $name $value" |
64 | 2358a494 | Juan Quintela | ;; |
65 | 42bc608b | Juan Quintela | TARGET_ARCH=*) # configuration |
66 | 42bc608b | Juan Quintela | target_arch=${line#*=} |
67 | 42bc608b | Juan Quintela | echo "#define TARGET_ARCH \"$target_arch\"" |
68 | 42bc608b | Juan Quintela | ;; |
69 | 42bc608b | Juan Quintela | TARGET_BASE_ARCH=*) # configuration |
70 | 42bc608b | Juan Quintela | target_base_arch=${line#*=} |
71 | 42bc608b | Juan Quintela | if [ "$target_base_arch" != "$target_arch" ]; then |
72 | 42bc608b | Juan Quintela | base_arch_name=`echo $target_base_arch | tr '[:lower:]' '[:upper:]'` |
73 | 42bc608b | Juan Quintela | echo "#define TARGET_$base_arch_name 1" |
74 | 42bc608b | Juan Quintela | fi |
75 | 42bc608b | Juan Quintela | ;; |
76 | 42bc608b | Juan Quintela | TARGET_XML_FILES=*) |
77 | 42bc608b | Juan Quintela | # do nothing |
78 | 42bc608b | Juan Quintela | ;; |
79 | 42bc608b | Juan Quintela | TARGET_ABI_DIR=*) |
80 | 42bc608b | Juan Quintela | # do nothing |
81 | 42bc608b | Juan Quintela | ;; |
82 | 42bc608b | Juan Quintela | TARGET_ARCH2=*) |
83 | 42bc608b | Juan Quintela | # do nothing |
84 | 42bc608b | Juan Quintela | ;; |
85 | 2358a494 | Juan Quintela | TARGET_DIRS=*) |
86 | 2358a494 | Juan Quintela | # do nothing |
87 | 2358a494 | Juan Quintela | ;; |
88 | 42bc608b | Juan Quintela | TARGET_*=y) # configuration |
89 | 42bc608b | Juan Quintela | name=${line%=*} |
90 | 42bc608b | Juan Quintela | echo "#define $name 1" |
91 | 42bc608b | Juan Quintela | ;; |
92 | 42bc608b | Juan Quintela | TARGET_*=*) # configuration |
93 | 42bc608b | Juan Quintela | name=${line%=*} |
94 | 42bc608b | Juan Quintela | value=${line#*=} |
95 | 42bc608b | Juan Quintela | echo "#define $name $value" |
96 | 42bc608b | Juan Quintela | ;; |
97 | 42bc608b | Juan Quintela | esac |
98 | 42bc608b | Juan Quintela | |
99 | 42bc608b | Juan Quintela | done # read |