Skip to content

Commit

Permalink
Merge pull request #218 from sej7278/master
Browse files Browse the repository at this point in the history
Build core objects in subdirectory, fix issue #82 and fix #218
  • Loading branch information
sudar committed Jul 1, 2014
2 parents 20ccdf1 + 437a0f5 commit 1f950db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Arduino.mk
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ ifeq ($(strip $(NO_CORE)),)

CORE_OBJ_FILES = $(CORE_C_SRCS:.c=.o) $(CORE_CPP_SRCS:.cpp=.o) $(CORE_AS_SRCS:.S=.o)
CORE_OBJS = $(patsubst $(ARDUINO_CORE_PATH)/%, \
$(OBJDIR)/%,$(CORE_OBJ_FILES))
$(OBJDIR)/core/%,$(CORE_OBJ_FILES))
endif
else
$(call show_config_info,NO_CORE set so core library will not be built,[MANUAL])
Expand Down Expand Up @@ -1016,15 +1016,15 @@ $(OBJDIR)/%.s: %.ino $(COMMON_DEPS) | $(OBJDIR)
# $(AS) -$(MCU_FLAG_NAME)=$(MCU) -alhnd $< > $@

# core files
$(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.c $(COMMON_DEPS) | $(OBJDIR)
$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.c $(COMMON_DEPS) | $(OBJDIR)
@$(MKDIR) $(dir $@)
$(CC) -MMD -c $(CPPFLAGS) $(CFLAGS) $< -o $@

$(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.cpp $(COMMON_DEPS) | $(OBJDIR)
$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.cpp $(COMMON_DEPS) | $(OBJDIR)
@$(MKDIR) $(dir $@)
$(CXX) -MMD -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@

$(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.S $(COMMON_DEPS) | $(OBJDIR)
$(OBJDIR)/core/%.o: $(ARDUINO_CORE_PATH)/%.S $(COMMON_DEPS) | $(OBJDIR)
@$(MKDIR) $(dir $@)
$(CC) -MMD -c $(CPPFLAGS) $(ASFLAGS) $< -o $@

Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- New: Arduino.mk is now compatible with Flymake mode (https://github.com/rbarzic)
- Fix: MONITOR_PORT detection (Issue #213, #215) (https://github.com/sej7278)
- Tweak: Audited regexes/quoting/wildcards (Issue #192) (https://github.com/sej7278)
- New: Build core objects in subdirectory (Issue #82) (https://github.com/sej7278)

### 1.3.3 (2014-04-12)
- Fix: Make a new manpage for ard-reset-arduino. Fixes issue #188 (https://github.com/sej7278)
Expand Down

0 comments on commit 1f950db

Please sign in to comment.