From f579c3e6ebc3531e8fa778cba44eefe02db13dec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Jul 2016 11:46:17 +1000 Subject: [PATCH] mk: added a global make.inc saves added global libraries to every subdirectory --- mk/make.inc | 2 ++ mk/sketch_sources.mk | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 mk/make.inc diff --git a/mk/make.inc b/mk/make.inc new file mode 100644 index 0000000000..006f1eefb4 --- /dev/null +++ b/mk/make.inc @@ -0,0 +1,2 @@ +# libraries linked into every program +LIBRARIES += AP_Module diff --git a/mk/sketch_sources.mk b/mk/sketch_sources.mk index adceebf225..6d0a163399 100644 --- a/mk/sketch_sources.mk +++ b/mk/sketch_sources.mk @@ -9,6 +9,11 @@ ifeq (,$(MAKE_INC)) $(error You must have a make.inc file to list library dependencies) endif +GLOBAL_MAKE_INC=$(wildcard $(SKETCHBOOK)/mk/make.inc) +ifeq (,$(GLOBAL_MAKE_INC)) +$(error You must have a make.inc in mk/ directory) +endif + # Sketch source files SKETCHSRCS := $(wildcard $(addprefix $(SRCROOT)/,$(SRCSUFFIXES))) SKETCHCPP := $(SRCROOT)/$(SKETCH).cpp @@ -19,6 +24,7 @@ SKETCHOBJS := $(addsuffix .o,$(basename $(SKETCHOBJS))) # get list of libraries from make.inc include $(MAKE_INC) +include $(GLOBAL_MAKE_INC) LIBTOKENS := $(LIBRARIES)