Browse Source

Merge pull request #565 from iXce/avrdudeconfpath

Detect OS in Makefile to use the correct avrdude.conf path
ErikZalm 11 years ago
parent
commit
7ea63d08df
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      Marlin/Makefile

+ 6
- 1
Marlin/Makefile View File

@@ -312,7 +312,12 @@ LDFLAGS = -lm
312 312
 # Programming support using avrdude. Settings and variables.
313 313
 AVRDUDE_PORT = $(UPLOAD_PORT)
314 314
 AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i
315
-AVRDUDE_FLAGS = -D -C $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf \
315
+ifeq ($(shell uname -s), Linux)
316
+AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf
317
+else
318
+AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
319
+endif
320
+AVRDUDE_FLAGS = -D -C $(AVRDUDE_CONF) \
316 321
 	-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
317 322
 	-b $(UPLOAD_RATE)
318 323
 

Loading…
Cancel
Save