This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Using Implicit rule while browsing through directories to compile in GNU Make


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 :) :) !


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]