From: Mikko Rasa Date: Fri, 1 Nov 2013 13:30:42 +0000 (+0200) Subject: Make upload device configurable X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=518d6e4805e36ee0fc0585d1595d394f33495108;p=model-railway-devices.git Make upload device configurable --- diff --git a/common/build.mk b/common/build.mk index 96d0f93..c56892e 100644 --- a/common/build.mk +++ b/common/build.mk @@ -5,6 +5,7 @@ CFLAGS := -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(C LDFLAGS := -Os -Wl,--gc-sections -mmcu=$(MCU) AVRDUDE := avrdude OBJCOPY := avr-objcopy +DEVICE := /dev/ttyUSB0 ifeq ($(MCU),atmega168) BAUD := 19200 else @@ -34,7 +35,7 @@ help: $(CC) -c $(CFLAGS) -o $@ $< upload-%: %.hex - $(AVRDUDE) -p$(MCU) -carduino -P/dev/ttyUSB0 -b$(BAUD) -D -Uflash:w:$<:i + $(AVRDUDE) -p$(MCU) -carduino -P$(DEVICE) -b$(BAUD) -D -Uflash:w:$<:i clean: $(RM) *.hex