# makefile, written by kaklik
MCU=atmega8
CC=avr-gcc
OBJCOPY=avr-objcopy
# optimize for size:
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues
#-------------------
all: DOGFINDER_TX.hex
#-------------------
help:
@echo "Usage: make all|load|load_pre|rdfuses|wrfuse1mhz|wrfuse4mhz|wrfusecrystal"
@echo "Warning: you will not be able to undo wrfusecrystal unless you connect an"
@echo " external crystal! uC is dead after wrfusecrystal if you do not"
@echo " have an external crystal."
#-------------------
DOGFINDER_TX.hex : DOGFINDER_TX.out
$(OBJCOPY) -R .eeprom -O ihex DOGFINDER_TX.out DOGFINDER_TX.hex
DOGFINDER_TX.out : DOGFINDER_TX.o
$(CC) $(CFLAGS) -o DOGFINDER_TX.out -Wl,-Map,DOGFINDER_TX.map DOGFINDER_TX.o
DOGFINDER_TX.o : DOGFINDER_TX.c
$(CC) $(CFLAGS) -Os -c DOGFINDER_TX.c
#-------------------
clean:
rm -f *.o *.map *.out *t.hex
#-------------------