Rev 478 | Rev 563 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 478 | Rev 481 | ||
|---|---|---|---|
| Line 7... | Line 7... | ||
| 7 | include $(LIBDIR)/system.inc |
7 | include $(LIBDIR)/system.inc |
| 8 | 8 | ||
| 9 | # List C source files here. (C dependencies are automatically generated.) |
9 | # List C source files here. (C dependencies are automatically generated.) |
| 10 | CSRC = $(TARGET).c\ |
10 | CSRC = $(TARGET).c\ |
| 11 | $(LIBDIR)/drivers/timer/timebase.c\ |
11 | $(LIBDIR)/drivers/timer/timebase.c\ |
| 12 | $(LIBDIR)/drivers/lcd/clcd/clcd20x4.c\ |
- | |
| 13 | $(LIBDIR)/drivers/lcd/clcd/lcd_HD44780.c\ |
12 | $(LIBDIR)/drivers/lcd/clcd/lcd_HD44780.c\ |
| 14 | $(LIBDIR)/drivers/mcu/mcu.c\ |
13 | $(LIBDIR)/drivers/mcu/mcu.c\ |
| 15 | 14 | ||
| 16 | # List Assembler source files here. |
15 | # List Assembler source files here. |
| 17 | # Make them always end in a capital .S. Files ending in a lowercase .s |
16 | # Make them always end in a capital .S. Files ending in a lowercase .s |
| Line 36... | Line 35... | ||
| 36 | #DEBUG = dwarf-2 |
35 | #DEBUG = dwarf-2 |
| 37 | 36 | ||
| 38 | # List any extra directories to look for include files here. |
37 | # List any extra directories to look for include files here. |
| 39 | # Each directory must be seperated by a space. |
38 | # Each directory must be seperated by a space. |
| 40 | EXTRAINCDIRS = $(LIBDIR)\ |
39 | EXTRAINCDIRS = $(LIBDIR)\ |
| 41 | $(LIBDIR)/ |
40 | $(LIBDIR)/drivers/lcd/clcd\ |
| 42 | $(LIBDIR)/drivers/ |
41 | $(LIBDIR)/drivers/timer\ |
| 43 | 42 | ||
| 44 | # Compiler flag to set the C Standard level. |
43 | # Compiler flag to set the C Standard level. |
| 45 | # c89 - "ANSI" C |
44 | # c89 - "ANSI" C |
| 46 | # gnu89 - c89 plus GCC extensions |
45 | # gnu89 - c89 plus GCC extensions |
| 47 | # c99 - ISO C99 standard (not yet fully implemented) |
46 | # c99 - ISO C99 standard (not yet fully implemented) |
| Line 140... | Line 139... | ||
| 140 | 139 | ||
| 141 | 140 | ||
| 142 | # Define programs and commands. |
141 | # Define programs and commands. |
| 143 | SHELL = sh |
142 | SHELL = sh |
| 144 | CC = avr-gcc |
143 | CC = avr-gcc |
| - | 144 | AWK = awk |
|
| 145 | OBJCOPY = avr-objcopy |
145 | OBJCOPY = avr-objcopy |
| 146 | OBJDUMP = avr-objdump |
146 | OBJDUMP = avr-objdump |
| 147 | SIZE = avr-size |
147 | SIZE = avr-size |
| 148 | NM = avr-nm |
148 | NM = avr-nm |
| 149 | REMOVE = rm -f |
149 | REMOVE = rm -f |
| Line 242... | Line 242... | ||
| 242 | 242 | ||
| 243 | # Generate config.h from bios.inc and config.inc |
243 | # Generate config.h from bios.inc and config.inc |
| 244 | config.h: bios.inc config.inc |
244 | config.h: bios.inc config.inc |
| 245 | @echo Generating $@ |
245 | @echo Generating $@ |
| 246 | @echo "/* This file is automatically generated. Do not edit. */\n" > $@ |
246 | @echo "/* This file is automatically generated. Do not edit. */\n" > $@ |
| 247 | @cat $^ | |
247 | @cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@ |
| 248 | 248 | ||
| 249 | # Display compiler version information. |
249 | # Display compiler version information. |
| 250 | gccversion : |
250 | gccversion : |
| 251 | @$(CC) --version |
251 | @$(CC) --version |
| 252 | 252 | ||
| Line 266... | Line 266... | ||
| 266 | 266 | ||
| 267 | extcoff: $(TARGET).elf |
267 | extcoff: $(TARGET).elf |
| 268 | @echo |
268 | @echo |
| 269 | @echo $(MSG_EXTENDED_COFF) $(TARGET).cof |
269 | @echo $(MSG_EXTENDED_COFF) $(TARGET).cof |
| 270 | $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof |
270 | $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof |
| 271 | - | ||
| 272 | - | ||
| 273 | 271 | ||
| 274 | # Create final output files (.hex, .eep) from ELF output file. |
272 | # Create final output files (.hex, .eep) from ELF output file. |
| 275 | %.hex: %.elf |
273 | %.hex: %.elf |
| 276 | @echo |
274 | @echo |
| 277 | @echo $(MSG_FLASH) $@ |
275 | @echo $(MSG_FLASH) $@ |
| Line 303... | Line 301... | ||
| 303 | ifneq (,$(filter atmega88 atmega168, $(MCU))) |
301 | ifneq (,$(filter atmega88 atmega168, $(MCU))) |
| 304 | %.elf: $(OBJ) |
302 | %.elf: $(OBJ) |
| 305 | @echo |
303 | @echo |
| 306 | @echo $(MSG_LINKING) $@ |
304 | @echo $(MSG_LINKING) $@ |
| 307 | @echo GCC bug workaround for ATmega88/ATmega168: |
305 | @echo GCC bug workaround for ATmega88/ATmega168: |
| 308 | eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | |
306 | eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | $(AWK) '{ if (gsub("0x800100","$(BIOS_RAM_END)") == 1) print }') |
| 309 | else |
307 | else |
| 310 | %.elf: $(OBJ) |
308 | %.elf: $(OBJ) |
| 311 | @echo |
309 | @echo |
| 312 | @echo $(MSG_LINKING) $@ |
310 | @echo $(MSG_LINKING) $@ |
| 313 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |
311 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |