* questions for the C programmer
@ 2001-06-21 8:36 Kunal Jain
2001-06-21 12:54 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Kunal Jain @ 2001-06-21 8:36 UTC (permalink / raw)
To: gcc-help; +Cc: Arun Dev Qamra, Thalis A. Kalfigopoulos
Hi!
My problem is:-
I have a directory structure as follows ( I have simplified things by
reducing the number of directories and .c files).
main directory
|
------------------------------------------------
| | |
dir1 dir2 dir3
(Makefile) | |
--------------- -------------
| | | |
A.c B.c A.h B.h
I need to compile the code such that all the object files are created in
dir1 and the final execuatble is also created in dir1. I cannot use an
implicit declaration in my Makefile like
.o.c :
$(CC) $(CFLAGS) -c $*.c
because the .c files are in different directories. There could be an
alternative if I can declare something like a search path. Essentially, my
problem is "Is there such an implicit declaration possible?"
and if yes How do you set the search path for the .c files in a Makefile ?
thanks
Kunal
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: questions for the C programmer
2001-06-21 8:36 questions for the C programmer Kunal Jain
@ 2001-06-21 12:54 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2001-06-21 12:54 UTC (permalink / raw)
To: Kunal Jain; +Cc: gcc-help, Arun Dev Qamra, Thalis A. Kalfigopoulos
On Jun 21, 2001, Kunal Jain <kuj3+@pitt.edu> wrote:
> How do you set the search path for the .c files in a Makefile ?
This has nothing to do with GCC. Search for VPATH in the GNU make
manual.
--
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-06-21 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21 8:36 questions for the C programmer Kunal Jain
2001-06-21 12:54 ` 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).