aboutsummaryrefslogtreecommitdiffstats
path: root/ChibiOS_20.3.2/tools/mk/autobuild.mk
diff options
context:
space:
mode:
authorclyne <clyne@bitgloo.com>2021-03-21 16:34:21 -0400
committerGitHub <noreply@github.com>2021-03-21 16:34:21 -0400
commit9b926b81ef1e8a4c7266494ae2a1369380e01b35 (patch)
tree746095fa69eccccdc1c2830fdd0c06bac01848f5 /ChibiOS_20.3.2/tools/mk/autobuild.mk
parente080a26651f90c88176140d63a74c93c2f4041a2 (diff)
parenta4f1482a8b23d5f761f60d6f3821c84190d89e2f (diff)
Merge pull request #3 from tcsullivan/stm32h7
Stm32h7
Diffstat (limited to 'ChibiOS_20.3.2/tools/mk/autobuild.mk')
-rw-r--r--ChibiOS_20.3.2/tools/mk/autobuild.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/ChibiOS_20.3.2/tools/mk/autobuild.mk b/ChibiOS_20.3.2/tools/mk/autobuild.mk
new file mode 100644
index 0000000..1e2410d
--- /dev/null
+++ b/ChibiOS_20.3.2/tools/mk/autobuild.mk
@@ -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)