Subversion Repositories group.electronics

Rev

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

Rev 49 Rev 58
Line 9... Line 9...
9
OBJFLAGS = -j .text -j .data -O ihex
9
OBJFLAGS = -j .text -j .data -O ihex
10
DUDEFLAGS = -p atmega168 -P usb -c avrispmkii -v
10
DUDEFLAGS = -p atmega168 -P usb -c avrispmkii -v
11
 
11
 
12
# Object files for the firmware (usbdrv/oddebug.o not strictly needed I think)
12
# Object files for the firmware (usbdrv/oddebug.o not strictly needed I think)
13
#OBJECTS = usbdrv/usbdrv.o usbdrv/oddebug.o usbdrv/usbdrvasm.o main.o
13
#OBJECTS = usbdrv/usbdrv.o usbdrv/oddebug.o usbdrv/usbdrvasm.o main.o
14
OBJECTS = lcd.o twi.o wire.o main.o petelib.o
14
OBJECTS = lcd.o twi.o wire.o main.o util.o
15
 
15
 
16
# By default, build the firmware and command-line client, but do not flash
16
# By default, build the firmware and command-line client, but do not flash
17
#all: main.hex $(CMDLINE)
17
#all: main.hex $(CMDLINE)
18
all: main.hex 
18
all: main.hex 
19
 
19
 
Line 33... Line 33...
33
main.elf: $(OBJECTS)
33
main.elf: $(OBJECTS)
34
	$(CC) $(CFLAGS) $(OBJECTS) -o $@
34
	$(CC) $(CFLAGS) $(OBJECTS) -o $@
35
 
35
 
36
# Without this dependance, .o files will not be recompiled if you change 
36
# Without this dependance, .o files will not be recompiled if you change 
37
# the config! I spent a few hours debugging because of this...
37
# the config! I spent a few hours debugging because of this...
38
$(OBJECTS): twi.h wire.h lcd.h petelib.h
38
$(OBJECTS): twi.h wire.h lcd.h util.h
39
 
39
 
40
# From C source to .o object file
40
# From C source to .o object file
41
%.o: %.c	
41
%.o: %.c	
42
	$(CC) $(CFLAGS) -c $< -o $@
42
	$(CC) $(CFLAGS) -c $< -o $@
43
 
43