Rev 385 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 385 | Rev 386 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | # Hey Emacs, this is a -*- makefile -*- |
1 | # Hey Emacs, this is a -*- makefile -*- |
| 2 | # |
2 | # |
| 3 | # WinAVR makefile written by Eric B. Weddington, |
3 | # WinAVR makefile written by Eric B. Weddington, Jrg Wunsch, et al. |
| 4 | # Released to the Public Domain |
4 | # Released to the Public Domain |
| 5 | # Please read the make user manual! |
5 | # Please read the make user manual! |
| 6 | # |
6 | # |
| 7 | # Additional material for this makefile was submitted by: |
7 | # Additional material for this makefile was submitted by: |
| 8 | # Tim Henigan |
8 | # Tim Henigan |
| Line 36... | Line 36... | ||
| 36 | # - DEPFLAGS according to Eric Weddingtion's fix (avrfreaks/gcc-forum) |
36 | # - DEPFLAGS according to Eric Weddingtion's fix (avrfreaks/gcc-forum) |
| 37 | # - F_OSC Define in CFLAGS and AFLAGS |
37 | # - F_OSC Define in CFLAGS and AFLAGS |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | # MCU name |
40 | # MCU name |
| 41 | #MCU = |
41 | #MCU = atmega8 |
| 42 |
|
42 | #MCU = atmega88 |
| 43 |
|
43 | MCU = atmega168 |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | # Main Oscillator Frequency |
46 | # Main Oscillator Frequency |
| 47 |
|
47 | #F_CPU = 1000000 |
| 48 | ##F_OSC = 1843200 |
- | |
| 49 | ##F_OSC = 2000000 |
- | |
| 50 | ##F_OSC = 3686400 |
- | |
| 51 | ##F_OSC = 4000000 |
- | |
| 52 |
|
48 | F_CPU = 8000000 |
| 53 |
|
49 | #F_CPU = 16000000 |
| 54 |
|
50 | #F_CPU = 20000000 |
| 55 | 51 | ||
| 56 | # Output format. (can be srec, ihex, binary) |
52 | # Output format. (can be srec, ihex, binary) |
| 57 | FORMAT = ihex |
53 | FORMAT = ihex |
| 58 | 54 | ||
| 59 | 55 | ||
| Line 64... | Line 60... | ||
| 64 | 60 | ||
| 65 | 61 | ||
| 66 | # List C source files here. (C dependencies are automatically generated.) |
62 | # List C source files here. (C dependencies are automatically generated.) |
| 67 | SRC = $(TARGET).c\ |
63 | SRC = $(TARGET).c\ |
| 68 | $(LIBDIR)mcu/mcu.c\ |
64 | $(LIBDIR)mcu/mcu.c\ |
| 69 | $(LIBDIR)mcu/serial.c\ |
- | |
| 70 | $(LIBDIR)mcu/uart.c\ |
- | |
| 71 | $(LIBDIR)mcu/timebase.c\ |
65 | $(LIBDIR)mcu/timebase.c\ |
| 72 | $(LIBDIR)can/can.c\ |
66 | $(LIBDIR)can/can.c\ |
| 73 | $(LIBDIR)can/mcp2515/mcp2515.c |
67 | $(LIBDIR)can/mcp2515/mcp2515.c |
| 74 | 68 | ||
| 75 | # List Assembler source files here. |
69 | # List Assembler source files here. |
| Line 126... | Line 120... | ||
| 126 | CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
120 | CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
| 127 | CFLAGS += -Wall -Wstrict-prototypes |
121 | CFLAGS += -Wall -Wstrict-prototypes |
| 128 | CFLAGS += -Wa,-adhlns=$(<:.c=.lst) |
122 | CFLAGS += -Wa,-adhlns=$(<:.c=.lst) |
| 129 | CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) |
123 | CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) |
| 130 | CFLAGS += $(CSTANDARD) |
124 | CFLAGS += $(CSTANDARD) |
| 131 | CFLAGS += - |
125 | CFLAGS += -DF_CPU=$(F_CPU) |
| 132 | 126 | ||
| 133 | 127 | ||
| 134 | 128 | ||
| 135 | # Assembler flags. |
129 | # Assembler flags. |
| 136 | # -Wa,...: tell GCC to pass this to the assembler. |
130 | # -Wa,...: tell GCC to pass this to the assembler. |
| Line 139... | Line 133... | ||
| 139 | # for use in COFF files, additional information about filenames |
133 | # for use in COFF files, additional information about filenames |
| 140 | # and function names needs to be present in the assembler source |
134 | # and function names needs to be present in the assembler source |
| 141 | # files -- see avr-libc docs [FIXME: not yet described there] |
135 | # files -- see avr-libc docs [FIXME: not yet described there] |
| 142 | ##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
136 | ##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs |
| 143 | ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG) |
137 | ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG) |
| 144 | ASFLAGS += - |
138 | ASFLAGS += -DF_CPU=$(F_CPU) |
| 145 | 139 | ||
| 146 | 140 | ||
| 147 | #Additional libraries. |
141 | #Additional libraries. |
| 148 | 142 | ||
| 149 | # Minimalistic printf version |
143 | # Minimalistic printf version |