Rev 389 | Rev 427 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 389 | Rev 426 | ||
|---|---|---|---|
| Line 37... | Line 37... | ||
| 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 = atmega32 |
41 | #MCU = atmega32 |
| 42 | MCU = |
42 | MCU = atmega168 |
| 43 | #MCU = atmega16 |
43 | #MCU = atmega16 |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | # Main Oscillator Frequency |
46 | # Main Oscillator Frequency |
| 47 |
|
47 | ##F_CPU = 1000000 |
| 48 |
|
48 | ##F_CPU = 1843200 |
| 49 |
|
49 | ##F_CPU = 2000000 |
| 50 |
|
50 | ##F_CPU = 3686400 |
| 51 |
|
51 | ##F_CPU = 4000000 |
| 52 |
|
52 | F_CPU = 8000000 |
| 53 |
|
53 | ##F_CPU = 11059200 |
| 54 |
|
54 | ##F_CPU = 16000000 |
| 55 | 55 | ||
| 56 | # Output format. (can be srec, ihex, binary) |
56 | # Output format. (can be srec, ihex, binary) |
| 57 | FORMAT = ihex |
57 | FORMAT = ihex |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | # Target file name (without extension). |
60 | # Target file name (without extension). |
| 61 | TARGET = main |
61 | TARGET = main |
| 62 | 62 | ||
| 63 | LIBDIR = ../lib/src/ |
63 | LIBDIR = ../../lib/src/ |
| 64 | 64 | ||
| 65 | 65 | ||
| 66 | # List C source files here. (C dependencies are automatically generated.) |
66 | # List C source files here. (C dependencies are automatically generated.) |
| 67 | SRC = $(TARGET).c\ |
67 | SRC = $(TARGET).c\ |
| 68 | $(LIBDIR)mcu/mcu.c\ |
68 | $(LIBDIR)mcu/mcu.c\ |
| Line 126... | Line 126... | ||
| 126 | CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
126 | CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums |
| 127 | CFLAGS += -Wall -Wstrict-prototypes |
127 | CFLAGS += -Wall -Wstrict-prototypes |
| 128 | CFLAGS += -Wa,-adhlns=$(<:.c=.lst) |
128 | CFLAGS += -Wa,-adhlns=$(<:.c=.lst) |
| 129 | CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) |
129 | CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) |
| 130 | CFLAGS += $(CSTANDARD) |
130 | CFLAGS += $(CSTANDARD) |
| 131 | CFLAGS += - |
131 | CFLAGS += -DF_CPU=$(F_CPU) |
| 132 | 132 | ||
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | # Assembler flags. |
135 | # Assembler flags. |
| 136 | # -Wa,...: tell GCC to pass this to the assembler. |
136 | # -Wa,...: tell GCC to pass this to the assembler. |