Rev 375 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 375 | Rev 468 | ||
|---|---|---|---|
| Line 137... | Line 137... | ||
| 137 | 137 | ||
| 138 | 138 | ||
| 139 | # Define programs and commands. |
139 | # Define programs and commands. |
| 140 | SHELL = sh |
140 | SHELL = sh |
| 141 | CC = avr-gcc |
141 | CC = avr-gcc |
| - | 142 | AWK = awk |
|
| 142 | OBJCOPY = avr-objcopy |
143 | OBJCOPY = avr-objcopy |
| 143 | OBJDUMP = avr-objdump |
144 | OBJDUMP = avr-objdump |
| 144 | SIZE = avr-size |
145 | SIZE = avr-size |
| 145 | NM = avr-nm |
146 | NM = avr-nm |
| 146 | REMOVE = rm -f |
147 | REMOVE = rm -f |
| Line 231... | Line 232... | ||
| 231 | 232 | ||
| 232 | # Generate config.h from bios.inc and config.inc |
233 | # Generate config.h from bios.inc and config.inc |
| 233 | config.h: bios.inc config.inc |
234 | config.h: bios.inc config.inc |
| 234 | @echo Generating $@ |
235 | @echo Generating $@ |
| 235 | @echo "/* This file is automatically generated. Do not edit. */\n" > $@ |
236 | @echo "/* This file is automatically generated. Do not edit. */\n" > $@ |
| 236 | @cat $^ | |
237 | @cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@ |
| 237 | 238 | ||
| 238 | # Display compiler version information. |
239 | # Display compiler version information. |
| 239 | gccversion : |
240 | gccversion : |
| 240 | @$(CC) --version |
241 | @$(CC) --version |
| 241 | 242 | ||
| Line 292... | Line 293... | ||
| 292 | ifneq (,$(filter atmega88 atmega168, $(MCU))) |
293 | ifneq (,$(filter atmega88 atmega168, $(MCU))) |
| 293 | %.elf: $(OBJ) |
294 | %.elf: $(OBJ) |
| 294 | @echo |
295 | @echo |
| 295 | @echo $(MSG_LINKING) $@ |
296 | @echo $(MSG_LINKING) $@ |
| 296 | @echo GCC bug workaround for ATmega88/ATmega168: |
297 | @echo GCC bug workaround for ATmega88/ATmega168: |
| 297 | eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | |
298 | eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | $(AWK) '{ if (gsub("0x800100","$(BIOS_RAM_END)") == 1) print }') |
| 298 | else |
299 | else |
| 299 | %.elf: $(OBJ) |
300 | %.elf: $(OBJ) |
| 300 | @echo |
301 | @echo |
| 301 | @echo $(MSG_LINKING) $@ |
302 | @echo $(MSG_LINKING) $@ |
| 302 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |
303 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |