mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-12-28 20:47:21 +02:00
fc324599df
- uart.c: renamed to nxuart.c - Makefile: abstracted project name through $(NAME)
28 lines
531 B
Makefile
28 lines
531 B
Makefile
CFLAGS = -g -Wall -Wshadow -Werror \
|
|
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
|
|
|
|
NAME=nxuart
|
|
CHIP=atmega48
|
|
|
|
AVR_PREFIX = $(BIN_PATH) avr-
|
|
CC = $(AVR_PREFIX)gcc
|
|
OBJCOPY = $(AVR_PREFIX)objcopy
|
|
#OBJDUMP = $(AVR_PREFIX)objdump
|
|
|
|
.PHONY: all upload prog
|
|
|
|
all: $(NAME).bin
|
|
|
|
%.elf: %.c
|
|
$(CC) -mmcu=$(CHIP) -Os -o $@ $<
|
|
|
|
%.bin: %.elf
|
|
$(OBJCOPY) -j .text -j .data -O binary $< $@
|
|
|
|
upload: $(NAME).bin
|
|
scp $(NAME).bin jlime:
|
|
|
|
prog:
|
|
ssh jlime avrdude -p atmega48 -c nanonote_$(NAME) \
|
|
-e -U flash:w:$(NAME).bin:r
|