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]
Other format: [Raw text]

Fw: adding a path to include search path


Eljay,

Is there also a way to get the directory where the makefile resides in the
makefile itself?? I have a problem with linking my file. I want to link a
library, but the library is not in my include path, bu obviously in the same
directory as the makefile. There is a toggle switch for the linker to
include the directory, and it works fine, but how can I accomplish this
automatically, i.e. not hardcoding the path for the makefile.

Kind regards, Darius Blaszijk

----- Original Message -----
From: Eljay Love-Jensen <eljay@adobe.com>
To: Justin Miller <millerj@wam.umd.edu>; <gcc-help@gcc.gnu.org>
Sent: Friday, July 25, 2003 6:43 PM
Subject: Re: adding a path to include search path


> Hi Justin,
>
> In your makefile, add the CC and CXX defined variables:
>
> --------8<--------
> CC := gcc -idirafter /home/justin/kcool
> CXX := g++ -idirafter /home/justin/kcool
>
> # yada yada yada...
> --------8<--------
>
> Or you can do it from the command line:
>
> make CC='gcc -idirafter /home/justin/kcool' CXX='g++ -idirafter
/home/justin/kcool' -f MyKCoolProject
>
> If your makefile isn't using $(CC) and $(CXX) for compilation (**gasp**!),
you'll need to find an alternative.
>
> HTH,
> --Eljay
>
>
>
>



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