]>
Commit | Line | Data |
---|---|---|
69ed15f0 JR |
1 | --- configure.ac 2013-01-23 18:51:11.000000000 +0530 |
2 | +++ configure.ac 2013-01-23 18:43:51.000000000 +0530 | |
3 | @@ -1257,6 +1257,18 @@ AC_CONFIG_FILES([ | |
4 | avr/lib/avr2/at86rf401/Makefile | |
5 | ]) | |
6 | ||
7 | +#avr2/tiny-stack | |
8 | +AC_CONFIG_FILES([ | |
9 | + avr/lib/avr2/tiny-stack/Makefile | |
10 | + avr/lib/avr2/tiny-stack/at90s2313/Makefile | |
11 | + avr/lib/avr2/tiny-stack/at90s2323/Makefile | |
12 | + avr/lib/avr2/tiny-stack/at90s2333/Makefile | |
13 | + avr/lib/avr2/tiny-stack/at90s2343/Makefile | |
14 | + avr/lib/avr2/tiny-stack/at90s4433/Makefile | |
15 | + avr/lib/avr2/tiny-stack/attiny22/Makefile | |
16 | + avr/lib/avr2/tiny-stack/attiny26/Makefile | |
17 | +]) | |
18 | + | |
19 | #avr25 | |
20 | AC_CONFIG_FILES([ | |
21 | avr/lib/avr25/Makefile | |
22 | @@ -1289,6 +1301,20 @@ AC_CONFIG_FILES([ | |
23 | avr/lib/avr25/attiny88/Makefile | |
24 | ]) | |
25 | ||
26 | +#avr25/tiny-stack | |
27 | +AC_CONFIG_FILES([ | |
28 | + avr/lib/avr25/tiny-stack/Makefile | |
29 | + avr/lib/avr25/tiny-stack/attiny13/Makefile | |
30 | + avr/lib/avr25/tiny-stack/attiny13a/Makefile | |
31 | + avr/lib/avr25/tiny-stack/attiny2313/Makefile | |
32 | + avr/lib/avr25/tiny-stack/attiny2313a/Makefile | |
33 | + avr/lib/avr25/tiny-stack/attiny24/Makefile | |
34 | + avr/lib/avr25/tiny-stack/attiny24a/Makefile | |
35 | + avr/lib/avr25/tiny-stack/attiny25/Makefile | |
36 | + avr/lib/avr25/tiny-stack/attiny261/Makefile | |
37 | + avr/lib/avr25/tiny-stack/attiny261a/Makefile | |
38 | +]) | |
39 | + | |
40 | #avr3 | |
41 | AC_CONFIG_FILES([ | |
42 | avr/lib/avr3/Makefile | |
43 | --- devtools/gen-avr-lib-tree.sh 2013-01-23 19:14:33.000000000 +0530 | |
44 | +++ devtools/gen-avr-lib-tree.sh 2013-01-23 19:14:47.000000000 +0530 | |
45 | @@ -44,6 +44,7 @@ | |
46 | # Define the special flags for special sub-targets. | |
47 | ||
48 | CFLAGS_SPACE="-mcall-prologues -Os" | |
49 | +CFLAGS_TINY_STACK="-mtiny-stack -mcall-prologues -Os" | |
50 | CFLAGS_BIG_MEMORY='-Os $(FNO_JUMP_TABLES)' | |
51 | CFLAGS_SPEED="-Os" | |
52 | ||
53 | @@ -81,6 +82,17 @@ attiny461:crttn461.o:${DEV_DEFS}:${CFLAG | |
54 | attiny861:crttn861.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\ | |
55 | " | |
56 | ||
57 | + | |
58 | +AVR12TS_DEV_INFO="\ | |
59 | +at90s2313:crts2313.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
60 | +at90s2323:crts2323.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
61 | +at90s2333:crts2333.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
62 | +at90s2343:crts2343.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
63 | +at90s4433:crts4433.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
64 | +attiny22:crttn22.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
65 | +attiny26:crttn26.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS}\ | |
66 | +" | |
67 | + | |
68 | AVR25_DEV_INFO="\ | |
69 | at86rf401:crt86401.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
70 | ata5272:crta5272.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
71 | @@ -110,6 +122,18 @@ attiny861a:crttn861a.o:${DEV_DEFS}:${CFL | |
72 | attiny87:crttn87.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
73 | attiny88:crttn88.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\ | |
74 | " | |
75 | +AVR25TS_DEV_INFO="\ | |
76 | +attiny13:crttn13.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
77 | +attiny13a:crttn13a.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
78 | +attiny2313:crttn2313.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
79 | +attiny2313a:crttn2313a.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
80 | +attiny24:crttn24.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
81 | +attiny24a:crttn24a.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
82 | +attiny25:crttn25.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
83 | +attiny261:crttn261.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
84 | +attiny261a:crttn261a.o:${DEV_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS}\ | |
85 | +" | |
86 | + | |
87 | ||
88 | AVR3_DEV_INFO="\ | |
89 | atmega103:crtm103.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
90 | @@ -364,22 +388,24 @@ attiny40:crttn40.o:${DEV_DEFS}:${CFLAGS_ | |
91 | LIB_DEFS="-D__COMPILING_AVR_LIBC__" | |
92 | ||
93 | AVR_ARH_INFO="\ | |
94 | -avr2:AVR12_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
95 | -avr25:AVR25_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
96 | -avr3:AVR3_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
97 | -avr31:AVR31_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
98 | -avr35:AVR35_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
99 | -avr4:AVR4_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
100 | -avr5:AVR5_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
101 | -avr51:AVR51_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
102 | -avr6:AVR6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
103 | -avr7:AVR7_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
104 | -avrxmega2:AVRXMEGA2_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
105 | -avrxmega4:AVRXMEGA4_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
106 | -avrxmega5:AVRXMEGA5_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
107 | -avrxmega6:AVRXMEGA6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
108 | -avrxmega7:AVRXMEGA7_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
109 | -avrtiny:AVRTINY_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\ | |
110 | +avr2::AVR12_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
111 | +avr2:tiny-stack:AVR12TS_DEV_INFO:${LIB_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
112 | +avr25::AVR25_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
113 | +avr25:tiny-stack:AVR25TS_DEV_INFO:${LIB_DEFS}:${CFLAGS_TINY_STACK}:${DEV_ASFLAGS};\ | |
114 | +avr3::AVR3_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
115 | +avr31::AVR31_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
116 | +avr35::AVR35_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
117 | +avr4::AVR4_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
118 | +avr5::AVR5_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
119 | +avr51::AVR51_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
120 | +avr6::AVR6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
121 | +avr7::AVR7_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
122 | +avrxmega2::AVRXMEGA2_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\ | |
123 | +avrxmega4::AVRXMEGA4_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
124 | +avrxmega5::AVRXMEGA5_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
125 | +avrxmega6::AVRXMEGA6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
126 | +avrxmega7::AVRXMEGA7_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\ | |
127 | +avrtiny::AVRTINY_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\ | |
128 | " | |
129 | ||
130 | echo "Generating source directories:" | |
131 | @@ -414,21 +440,38 @@ ARH_SUBDIRS="" | |
132 | for ath_lib in $AVR_ARH_INFO | |
133 | do | |
134 | arh=$(echo $ath_lib | cut -d ':' -f 1) | |
135 | - dev_info=$(echo $ath_lib | cut -d ':' -f 2) | |
136 | - lib_defs=$(echo $ath_lib | cut -d ':' -f 3) | |
137 | - lib_cflags=$(echo $ath_lib | cut -d ':' -f 4) | |
138 | - lib_asflags=$(echo $ath_lib | cut -d ':' -f 5) | |
139 | + sublib=$(echo $ath_lib | cut -d ':' -f 2) | |
140 | + dev_info=$(echo $ath_lib | cut -d ':' -f 3) | |
141 | + lib_defs=$(echo $ath_lib | cut -d ':' -f 4) | |
142 | + lib_cflags=$(echo $ath_lib | cut -d ':' -f 5) | |
143 | + lib_asflags=$(echo $ath_lib | cut -d ':' -f 6) | |
144 | ||
145 | install_dir=$arh | |
146 | if [ $arh = avr2 ] | |
147 | then | |
148 | - install_dir="" | |
149 | + if [ -z "$sublib" ] ; then | |
150 | + install_dir="" | |
151 | + else | |
152 | + install_dir=$sublib | |
153 | + fi | |
154 | + else | |
155 | + if [ -z "$sublib" ] ; then | |
156 | + install_dir=$arh | |
157 | + else | |
158 | + install_dir=$arh'/'$sublib | |
159 | + fi | |
160 | fi | |
161 | ||
162 | - echo " avr/lib/$arh/" | |
163 | + # Install directory for sed substitution, the '/' character is masked. | |
164 | + inst_dir_masked=`echo $install_dir | sed 's/\\//\\\\\\//'` | |
165 | ||
166 | - test -d $arh || mkdir $arh | |
167 | - cd $arh || exit 1 | |
168 | + # In build tree. | |
169 | + subdir=${arh}${sublib:+/}${sublib} | |
170 | + echo " avr/lib/$subdir/" | |
171 | + | |
172 | + # The first record of each arch must be sublib-free. | |
173 | + test -d $subdir || mkdir $subdir | |
174 | + cd $subdir || exit 1 | |
175 | ||
176 | DEV_SUBDIRS="" | |
177 | ||
178 | @@ -442,7 +485,7 @@ do | |
179 | crt_cflags=$(echo $dev_crt | cut -d ':' -f 4) | |
180 | crt_asflags=$(echo $dev_crt | cut -d ':' -f 5) | |
181 | ||
182 | - echo " avr/lib/$arh/$dev" | |
183 | + echo " avr/lib/$subdir/$dev" | |
184 | ||
185 | test -d $dev || mkdir $dev | |
186 | ||
187 | @@ -453,7 +496,7 @@ do | |
188 | -e "s/<<crt_defs>>/$crt_defs/g" \ | |
189 | -e "s/<<crt_cflags>>/$crt_cflags/g" \ | |
190 | -e "s/<<crt_asflags>>/$crt_asflags/g" \ | |
191 | - -e "s/<<install_dir>>/$install_dir/g" $dev/Makefile.am \ | |
192 | + -e "s/<<install_dir>>/$inst_dir_masked/g" $dev/Makefile.am \ | |
193 | > $dev/tempfile && mv -f $dev/tempfile $dev/Makefile.am | |
194 | ||
195 | DEV_SUBDIRS="$DEV_SUBDIRS $dev" | |
196 | @@ -466,7 +509,7 @@ do | |
197 | -e "s/<<lib_defs>>/$lib_defs/g" \ | |
198 | -e "s/<<lib_cflags>>/$lib_cflags/g" \ | |
199 | -e "s/<<lib_asflags>>/$lib_asflags/g" \ | |
200 | - -e "s/<<install_dir>>/$install_dir/g" Makefile.am \ | |
201 | + -e "s/<<install_dir>>/$inst_dir_masked/g" Makefile.am \ | |
202 | > tempfile && mv -f tempfile Makefile.am | |
203 | ||
204 | # Find the first and the last lines of <<dev>> block. | |
205 | @@ -488,19 +531,22 @@ do | |
206 | ||
207 | # After the <<dev>> block. | |
208 | tail -n +$(($n2 + 1)) Makefile.am >> tempfile | |
209 | - | |
210 | + | |
211 | # Result. | |
212 | mv -f tempfile Makefile.am | |
213 | ||
214 | - ARH_SUBDIRS="$ARH_SUBDIRS $arh" | |
215 | + ARH_SUBDIRS="$ARH_SUBDIRS $subdir" | |
216 | ||
217 | - cd .. | |
218 | + cd .. || exit 1 | |
219 | + if [ -n "$sublib" ] ; then | |
220 | + cd .. || exit 1 | |
221 | + fi | |
222 | done | |
223 | ||
224 | cat $top_dir/devtools/Lib.am > Makefile.am | |
225 | ||
226 | -sed -e "s/<<arh_subdirs>>/$ARH_SUBDIRS/g" Makefile.am \ | |
227 | - > tempfile && mv -f tempfile Makefile.am | |
228 | +sed -e "s/<<arh_subdirs>>/`echo $ARH_SUBDIRS | sed 's/\\//\\\\\\//g'`/g" \ | |
229 | + Makefile.am > tempfile && mv -f tempfile Makefile.am | |
230 | ||
231 | cd .. | |
232 |