Project

General

Profile

Statistics
| Branch: | Revision:

root / forklift / code / Makefile @ 86196a57

History | View | Annotate | Download (385 Bytes)

1
SRC = forklift.c analog.c twi.c motor.c
2
HDR = analog.h twi.h motor.h
3

    
4
forklift: forklift.hex
5
	@
6

    
7
%.hex: %.elf
8
	avr-objcopy -j .text -j .data -O ihex $< $@
9

    
10
forklift.elf: $(SRC) $(HDR)
11
	avr-gcc -mmcu=atmega168 -DF_CPU=8000000L $(SRC) -o forklift.elf -Os
12

    
13
download: forklift.hex
14
	avrdude -c avrispmkII -p m168 -P usb -B 1 -U flash:w:forklift.hex
15

    
16
clean:
17
	rm -f forklift.elf forklift.hex