You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
569 B

#AVR-GCC Makefile
PROJECT = planefinder
SOURCES = src/main.c
CC = avr-gcc
OBJCOPY = avr-objcopy
MMCU = attiny13
DUMMY_BINARY:=$(shell mkdir -p binary)
CFLAGS = -mmcu=$(MMCU) -Wall -Os -std=gnu99
binary/$(PROJECT).hex: binary/$(PROJECT).out
$(OBJCOPY) -j .text -O ihex binary/$(PROJECT).out binary/$(PROJECT).hex
binary/$(PROJECT).out: $(SOURCES)
$(CC) $(CFLAGS) -I./ -o binary/$(PROJECT).out $(SOURCES)
program: binary/$(PROJECT).hex
avrdude -p t13 -c usbasp -e -U flash:w:binary/$(PROJECT).hex
clean:
rm -f binary/$(PROJECT).out
rm -f binary/$(PROJECT).hex