From febe222ff6b6f7c3cd72a308a530739213952307 Mon Sep 17 00:00:00 2001 From: Nephirus Date: Mon, 11 Oct 2010 20:28:24 +0200 Subject: [PATCH] Initial commit --- Makefile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..85d3286 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +PRG = brmpsu +OBJ = brmpsu.o +MCU_TARGET = atmega16 +OPTIMIZE = -Os +PROG = dragon_jtag +PORT = usb + +CC = avr-gcc + +override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) -L/usr/x86_64-pc-linux-gnu/avr/lib + +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump + +all: hex + +$(PRG).elf: $(OBJ) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +clean: + rm -rf *.o $(PRG).elf $(PRG).hex + +hex: $(PRG).hex + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +install: load + +load: $(PRG).hex + avrdude -p m16 -c $(PROG) -P $(PORT) -U flash:w:$< + -- 2.11.4.GIT