Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Complex Projects with a META-Makefile

Posted on 1999-07-16
1
Medium Priority
?
306 Views
Last Modified: 2008-02-01
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??
0
Comment
Question by:kdkd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 300 total points
ID: 1200371
Simply use a makefile similar to this one:

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


SDKPROJ =Begin


#
# 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.
#

$(DIRS):
!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!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question