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)