compiler options

Jens Zurheide jens.zurheide at gmx.de
Wed Feb 27 21:39:02 UTC 2002


Hi,

Wednesday 27 February 2002 00:52 August Hörandl
>i have got a project with a lot of classes in different
>subdirectories and subsubdirectories
>
>to find all the header files i included "-I .. -I ../.. "
>to the compiler options to include the project directory
>into the path
>
>1. question:
>is there an easy way to say "-I $topdirectoryofproject"
Just look at the Makefile.am files of the kde libraries ;)
For instance in khtml there is a line
INCLUDES = -I$(top_srcdir)/kjs -I$(top_srcdir)/kimgio
Unfortunately I haven't found a really clean solution. I usually copy the 
INCLUDES = ... line created by kdevelop to a place somewhere outside the 
"Do not modify" area and append the parameters I need. Maybe using 
INCLUDES = $(INCLUDES) -I($top_srcdir) could work as well but I haven't 
tested this.
>2. problem
>wenn i use kdevelop it calls
>
>run: CPP="cpp" CC="gcc" CXX="g++" CPPFLAGS="" CFLAGS=""
>CXXFLAGS="-O0 -g3 -Wall -W -I.. -I../.. -I../../.." LDFLAGS=""
>/home/hoerandl/work/project2/configure
>
>this works fine - but if i want to distribute the project it
>should be possible to call just ./configure without any
>additional CXXFLAGS
>
>which file to hack or can this done within kdevelop ?
>
>
>Gustl





More information about the KDevelop-devel mailing list