Complex Projects with a META-Makefile

I have a C++ project that is made up of many other projects that have certain dependencies. Now I want to build this project with nmake ( release and debug ) but I dont know how to write such a script for it. I think of using recursive calls to nmake for each project's makefile and setting the dependencies via targets and dependents in the "meta-makefile". How can this be done??
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Simply use a makefile similar to this one:

DIRS = \
    dll\~   \
    generic\~   \
    simple\~   \
    winhelp\~   \


# This is a Platform SDK non-leaf-node makefile.  It is used to allow NMAKE,
#  or a similar tool, to recursively build all of the samples in a directory
#  tree.  To add or remove a directory from the build process, modify the
#  DIRS list above.  
# The SDKPROJ macro (above) is defined solely for the purpose of echoing
#  the current directory location to the screen.  
# Do not modify this makefile except for the DIRS and SDKPROJ macros above.

# Include sdkpropbld.mak in order to get standard build options, environment
#  variables, and macros.  The sdkpropbld.mak file is installed with the SDK
#  in the include directory.

!include <sdkpropbld.mak>

# In order to build "all," process each of the entries in the DIRS list.

all: $(DIRS)

# In order to build each of the entries in the DIRS list, change dir into the
#  directory in question, echo the current location, run nmake recursively,
#  and change dir back to the original directory level.  This four step process
#  is encapsulated in sdkbld.mak which is installed with the SDK in the include
#  directory.

!include <sdkbld.mak>

(this is taken from an MS example, but it can easily be adapted to suite your needs)

Feel free to ask if you nee more information!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.