Re: Noobilicious: Is there a g++ option to specify 'source directories'?
From: WTH (ih8spam_at_spamtrap.com)
Date: Tue, 16 Mar 2004 09:46:28 -0500
"Nils O. Selåsdal" <email@example.com> wrote in message
> In article <_tu5c.82281$JN2.firstname.lastname@example.org>, WTH wrote:
> > I have some common unix code in a folder that I'd like to be able to
> > to without using a wildcar like ./unixsource/* because some is for Linux
> > some is for Irix.
> > Is there a way to tell g++ to look into particular directories for the
> > I list after "-c", for example:
> Not that I know of.
> > SOURCE_DIR = ./unixsource
> > g++ -c CSceneGraph.cpp CNodes.cpp -I./includes -srcdir $(SOURCE_DIR)
> Why not simply
> g++ -c $(SOURCE_DIR)/CSceneGraph.cpp $(SOURCE_DIR)/CNodes.cpp -I./includes
I can, I was just hoping there was a nice little trick to doing it so that
the Makefile would be more readable, something like -srcdir. :)
Apparently, as long as I'm using make (or a derivative) I can use VPATH to