Help with Makefiles
For an application that I am writing in C, i need to have one Makefile that will access the Makefiles in all of the directories that have stuff to be compiled.
My question is simple (and I hope the answer is too), how would I go about doing this.
I imagine your top-level makefile will contain the following
- a target, which is dependent on the products of your sub-makes
- calls to all the sub-makes
make -f dir1/makefile
make -f dir2/makefile
or a line like this in the main makefile
#libobjects defined earlier in file
$(libobjects) : lib.h ;cd lib && $(MAKE) MAKEFLAGS=