[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert nmake Makefile to GNU Makefile

From: Tom Browder
Subject: Re: Convert nmake Makefile to GNU Makefile
Date: Tue, 3 Mar 2009 16:06:08 -0600

On Tue, Mar 3, 2009 at 1:22 PM, Achugatla, Vijay K. (LNG-CON)
<address@hidden> wrote:
> The info at is really useful.


> But I have a 100s of files in a directory. I can not give the names of all
> the files inside the Makefile.
> Is there any option or directive available in GNU make that searches a
> directory and gets the names of all the files available in that and then
> store that in a variable?

Have you looked at the manual?

Check here, for one place:

You can always do something like:

SRC1 := ./somdir/*.cc

And then use text functions on the list.

> Also any idea how to set a destination directory? I mean I want to store all
> the object files in a directory and the executable in another directory. How
> to achieve that?

See here for some discussions on installation:

One way to "store" files by type in different directories is with
special targets:

<tab> mv $(OBJ) $(OBJ_STO_DIR)

Or use the file/text functions to manipulate the desired directory in
your build targets.

Lots of ways to things.  There are many examples of Makefiles on and  There is also the book from O'Reilly:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]