summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a44356e..e8ed213 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-MCU=atmega48
+MCU=atmega88
AVRDUDE=avrdude
ACC=avr-gcc
AOBJCOPY=avr-objcopy
@@ -8,6 +8,10 @@ CFLAGS=-Wall -Wextra -Wno-unused-parameter -pedantic -std=c99
ifdef PIN
DPIN=-DPIN=\"$(PIN)\"
endif
+
+ifdef MASTER_PIN
+DPIN+=-DMASTER_PIN=\"$(MASTER_PIN)\"
+endif
ACFLAGS=-g -mmcu=$(MCU) $(CFLAGS) $(DPIN) -Os -mcall-prologues
# ALDFLAGS=-L/usr/avr/lib/avr4 -L/usr/lib/binutils/avr/2.18
LD=gcc
@@ -31,9 +35,9 @@ love: kbc.flash kbc.eeprom
$(ACC) $(ACFLAGS) -c -o $@ $<
flash: kbc.flash
- $(AVRDUDE) -y -p m48 -E noreset -U flash:w:$<:r
+ $(AVRDUDE) -y -p m88 -E noreset -U flash:w:$<:r
eeprom: kbc.eeprom
- $(AVRDUDE) -y -p m48 -E noreset -U eeprom:w:$<:r
+ $(AVRDUDE) -y -p m88 -E noreset -U eeprom:w:$<:r
clean:
rm -f *.flash *.eeprom *.o