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 don't want to use recursive makefiles, this might give you some ideas:
subdirs := $(wildcard */) sources := $(wildcard $(addsuffix *.cpp,$(subdirs))) objects := $(patsubst %.cpp,%.o,$(sources)) $(objects) : %.o : %.cpp