Project powered by:
SourceForge.net
Here is a brief overview of how to work with subdirectories. The manual goes into more detail than we will here.

As you add subdirectories to your project, you need to list them in your Makefile:
#!/usr/bin/make -f
package.subdirs = dir1 dir2
include toc2.make
all: subdirs
The easiest way is to define them before including toc2.make because this allows the framework to automatically generate some of the underying code. If for some reason they cannot be listed before including the file (e.g., you want to use configuration information to determine whether or not to build a certain dir) you must do one more additional step:
#!/usr/bin/make -f
include toc2.make
package.subdirs = dir1 dir2
subdirs: subdir-dir1 subdir-dir2
all: subdirs
The package.subdirs variable is used by certain targets, like clean and install, so it must be set in addition to adding the subdir-XXX prerequisites to the subdirs target.

By ordering the prerequisites to the subdirs target, you can precisely control the order in which the subdirectories will be built:
#!/usr/bin/make -f
include toc2.make
package.subdirs = dir1 dir2
subdirs: subdir-dir1 subdir-dir2
myrule:
	@echo "hi, world"
all: subdir-dir1 myrule subdir-dir2