Added autobuilder.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11051 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2017-11-21 14:29:46 +00:00
parent 5a1a1fc4ff
commit 77c0d5d354
1 changed files with 18 additions and 0 deletions

18
tools/mk/autobuild.mk Normal file
View File

@ -0,0 +1,18 @@
# Source files located under $(AUTOBUILD_ROOT) are automatically added.
ifeq ($(AUTOBUILD_ROOT),)
AUTOBUILD_ROOT := ./source/
endif
rwildcard := $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
AUTOCSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.c)
AUTOCPPSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.cpp)
AUTOASMSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.s)
AUTOXASMSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.S)
AUTOINC := $(sort $(dir $(call rwildcard,$(AUTOBUILD_ROOT),*)))
# Shared variables.
ALLCSRC += $(AUTOCSRC)
ALLCPPSRC += $(AUTOCPPSRC)
ALLASMSRC += $(AUTOASMSRC)
ALLXASMSRC += $(AUTOXASMSRC)
ALLINC += $(AUTOINC)