Subversion Repositories MK3Mag

Rev

Rev 17 | Rev 36 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17 Rev 32
Line 1... Line 1...
1
#--------------------------------------------------------------------
1
#--------------------------------------------------------------------
2
# MCU name
2
# MCU name
3
MCU = atmega168
3
MCU = atmega168
-
 
4
F_CPU = 8000000
4
#-------------------------------------------------------------------
5
#-------------------------------------------------------------------
-
 
6
BOARD = 10
-
 
7
#BOARD = 11
5
HAUPT_VERSION    =  0
8
VERSION_MAJOR    =   0
6
NEBEN_VERSION    =  16
9
VERSION_MINOR    =  18
-
 
10
 
-
 
11
VERSION_COMPATIBLE = 8  # PC-Kompatibilität
7
#-------------------------------------------------------------------
12
#-------------------------------------------------------------------
Line 8... Line 13...
8
 
13
 
9
# Output format. (can be srec, ihex, binary)
14
# Output format. (can be srec, ihex, binary)
Line 10... Line 15...
10
FORMAT = ihex
15
FORMAT = ihex
11
 
16
 
Line 12... Line 17...
12
# Target file name (without extension).
17
# Target file name (without extension).
13
TARGET = MK3Mag_MEGA168_V$(HAUPT_VERSION)_$(NEBEN_VERSION)
18
TARGET = MK3Mag_MEGA168_V$(VERSION_MAJOR)_$(VERSION_MINOR)
14
 
19
 
Line 15... Line 20...
15
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
20
# Optimization level, can be [0, 1, 2, 3, s]. 0 turns off optimization.
16
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
21
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
17
OPT = s
22
OPT = s
18
 
-
 
19
##########################################################################################################
23
 
Line 20... Line -...
20
# List C source files here. (C dependencies are automatically generated.)
-
 
21
SRC = main.c uart.c timer0.c analog.c twislave.c 
-
 
22
#printf_P.c
-
 
23
##########################################################################################################
-
 
24
 
-
 
25
# If there is more than one source file, append them above, or modify and
-
 
26
# uncomment the following:
-
 
27
#SRC += foo.c bar.c
-
 
28
 
-
 
Line 29... Line 24...
29
# You can also wrap lines by appending a backslash to the end of the line:
24
##########################################################################################################
30
#SRC += baz.c \
25
# List C source files here. (C dependencies are automatically generated.)
31
#xyzzy.c
26
SRC = main.c uart.c timer0.c analog.c twislave.c led.c
32
 
27
##########################################################################################################
Line 45... Line 40...
45
# List any extra directories to look for include files here.
40
# List any extra directories to look for include files here.
46
#     Each directory must be seperated by a space.
41
#     Each directory must be seperated by a space.
47
EXTRAINCDIRS = 
42
EXTRAINCDIRS = 
Line -... Line 43...
-
 
43
 
-
 
44
 
48
 
45
CDEFS = -DF_CPU=$(F_CPU)UL
49
 
46
 
50
# Optional compiler flags.
47
# Optional compiler flags.
51
#  -g:        generate debugging information (for GDB, or for COFF conversion)
48
#  -g:        generate debugging information (for GDB, or for COFF conversion)
52
#  -O*:       optimization level
49
#  -O*:       optimization level
Line 66... Line 63...
66
#   gnu99 = C99 + GNU extensions. See GCC manual for more information.
63
#   gnu99 = C99 + GNU extensions. See GCC manual for more information.
67
#CFLAGS += -std=c89
64
#CFLAGS += -std=c89
68
#CFLAGS += -std=gnu89
65
#CFLAGS += -std=gnu89
69
#CFLAGS += -std=c99
66
#CFLAGS += -std=c99
70
CFLAGS += -std=gnu99
67
CFLAGS += -std=gnu99
71
 
-
 
-
 
68
CFLAGS += $(CDEFS)
72
CFLAGS += -DVERSION_HAUPTVERSION=$(HAUPT_VERSION) -DVERSION_NEBENVERSION=$(NEBEN_VERSION) 
69
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_COMPATIBLE=$(VERSION_COMPATIBLE) -DBOARD=$(BOARD)
Line 73... Line 70...
73
 
70
 
74
ifeq ($(AVR_CTRL_PLATINE), 1)
71
ifeq ($(AVR_CTRL_PLATINE), 1)
75
CFLAGS += -DAVR_CTRL_PLATINE=$(AVR_CTRL_PLATINE)         
72
CFLAGS += -DAVR_CTRL_PLATINE=$(AVR_CTRL_PLATINE)