Rev 621 | Rev 773 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 621 | Rev 769 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | # $Id: Makefile |
1 | # $Id: Makefile 769 2008-04-28 20:34:34Z arune $ |
| 2 | BIOS_VERSION = |
2 | BIOS_VERSION = 0x1339 |
| 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 |
| 7 | TARGET = bios |
7 | TARGET = bios |
| Line 158... | Line 158... | ||
| 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 | AR = avr-ar |
| - | 163 | UUIDGEN = uuidgen |
|
| - | 164 | MD5SUM = md5sum |
|
| 163 | 165 | CUT = cut |
|
| - | 166 | GREP = grep |
|
| 164 | 167 | ||
| 165 | 168 | ||
| 166 | # Define Messages |
169 | # Define Messages |
| 167 | # English |
170 | # English |
| 168 | MSG_ERRORS_NONE = Errors: none |
171 | MSG_ERRORS_NONE = Errors: none |
| Line 218... | Line 221... | ||
| 218 | 221 | ||
| 219 | sizeafter: |
222 | sizeafter: |
| 220 | @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
223 | @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi |
| 221 | 224 | ||
| 222 | # Generate config.h from bios.inc |
225 | # Generate config.h from bios.inc |
| - | 226 | HWID = `$(UUIDGEN) | $(MD5SUM) | $(CUT) -c 1-8` |
|
| 223 | config.h: $(CFGDIR)/bios.inc |
227 | config.h: $(CFGDIR)/bios.inc |
| 224 | @echo Generating $@ |
228 | @echo Generating $@ |
| 225 | @echo "/* This file is automatically generated. Do not edit. */" > $@ |
229 | @echo "/* This file is automatically generated. Do not edit. */" > $@ |
| 226 | @echo "" >> $@ |
230 | @echo "" >> $@ |
| - | 231 | @echo -n "#ifndef CONFIG_H_\n#define CONFIG_H_\n\n" >> $@ |
|
| 227 | @cat $^ | $(AWK) |
232 | @cat $^ | $(GREP) "<GENERATE_HW>" | $(AWK) -v apa=0x$(HWID) 'BEGIN { FS="=" } /^[^#].*=.*/ { print "#define "$$1,apa } END { }' >> $@ |
| - | 233 | @cat $^ | $(GREP) -v "<GENERATE_HW>" | $(AWK) 'BEGIN { FS="=" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { }' >> $@ |
|
| - | 234 | @echo -n "\n#endif /*CONFIG_H_*/\n" >> $@ |
|
| 228 | 235 | ||
| 229 | # Display compiler version information. |
236 | # Display compiler version information. |
| 230 | gccversion : |
237 | gccversion : |
| 231 | @$(CC) --version |
238 | @$(CC) --version |
| 232 | 239 | ||