Rev 479 | Rev 563 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 479 | Rev 483 | ||
|---|---|---|---|
| Line 8... | Line 8... | ||
| 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/mcu/mcu.c\ |
12 | $(LIBDIR)/drivers/mcu/mcu.c\ |
| 13 | $(LIBDIR)/drivers/sensor/tc1047/tc1047. |
13 | $(LIBDIR)/drivers/sensor/tc1047/tc1047.c\ |
| 14 | 14 | ||
| 15 | # List Assembler source files here. |
15 | # List Assembler source files here. |
| 16 | # 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 |
| 17 | # will not be considered source files but generated files (assembler |
17 | # will not be considered source files but generated files (assembler |
| 18 | # output from the compiler), and will be deleted upon "make clean"! |
18 | # output from the compiler), and will be deleted upon "make clean"! |
| Line 34... | Line 34... | ||
| 34 | DEBUG = stabs |
34 | DEBUG = stabs |
| 35 | #DEBUG = dwarf-2 |
35 | #DEBUG = dwarf-2 |
| 36 | 36 | ||
| 37 | # List any extra directories to look for include files here. |
37 | # List any extra directories to look for include files here. |
| 38 | # Each directory must be seperated by a space. |
38 | # Each directory must be seperated by a space. |
| 39 | EXTRAINCDIRS = $(LIBDIR) |
39 | EXTRAINCDIRS = $(LIBDIR) |
| - | 40 | ||
| 40 | $(LIBDIR)/ |
41 | # $(LIBDIR)/drivers/sensor/tc1047\ |
| 41 | $(LIBDIR)/ |
42 | # $(LIBDIR)/funcdefs\ |
| 42 | 43 | ||
| 43 | # Compiler flag to set the C Standard level. |
44 | # Compiler flag to set the C Standard level. |
| 44 | # c89 - "ANSI" C |
45 | # c89 - "ANSI" C |
| 45 | # gnu89 - c89 plus GCC extensions |
46 | # gnu89 - c89 plus GCC extensions |
| 46 | # c99 - ISO C99 standard (not yet fully implemented) |
47 | # c99 - ISO C99 standard (not yet fully implemented) |
| Line 139... | Line 140... | ||
| 139 | 140 | ||
| 140 | 141 | ||
| 141 | # Define programs and commands. |
142 | # Define programs and commands. |
| 142 | SHELL = sh |
143 | SHELL = sh |
| 143 | CC = avr-gcc |
144 | CC = avr-gcc |
| - | 145 | AWK = awk |
|
| 144 | OBJCOPY = avr-objcopy |
146 | OBJCOPY = avr-objcopy |
| 145 | OBJDUMP = avr-objdump |
147 | OBJDUMP = avr-objdump |
| 146 | SIZE = avr-size |
148 | SIZE = avr-size |
| 147 | NM = avr-nm |
149 | NM = avr-nm |
| 148 | REMOVE = rm -f |
150 | REMOVE = rm -f |
| Line 241... | Line 243... | ||
| 241 | 243 | ||
| 242 | # Generate config.h from bios.inc and config.inc |
244 | # Generate config.h from bios.inc and config.inc |
| 243 | config.h: bios.inc config.inc |
245 | config.h: bios.inc config.inc |
| 244 | @echo Generating $@ |
246 | @echo Generating $@ |
| 245 | @echo "/* This file is automatically generated. Do not edit. */\n" > $@ |
247 | @echo "/* This file is automatically generated. Do not edit. */\n" > $@ |
| 246 | @cat $^ | |
248 | @cat $^ | $(AWK) 'BEGIN { FS="="; print "#ifndef CONFIG_H_\n#define CONFIG_H_\n" } /^[^#].*=.*/ { print "#define "$$1,$$2 } END { print "\n#endif /*CONFIG_H_*/" }' >> $@ |
| 247 | 249 | ||
| 248 | # Display compiler version information. |
250 | # Display compiler version information. |
| 249 | gccversion : |
251 | gccversion : |
| 250 | @$(CC) --version |
252 | @$(CC) --version |
| 251 | 253 | ||
| Line 302... | Line 304... | ||
| 302 | ifneq (,$(filter atmega88 atmega168, $(MCU))) |
304 | ifneq (,$(filter atmega88 atmega168, $(MCU))) |
| 303 | %.elf: $(OBJ) |
305 | %.elf: $(OBJ) |
| 304 | @echo |
306 | @echo |
| 305 | @echo $(MSG_LINKING) $@ |
307 | @echo $(MSG_LINKING) $@ |
| 306 | @echo GCC bug workaround for ATmega88/ATmega168: |
308 | @echo GCC bug workaround for ATmega88/ATmega168: |
| 307 | eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | |
309 | eval $$($(CC) -v $(CFLAGS) -o $@ $^ $(LDFLAGS) 2>&1 | $(AWK) '{ if (gsub("0x800100","$(BIOS_RAM_END)") == 1) print }') |
| 308 | else |
310 | else |
| 309 | %.elf: $(OBJ) |
311 | %.elf: $(OBJ) |
| 310 | @echo |
312 | @echo |
| 311 | @echo $(MSG_LINKING) $@ |
313 | @echo $(MSG_LINKING) $@ |
| 312 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |
314 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |