This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Fw: adding a path to include search path
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: <dhkblaszyk at zeelandnet dot nl>, <gcc-help at gcc dot gnu dot org>
- Date: Fri, 25 Jul 2003 12:40:39 -0500
- Subject: Re: Fw: adding a path to include search path
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