Mercurial > hg-old > index.cgi
comparison lwasm/main.c @ 261:c79b3c88adbc 2.x
Added --depend option to generate a list of dependencies
author | lost |
---|---|
date | Sat, 26 Dec 2009 08:24:35 +0000 |
parents | e27279180a73 |
children |
comparison
equal
deleted
inserted
replaced
260:1bdb4e256fc9 | 261:c79b3c88adbc |
---|---|
88 break; | 88 break; |
89 | 89 |
90 case 0x100: | 90 case 0x100: |
91 // proprietary object format | 91 // proprietary object format |
92 as -> outformat = OUTPUT_OBJ; | 92 as -> outformat = OUTPUT_OBJ; |
93 break; | |
94 | |
95 case 0x101: | |
96 // dependency tracking | |
97 as -> deptrack = 1; | |
93 break; | 98 break; |
94 | 99 |
95 case 'f': | 100 case 'f': |
96 // output format | 101 // output format |
97 if (!strcasecmp(arg, "decb")) | 102 if (!strcasecmp(arg, "decb")) |
164 "Generate DECB .bin format output, equivalent of --format=decb"}, | 169 "Generate DECB .bin format output, equivalent of --format=decb"}, |
165 { "raw", 'r', 0, 0, | 170 { "raw", 'r', 0, 0, |
166 "Generate raw binary format output, equivalent of --format=raw"}, | 171 "Generate raw binary format output, equivalent of --format=raw"}, |
167 { "obj", 0x100, 0, 0, | 172 { "obj", 0x100, 0, 0, |
168 "Generate proprietary object file format for later linking, equivalent of --format=obj" }, | 173 "Generate proprietary object file format for later linking, equivalent of --format=obj" }, |
174 { "depend", 0x101, 0, 0, | |
175 "Output a dependency list to stdout; do not do any actual output though assembly is completed as usual" }, | |
169 { "pragma", 'p', "PRAGMA", 0, | 176 { "pragma", 'p', "PRAGMA", 0, |
170 "Set an assembler pragma to any value understood by the \"pragma\" pseudo op"}, | 177 "Set an assembler pragma to any value understood by the \"pragma\" pseudo op"}, |
171 { "6809", '9', 0, 0, | 178 { "6809", '9', 0, 0, |
172 "Set assembler to 6809 only mode" }, | 179 "Set assembler to 6809 only mode" }, |
173 { "6309", '3', 0, 0, | 180 { "6309", '3', 0, 0, |
219 | 226 |
220 // now make a pretty listing | 227 // now make a pretty listing |
221 lwasm_list(&asmstate); | 228 lwasm_list(&asmstate); |
222 | 229 |
223 // now write the code out to the output file | 230 // now write the code out to the output file |
224 lwasm_output(&asmstate); | 231 if (asmstate.deptrack) |
232 { | |
233 int i; | |
234 // list the files read (on includes) | |
235 for (i = 0; i < asmstate.nincfiles; i++) | |
236 { | |
237 printf("%s\n", asmstate.incfiles[i]); | |
238 } | |
239 } | |
240 else | |
241 { | |
242 lwasm_output(&asmstate); | |
243 } | |
225 | 244 |
226 if (asmstate.errorcount > 0) | 245 if (asmstate.errorcount > 0) |
227 exit(1); | 246 exit(1); |
228 | 247 |
229 exit(0); | 248 exit(0); |