Rev 563 | Rev 769 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 563 | Rev 621 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | # $Id: Makefile |
1 | # $Id: Makefile 621 2007-08-25 07:48:57Z noddan $ |
| 2 | BIOS_VERSION = 0x1338 |
2 | BIOS_VERSION = 0x1338 |
| 3 | 3 | ||
| 4 | # Paths: set default pathnames if they are not |
4 | # Paths: set default pathnames if they are not |
| 5 | # passed on from parent Makefile. |
5 | # passed on from parent Makefile. |
| 6 | ifndef TARGET |
6 | ifndef TARGET |
| Line 157... | Line 157... | ||
| 157 | SIZE = avr-size |
157 | SIZE = avr-size |
| 158 | NM = avr-nm |
158 | NM = avr-nm |
| 159 | RM = rm -f |
159 | RM = rm -f |
| 160 | CP = cp |
160 | CP = cp |
| 161 | MKDIR = mkdir |
161 | MKDIR = mkdir |
| - | 162 | AR = avr-ar |
|
| 162 | 163 | ||
| 163 | 164 | ||
| 164 | 165 | ||
| 165 | # Define Messages |
166 | # Define Messages |
| 166 | # English |
167 | # English |
| Line 219... | Line 220... | ||
| 219 | @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
220 | @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
| 220 | 221 | ||
| 221 | # Generate config.h from bios.inc |
222 | # Generate config.h from bios.inc |
| 222 | config.h: $(CFGDIR)/bios.inc |
223 | config.h: $(CFGDIR)/bios.inc |
| 223 | @echo Generating $@ |
224 | @echo Generating $@ |
| 224 | @echo "/* This file is automatically generated. Do not edit. */ |
225 | @echo "/* This file is automatically generated. Do not edit. */" > $@ |
| - | 226 | @echo "" >> $@ |
|
| 225 | @cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@ |
227 | @cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@ |
| 226 | 228 | ||
| 227 | # Display compiler version information. |
229 | # Display compiler version information. |
| 228 | gccversion : |
230 | gccversion : |
| 229 | @$(CC) --version |
231 | @$(CC) --version |
| Line 280... | Line 282... | ||
| 280 | @echo Generating $@ |
282 | @echo Generating $@ |
| 281 | @$(AWK) '$$1 ~ /0x[0-9a-f]+/ && /BIOS_/ { print "\t.set "$$2","$$1"\n\t.global "$$2 }' $(TARGET).map > $@ |
283 | @$(AWK) '$$1 ~ /0x[0-9a-f]+/ && /BIOS_/ { print "\t.set "$$2","$$1"\n\t.global "$$2 }' $(TARGET).map > $@ |
| 282 | 284 | ||
| 283 | bios.h: $(LIBDIR)/drivers/can/can.h $(LIBDIR)/bios/bios_export.h |
285 | bios.h: $(LIBDIR)/drivers/can/can.h $(LIBDIR)/bios/bios_export.h |
| 284 | @echo Generating $@ |
286 | @echo Generating $@ |
| 285 | @echo "/* This file is automatically generated. Do not edit. */ |
287 | @echo "/* This file is automatically generated. Do not edit. */" > $@ |
| - | 288 | @echo "" >> $@ |
|
| - | 289 | @echo "#ifndef BIOS_H_" >> $@ |
|
| 286 | @echo " |
290 | @echo "#define BIOS_H_" >> $@ |
| - | 291 | @echo "" >> $@ |
|
| 287 | @cat $^ >> $@ |
292 | @cat $^ >> $@ |
| - | 293 | @echo "" >> $@ |
|
| 288 | @echo " |
294 | @echo "#endif /*BIOS_H_*/" >> $@ |
| 289 | 295 | ||
| 290 | lib: bios.h $(LIBNAME).a($(LIBNAME).o) |
296 | lib: bios.h $(LIBNAME).a($(LIBNAME).o) |
| 291 | 297 | ||
| 292 | # Compile: create object files from C source files. |
298 | # Compile: create object files from C source files. |
| 293 | %.o : %.c |
299 | %.o : %.c |