Subversion Repositories group.electronics

Rev

Rev 123 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 123 Rev 127
Line 11... Line 11...
11
PROGPORT=usb
11
PROGPORT=usb
12
 
12
 
13
INCLUDES=-I. -I./lib/
13
INCLUDES=-I. -I./lib/
14
VALUES=-DF_CPU=$(F_CPU)
14
VALUES=-DF_CPU=$(F_CPU)
15
AVRDUDE = avrdude -c $(PROGTYPE) -P $(PROGPORT) -p $(DEVICE)
15
AVRDUDE = avrdude -c $(PROGTYPE) -P $(PROGPORT) -p $(DEVICE)
16
COMPILE = avr-gcc -Wall -Os -DDEBUG_LEVEL=0  -mmcu=$(DEVICE) $(INCLUDES) $(VALUES) 
16
COMPILE = avr-gcc -Wall -Os -DDEBUG_LEVEL=0  -mmcu=$(DEVICE) $(INCLUDES) $(VALUES)
17
 
17
 
-
 
18
OBJECTS  = lib/uart.o 
18
OBJECTS = lib/uart.o lib/avrutil.o lib/twi.o lib/wire.o lib/lcd.o lib/e2p.o lib/mio.o main.o
19
OBJECTS += lib/avrutil.o 
-
 
20
OBJECTS += lib/twi.o 
-
 
21
OBJECTS += lib/wire.o 
-
 
22
OBJECTS += lib/lcd.o 
-
 
23
 
-
 
24
#OBJECTS += lib/e2p.o 
-
 
25
#OBJECTS += lib/mio.o 
-
 
26
#OBJECTS += lib/oled.o 
-
 
27
#OBJECTS += lib/gfx.o
-
 
28
#OBJECTS += lib/dht.o 
-
 
29
 
-
 
30
OBJECTS += lib/lmd.o 
-
 
31
OBJECTS += main.o
19
 
32
 
20
# Compiling:
33
# Compiling:
21
all:	main.hex
34
all:	main.hex
22
 
35
 
23
.c.o:
36
.c.o:
Line 28... Line 41...
28
 
41
 
29
.c.s:
42
.c.s:
30
	$(COMPILE) -S $< -o $@
43
	$(COMPILE) -S $< -o $@
31
 
44
 
32
main.bin:	$(OBJECTS)
45
main.bin:	$(OBJECTS)
33
	$(COMPILE) -o main.bin $(OBJECTS)
46
	$(COMPILE) -o main.bin $(OBJECTS) -lm
34
 
47
 
35
main.hex:	main.bin
48
main.hex:	main.bin
36
	rm -f main.hex main.eep.hex
49
	rm -f main.hex main.eep.hex
37
	avr-objcopy -j .text -j .data -O ihex main.bin main.hex
50
	avr-objcopy -j .text -j .data -O ihex main.bin main.hex
38
	./checksize main.bin 31768 2048
51
	./checksize main.bin 31768 2048