mk: added a global make.inc

saves added global libraries to every subdirectory
This commit is contained in:
Andrew Tridgell 2016-07-14 11:46:17 +10:00
parent 7d48b25207
commit f579c3e6eb
2 changed files with 8 additions and 0 deletions

2
mk/make.inc Normal file
View File

@ -0,0 +1,2 @@
# libraries linked into every program
LIBRARIES += AP_Module

View File

@ -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)