aboutsummaryrefslogtreecommitdiff
path: root/Arduino.mk
diff options
context:
space:
mode:
authorSimon John <git@the-jedi.co.uk>2015-03-25 11:58:19 +0000
committerSimon John <git@the-jedi.co.uk>2015-03-25 11:58:19 +0000
commitf6c69c9155a272a5e174873e0c03e34cc34f6c29 (patch)
treee3cb2bb4788fb12310ffb29267dd218c39b16b27 /Arduino.mk
parentea67b57949f55082df35c283b84c9dfcc12dec15 (diff)
Added search of PLATFORM_LIB_NAMES to ARDUINO_LIBS so that Wire.h is found on 1.6.1 and its output separately to SYS_LIB_NAMES
Added "sort" to the USER/SYS/PLATFORM _LIBS so we don't get duplicates
Diffstat (limited to 'Arduino.mk')
-rw-r--r--Arduino.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/Arduino.mk b/Arduino.mk
index 9045888..8f37089 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -814,6 +814,8 @@ ifndef ARDUINO_LIBS
$(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS)))
ARDUINO_LIBS += $(filter $(notdir $(wildcard $(USER_LIB_PATH)/*)), \
$(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS)))
+ ARDUINO_LIBS += $(filter $(notdir $(wildcard $(ARDUINO_PLATFORM_LIB_PATH)/*)), \
+ $(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS)))
endif
########################################################################
@@ -912,15 +914,15 @@ get_library_files = $(if $(and $(wildcard $(1)/src), $(wildcard $(1)/library.pr
$(wildcard $(1)/*.$(2) $(1)/utility/*.$(2)))
# General arguments
-USER_LIBS := $(wildcard $(patsubst %,$(USER_LIB_PATH)/%,$(ARDUINO_LIBS)))
+USER_LIBS := $(sort $(wildcard $(patsubst %,$(USER_LIB_PATH)/%,$(ARDUINO_LIBS))))
USER_LIB_NAMES := $(patsubst $(USER_LIB_PATH)/%,%,$(USER_LIBS))
# Let user libraries override system ones.
-SYS_LIBS := $(wildcard $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS))))
+SYS_LIBS := $(sort $(wildcard $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS)))))
SYS_LIB_NAMES := $(patsubst $(ARDUINO_LIB_PATH)/%,%,$(SYS_LIBS))
ifdef ARDUINO_PLATFORM_LIB_PATH
- PLATFORM_LIBS := $(wildcard $(patsubst %,$(ARDUINO_PLATFORM_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS))))
+ PLATFORM_LIBS := $(sort $(wildcard $(patsubst %,$(ARDUINO_PLATFORM_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS)))))
PLATFORM_LIB_NAMES := $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%,%,$(PLATFORM_LIBS))
endif
@@ -1096,10 +1098,14 @@ ifneq (,$(strip $(USER_LIB_NAMES)))
$(foreach lib,$(USER_LIB_NAMES),$(call show_config_info, $(lib),[USER]))
endif
-ifneq (,$(strip $(SYS_LIB_NAMES) $(PLATFORM_LIB_NAMES)))
+ifneq (,$(strip $(SYS_LIB_NAMES)))
$(foreach lib,$(SYS_LIB_NAMES),$(call show_config_info, $(lib),[SYSTEM]))
endif
+ifneq (,$(strip $(PLATFORM_LIB_NAMES)))
+ $(foreach lib,$(PLATFORM_LIB_NAMES),$(call show_config_info, $(lib),[PLATFORM]))
+endif
+
# either calculate parent dir from arduino dir, or user-defined path
ifndef BOOTLOADER_PARENT
BOOTLOADER_PARENT = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/bootloaders