delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/13/13:30:43

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How Can Makefiles Handle Source File in Extraneous Directories?
Date: 13 Aug 2003 16:53:54 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 22
Message-ID: <bhdqf2$9al$1@nets3.rz.RWTH-Aachen.DE>
References: <978b35e2 DOT 0308130707 DOT 1f7d42bf AT posting DOT google DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1060793634 9557 137.226.32.75 (13 Aug 2003 16:53:54 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 13 Aug 2003 16:53:54 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Geoff Robinson <geoffr2 AT aol DOT com> wrote:
> Hello all,

> I am trying to compile a number of source code files into one
> executable.  They cross multiple directories.  Using the makefile
> template I have for djgpp, I'm having problems.  I have to fully
> specify the file not in my local directory.  The object file created
> from that source file is moved into my local directory.  The compiler
> assumes the object file is in the other directory instead.

That's what the VPATH feature is for.  Note that it only works if
filenames in different directories are all distinct, though.  I.e. you
can't have both foo/bar.c and baz/bar.c in your project at once.

And if at all possible, do *not* use drive letters, and especially not
backslashes as directory separators in your target lists.  It may work
a good part of the time, thanks to Eli's and other people's efforts,
but don't count on this to be reliable.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019