From b29a0bed2a1ed513b6400692db49d4c7f1bc21e9 Mon Sep 17 00:00:00 2001 From: Sudar Date: Sat, 15 Jun 2013 15:29:49 +0530 Subject: [PATCH] Replace hardcoded executables with variable --- HISTORY.md | 4 ++++ arduino-mk/Arduino.mk | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 9f502b5..921f040 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,10 @@ A Makefile for Arduino Sketches The following is the rough list of changes that went into different versions. I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list. +### 0.11.0 (in development) +- Replace hardcoded executables with variable name + + ### 0.10.6 (2013-06-14) - Fix whitespace and add /dev/null redirection (https://github.com/sej7278) - Change the way AUTO_ARDUINO_VERSION is computed (https://github.com/sej7278) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index ddca7ae..31ca2cd 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -613,6 +613,7 @@ REMOVE = rm -rf MV = mv -f CAT = cat ECHO = echo +MKDIR = mkdir -p # General arguments USER_LIBS = $(wildcard $(patsubst %,$(USER_LIB_PATH)/%,$(ARDUINO_LIBS))) @@ -705,19 +706,19 @@ $(call show_separator) # library sources $(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.c - mkdir -p $(dir $@) + $(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ $(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.cpp - mkdir -p $(dir $@) + $(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ $(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.cpp - mkdir -p $(dir $@) + $(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ $(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.c - mkdir -p $(dir $@) + $(MKDIR) $(dir $@) $(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@ ifdef COMMON_DEPS @@ -840,7 +841,7 @@ all: $(TARGET_EEP) $(TARGET_HEX) verify_size # list) to prevent remaking the target when any file in the directory # changes. $(OBJDIR): - mkdir $(OBJDIR) + $(MKDIR) $(OBJDIR) $(TARGET_ELF): $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm