Merge pull request #245 from sej7278/master
Allow libraries/sketches to have the same name as system libs. Fix #229 Fix #244
This commit is contained in:
commit
e30bb5c28a
3 changed files with 11 additions and 11 deletions
17
Arduino.mk
17
Arduino.mk
|
@ -874,9 +874,9 @@ USER_LIB_AS_SRCS = $(wildcard $(patsubst %,%/*.S,$(USER_LIBS)))
|
|||
LIB_OBJS = $(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(LIB_C_SRCS)) \
|
||||
$(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_CPP_SRCS)) \
|
||||
$(patsubst $(ARDUINO_LIB_PATH)/%.S,$(OBJDIR)/libs/%.o,$(LIB_AS_SRCS))
|
||||
USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(USER_LIB_CPP_SRCS)) \
|
||||
$(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(USER_LIB_C_SRCS)) \
|
||||
$(patsubst $(USER_LIB_PATH)/%.S,$(OBJDIR)/libs/%.o,$(USER_LIB_AS_SRCS))
|
||||
USER_LIB_OBJS = $(patsubst $(USER_LIB_PATH)/%.cpp,$(OBJDIR)/userlibs/%.o,$(USER_LIB_CPP_SRCS)) \
|
||||
$(patsubst $(USER_LIB_PATH)/%.c,$(OBJDIR)/userlibs/%.o,$(USER_LIB_C_SRCS)) \
|
||||
$(patsubst $(USER_LIB_PATH)/%.S,$(OBJDIR)/userlibs/%.o,$(USER_LIB_AS_SRCS))
|
||||
|
||||
# Dependency files
|
||||
DEPS = $(LOCAL_OBJS:.o=.d) $(LIB_OBJS:.o=.d) $(USER_LIB_OBJS:.o=.d) $(CORE_OBJS:.o=.d)
|
||||
|
@ -1034,15 +1034,15 @@ $(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.S
|
|||
@$(MKDIR) $(dir $@)
|
||||
$(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@
|
||||
|
||||
$(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.cpp
|
||||
$(OBJDIR)/userlibs/%.o: $(USER_LIB_PATH)/%.cpp
|
||||
@$(MKDIR) $(dir $@)
|
||||
$(CC) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
$(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.c
|
||||
$(OBJDIR)/userlibs/%.o: $(USER_LIB_PATH)/%.c
|
||||
@$(MKDIR) $(dir $@)
|
||||
$(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@
|
||||
|
||||
$(OBJDIR)/libs/%.o: $(USER_LIB_PATH)/%.S
|
||||
$(OBJDIR)/userlibs/%.o: $(USER_LIB_PATH)/%.S
|
||||
@$(MKDIR) $(dir $@)
|
||||
$(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@
|
||||
|
||||
|
@ -1092,8 +1092,9 @@ $(OBJDIR)/%.s: %.ino $(COMMON_DEPS) | $(OBJDIR)
|
|||
@$(MKDIR) $(dir $@)
|
||||
$(CXX) -x c++ -include $(ARDUINO_HEADER) -MMD -S -fverbose-asm $(CPPFLAGS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
#$(OBJDIR)/%.lst: $(OBJDIR)/%.s
|
||||
# $(AS) -$(MCU_FLAG_NAME)=$(MCU) -alhnd $< > $@
|
||||
$(OBJDIR)/%.s: %.cpp $(COMMON_DEPS) | $(OBJDIR)
|
||||
@$(MKDIR) $(dir $@)
|
||||
$(CXX) -x c++ -include $(ARDUINO_HEADER) -MMD -S -fverbose-asm $(CPPFLAGS) $(CXXFLAGS) $< -o $@
|
||||
|
||||
# core files
|
||||
$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.c $(COMMON_DEPS) | $(OBJDIR)
|
||||
|
|
|
@ -9,7 +9,6 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
|
|||
- Fix: Change "tinyladi" username to "ladislas" in HISTORY.md. (https://github.com/ladislas)
|
||||
- Add: Add information about `Bare-Arduino–Project` in README. (https://github.com/ladislas)
|
||||
- Fix: Make avr-g++ use CXXFLAGS instead of CFLAGS. (https://github.com/sej7278)
|
||||
- Add: Add information about overriding system libs (Issue #229). (https://github.com/sej7278)
|
||||
- Add: Add information about reporting bugs to the correct project (Issue #231). (https://github.com/sej7278)
|
||||
- Fix: Allow the use of CFLAGS_STD and CXXFLAGS_STD and set defaults (Issue #234) (https://github.com/ladislas)
|
||||
- Tweak: Remove $(EXTRA_XXX) variables (Issue #234) (https://github.com/ladislas)
|
||||
|
@ -17,6 +16,8 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
|
|||
- Tweak: Update Malefile-example.mk with STD flags (https://github.com/ladislas)
|
||||
- Add: Allow "make clean" target to be extended (Issue #239). (https://github.com/sej7278)
|
||||
- Fix: Update "make show_boards" regex to work with the Due in 1.5. (https://github.com/sej7278)
|
||||
- Fix: Allow user libaries/sketches to have the same name as system libs. (Issue #244, #229). (https://github.com/sej7278)
|
||||
- Tweak: Add cpp to extensions supported by "make generate_assembly". (https://github.com/sej7278)
|
||||
|
||||
### 1.3.4 (2014-07-12)
|
||||
- Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav)
|
||||
|
|
|
@ -307,8 +307,6 @@ Directory where additional libraries are stored.
|
|||
|
||||
Defaults to `libraries` directory within user's sketchbook.
|
||||
|
||||
Note that you cannot have user libraries with the same name as the system Arduino libs.
|
||||
|
||||
**Example:**
|
||||
|
||||
```Makefile
|
||||
|
|
Loading…
Reference in a new issue