diff options
| author | Simon John <git@the-jedi.co.uk> | 2014-08-21 06:35:21 +0200 |
|---|---|---|
| committer | Simon John <git@the-jedi.co.uk> | 2014-08-29 09:56:52 +0200 |
| commit | aa879d8db864cdbc51408f5982ebcc7530626813 (patch) | |
| tree | 4a13c202f5bbc761c5f5b4b15fd59e781fa5c662 | |
| parent | 846636b139ad773f295c317455acb4746cbb7fb0 (diff) | |
Allow libraries/sketches to have the same name as system libs,
e.g. main or Wire
Doesn't seem to work with main.cpp but main.ino works.
Fixes issue #229 and #244
| -rw-r--r-- | Arduino.mk | 12 | ||||
| -rw-r--r-- | HISTORY.md | 2 | ||||
| -rw-r--r-- | arduino-mk-vars.md | 2 |
3 files changed, 7 insertions, 9 deletions
@@ -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 $@ @@ -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,7 @@ 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) ### 1.3.4 (2014-07-12) - Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav) diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md index c3a630b..54608d6 100644 --- a/arduino-mk-vars.md +++ b/arduino-mk-vars.md @@ -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 |
