Re: Fw: adding a path to include search path

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

 



Hi Darius,

>Is there also a way to get the directory where the makefile resides in the makefile itself??

Put these two lines in the makefile:

CC  := gcc -idirafter $(shell pwd)
CXX := g++ -idirafter $(shell pwd)

That assumes the current working directory is the directory where the makefile is located.  (Possibly not always the situation, I suppose.)

You may need to do some string manipulation work with $(MAKEFILE_LIST) variable, if the $(shell pwd) isn't enough.

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