#  No Copyright
#
#  The person who associated a work with this deed has dedicated the work to the
#  public domain by waiving all of his or her rights to the work worldwide under
#  copyright law, including all related and neighboring rights, to the extent
#  allowed by law.
#
#  You can copy, modify, distribute and perform the work, even for commercial
#  purposes, all without asking permission.
#
#  See https://creativecommons.org/share-your-work/public-domain/cc0/ for more
#  information on the license.


#  This file is part of the wake-up-bright led lamp project, made by
#  Maarten Tromp <maarten@geekabit.nl>, 2009 - 2014.
#
#  More info on the project: https://www.geekabit.nl/projects/wake-up-bright/


#  Version history:
#  2020-10-20  first version


# defenitions
TARGET := wake-up-bright
DEPS := tn2313def.inc


# symbolic targets:
.PHONY:	all assemble prog fuses clean
all:	assemble

assemble:	$(TARGET).hex

prog:	$(TARGET).hex
	avrdude -c usbasp -p t2313 -U flash:w:$<

fuses:
	avrdude -c usbasp -p t2313 -U lfuse:w:0xe4:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m 

clean:
	-@ $(RM) $(TARGET).hex $(TARGET).cof $(TARGET).obj $(TARGET).eep.hex

# file targets:
%.hex: %.asm $(DEPS)
	avra $<


# end of file
