aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk/Arduino.mk
diff options
context:
space:
mode:
authorgabriel <gabriel@gaftech.fr>2013-01-31 22:14:07 +0100
committergabriel <gabriel@gaftech.fr>2013-01-31 22:14:07 +0100
commit3d4ec88dfdcbf60b33a785cd0f2064066fc013dd (patch)
tree9c588f34bd9979a862592ab36d759da30cc82ee1 /arduino-mk/Arduino.mk
parentccd17539e2ce64db06b0bee200950635433dbe8e (diff)
Allow adding extra common dependencies
Diffstat (limited to 'arduino-mk/Arduino.mk')
-rw-r--r--arduino-mk/Arduino.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk
index 96f2e1b..8b72b0b 100644
--- a/arduino-mk/Arduino.mk
+++ b/arduino-mk/Arduino.mk
@@ -148,12 +148,15 @@
# - Changed shebang to use /usr/bin/env (https://github.com/anm)
# - set USB_VID and USB_PID only for leonardo boards(https://github.com/alohr)
#
-# 0.10.3 16.xii 2012 gaftech
+# 0.10.3 16.xii 2012 gaftech
# - Enabling creation of EEPROM file (.eep)
# - EEPROM upload: eeprom and raw_eeprom targets
# - Auto EEPROM upload with isp mode: ISP_EEPROM option.
# - Allow custom OBJDIR
#
+# 0.10.4 24.i.2013 gaftech
+# - Allow adding extra common dependencies (COMMON_DEPS)
+#
########################################################################
#
# PATHS YOU NEED TO SET UP
@@ -803,7 +806,11 @@ $(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.c
# normal local sources
# .o rules are for objects, .d for dependency tracking
# there seems to be an awful lot of duplication here!!!
+ifdef COMMON_DEPS
+COMMON_DEPS := $(COMMON_DEPS) Makefile
+else
COMMON_DEPS := Makefile
+endif
$(OBJDIR)/%.o: %.c $(COMMON_DEPS)
$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@