Subversion Repositories group.electronics

Rev

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

Rev 40 Rev 60
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 = usbdrv/usbdrv.o usbdrv/usbdrvasm.o main.o twi.o wire.o
14
OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o main.o twi.o wire.o util.o lcd.o
15
 
15
 
16
# Command-line client
16
# Command-line client
17
CMDLINE = usbtest
17
CMDLINE = usbtest
18
 
18
 
19
# By default, build the firmware and command-line client, but do not flash
19
# By default, build the firmware and command-line client, but do not flash
Line 40... Line 40...
40
main.elf: $(OBJECTS)
40
main.elf: $(OBJECTS)
41
	$(CC) $(CFLAGS) $(OBJECTS) -o $@
41
	$(CC) $(CFLAGS) $(OBJECTS) -o $@
42
 
42
 
43
# Without this dependance, .o files will not be recompiled if you change 
43
# Without this dependance, .o files will not be recompiled if you change 
44
# the config! I spent a few hours debugging because of this...
44
# the config! I spent a few hours debugging because of this...
45
$(OBJECTS): usbconfig.h hiddesc.h
45
$(OBJECTS): usbconfig.h hiddesc.h twi.h wire.h lcd.h util.h
46
 
46
 
47
# From C source to .o object file
47
# From C source to .o object file
48
%.o: %.c	
48
%.o: %.c	
49
	$(CC) $(CFLAGS) -c $< -o $@
49
	$(CC) $(CFLAGS) -c $< -o $@
50
 
50