aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudar <sudar@sudarmuthu.com>2013-05-31 18:34:44 +0530
committerSudar <sudar@sudarmuthu.com>2013-05-31 18:34:44 +0530
commit3bce1d88d7ae530fccdfb3d3a82ddcc2d1d82435 (patch)
tree0f9a1ad68728b221b023b5116f73ef2de1488727
parentd1b6fe3cdf554d1e95ccdd8c380536dcd1434d63 (diff)
parent3d4ec88dfdcbf60b33a785cd0f2064066fc013dd (diff)
Allow adding extra common dependencies
-rw-r--r--HISTORY.md1
-rw-r--r--arduino-mk/Arduino.mk7
2 files changed, 7 insertions, 1 deletions
diff --git a/HISTORY.md b/HISTORY.md
index f40fa04..976fbec 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -5,6 +5,7 @@ The following is the rough list of changes that went into different versions. I
### 0.10.5 (in development)
- Add USB_VID and USB_PID to CPPFLAGS only if the board is Leonardo.
+- Allow adding extra common dependencies (COMMON_DEPS) (https://github.com/gaftech)
### 0.10.4 (2013-05-31) @matthijskooijman
- Improved BAUD_RATE detection logic
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index 3d83809..f7b6b4c 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -689,8 +689,13 @@ $(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.cpp | $(OBJDIR)
$(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.c | $(OBJDIR)
$(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+ifdef COMMON_DEPS
+ COMMON_DEPS := $(COMMON_DEPS) Makefile
+else
+ COMMON_DEPS := Makefile
+endif
+
# normal local sources
-COMMON_DEPS := Makefile
$(OBJDIR)/%.o: %.c $(COMMON_DEPS) | $(OBJDIR)
$(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@