I have a C++ library built using a Makefile. Until recently, all the sources were in a single directory, and the Makefile did something like this
SOURCES = $(w
If you can use find shell command, you may define a function to use it.
find
recurfind = $(shell find $(1) -name '$(2)') SRCS := $(call recurfind,subdir1,*.c) $(call recurfind,subdir2,*.cc) $(call recurfind,subdir2,*.cu) \ ...