Allow adding extra common dependencies

This commit is contained in:
Sudar 2013-05-31 18:34:44 +05:30
commit 3bce1d88d7
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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 $@
# normal local sources
ifdef COMMON_DEPS
COMMON_DEPS := $(COMMON_DEPS) Makefile
else
COMMON_DEPS := Makefile
endif
# normal local sources
$(OBJDIR)/%.o: %.c $(COMMON_DEPS) | $(OBJDIR)
$(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@