Fw: adding a path to include search path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
To: Justin Miller <millerj@xxxxxxxxxxx>; <gcc-help@xxxxxxxxxxx>
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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux