public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Using Implicit rule while browsing through directories to compile in GNU Make
@ 2001-02-13  1:42 Nick Ng
  2001-02-13  2:23 ` Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Ng @ 2001-02-13  1:42 UTC (permalink / raw)
  To: gcc

Hi there:

I have a directory in my development like:
	src -
		prg1
		prg2
		prg3

Where all of source file (C) are stored in 3 different sub-dirs. If I
defined the implicit rule like:

%.o : %.c
        $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

Can anyone please tell me how to ask make to browse through each of these
sub-dirs and apply the implicit rule on it. I understood a PHONY target can
be a good starting point to kick off multiple target build. Any help is
appreciated :) :) !

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using Implicit rule while browsing through directories to compile in GNU Make
  2001-02-13  1:42 Using Implicit rule while browsing through directories to compile in GNU Make Nick Ng
@ 2001-02-13  2:23 ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-02-13  2:23 UTC (permalink / raw)
  To: Nick Ng; +Cc: gcc

On Feb 13, 2001, "Nick Ng" <nick@std.abk.nec.co.jp> wrote:

> Can anyone please tell me how to ask make to browse through each of these
> sub-dirs and apply the implicit rule on it.

This has absolutely nothing to do with GCC.  Please use an appropriate
forum next time, for example, some newsgroup about Unix programming or
Makefiles.

> Any help is appreciated :) :) !

Look for VPATH in the manual of GNU make.  But beware portability
problems: very few `make's support VPATH correctly.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-13  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-13  1:42 Using Implicit rule while browsing through directories to compile in GNU Make Nick Ng
2001-02-13  2:23 ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).