Skip to content

Commit 1f950db

Browse files
committed
Merge pull request #218 from sej7278/master
Build core objects in subdirectory, fix issue #82 and fix #218
2 parents 20ccdf1 + 437a0f5 commit 1f950db

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Arduino.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ ifeq ($(strip $(NO_CORE)),)
684684

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

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

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

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

HISTORY.md

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

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

0 commit comments

Comments
 (0)