comparison Makefile @ 20:bc48a1d17edf

near done
author Matt Johnston <matt@ucc.asn.au>
date Sun, 16 Jun 2013 13:04:09 +0800
parents 021e6e0006f4
children a55d7c2440fd
comparison
equal deleted inserted replaced
18:021e6e0006f4 20:bc48a1d17edf
4 # License: <insert your license reference here> 4 # License: <insert your license reference here>
5 5
6 # This is a prototype Makefile. Modify it according to your needs. 6 # This is a prototype Makefile. Modify it according to your needs.
7 # You should at least check the settings for 7 # You should at least check the settings for
8 # DEVICE ....... The AVR device you compile for 8 # DEVICE ....... The AVR device you compile for
9 # CLOCK ........ Target AVR clock rate in Hertz 9 # CLOCK ........ Target AVR CLOCK rate in Hertz
10 # OBJECTS ...... The object files created from your source files. This list is 10 # OBJECTS ...... The object files created from your source files. This list is
11 # usually the same as the list of source files with suffix ".o". 11 # usually the same as the list of source files with suffix ".o".
12 # PROGRAMMER ... Options to avrdude which define the hardware you use for 12 # PROGRAMMER ... Options to avrdude which define the hardware you use for
13 # uploading to the AVR and the interface where this hardware 13 # uploading to the AVR and the interface where this hardware
14 # is connected. We recommend that you leave it undefined and 14 # is connected. We recommend that you leave it undefined and
17 # default_serial = "avrdoper" 17 # default_serial = "avrdoper"
18 # FUSES ........ Parameters for avrdude to flash the fuses appropriately. 18 # FUSES ........ Parameters for avrdude to flash the fuses appropriately.
19 19
20 DEVICE = atmega328 20 DEVICE = atmega328
21 PROGDEVICE = atmega328p 21 PROGDEVICE = atmega328p
22 CLOCK = 4915200 22 CLOCK = 4915200L
23 PROGRAMMER = #-c stk500v2 -P avrdoper 23 PROGRAMMER = #-c stk500v2 -P avrdoper
24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) -B 2 24 PROGRAMMER = -c stk500 -P ~/dev/stk500 -p $(PROGDEVICE) -B 2
25 SOURCE_1WIRE = onewire.c simple_ds18b20.c crc8.c 25 SOURCE_1WIRE = onewire.c simple_ds18b20.c crc8.c
26 SOURCE_CRYPTO = hmac-sha1.c sha1-asm.S aes.c 26 SOURCE_CRYPTO = hmac-sha1.c sha1-asm.S aes.c
27 SOURCE = main.c 27 SOURCE = main.c
80 80
81 .c.s: 81 .c.s:
82 $(COMPILE) -S $< -o $@ 82 $(COMPILE) -S $< -o $@
83 83
84 flash: all 84 flash: all
85 $(AVRDUDE) -U flash:w:main.hex:i 85 $(AVRDUDE) -D -U flash:w:main.hex:i
86 86
87 checkprog: 87 checkprog:
88 $(AVRDUDE) -v 88 $(AVRDUDE) -v
89 89
90 fuse: 90 fuse: