autobuild.mk 673 B

123456789101112131415161718
  1. # Source files located under $(AUTOBUILD_ROOT) are automatically added.
  2. ifeq ($(AUTOBUILD_ROOT),)
  3. AUTOBUILD_ROOT := ./source/
  4. endif
  5. rwildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
  6. AUTOCSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.c)
  7. AUTOCPPSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.cpp)
  8. AUTOASMSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.s)
  9. AUTOXASMSRC := $(call rwildcard,$(AUTOBUILD_ROOT),*.S)
  10. AUTOINC := $(sort $(dir $(call rwildcard,$(AUTOBUILD_ROOT),*)))
  11. # Shared variables.
  12. ALLCSRC += $(AUTOCSRC)
  13. ALLCPPSRC += $(AUTOCPPSRC)
  14. ALLASMSRC += $(AUTOASMSRC)
  15. ALLXASMSRC += $(AUTOXASMSRC)
  16. ALLINC += $(AUTOINC)