compile options and subdirectories
tasin at fhm.edu
Sat Mar 23 21:48:31 GMT 2002
Jiann-Ming Su wrote:
>Ok, let's say I have the following directory structure in the kdevelop project:
>In the src/ directory, I have files that include headers from both lib1dir/
>and lib2dir/ subdirectories, so getting it to compile is pretty easy
>by passing it "-I./lib1dir -I./lib2dir".
Is it a static library or a libtool library (i.e. mostly shared lib)?
I assume we are talking about a static lib and you don't want to change
this, because on libtool libs maybe those header files should be
installed on ..../include-dirs and this would change the explanation a
>However, what if files in lib1dir/
>includes headers from lib2dir/ and vice versa? Now, I have to pass
>"-I./lib1dir -I./lib2dir -I../lib1dir -I../lib2dir" for the entire program
>to compile correctly. Is there a more elegant solution?
>"-I./lib*dir" is only good for the src/ directory, "-I./lib1dir" is only
>good for lib2dir/ subdirectory, and "-I./lib2dir" is only good for lib1dir/
>subdirectory, so passing the whole option string to the entire build
>process seems like a bad hack. How do I customize the "-I" option for each
>individual directory? Thanks for any help.
You have to patch the corrisponding Makefile.am. Search for the
INCLUDES = $(all_includes)
and change this to
INCLUDES = -I../lib1dir $(all_includes)
INCLUDES = -I../lib2dir $(all_includes)
If you have the INCLUDES= directive inside the kdevelop specific part of
the Makefile.am, so between
####### kdevelop will overwrite this part!!! (begin)##########
####### kdevelop will overwrite this part!!! (end)###########
you have to move this line outside of it. Save these Makefile.ams and run
"Build->Autoconf/automake" and "Build->Configure..."
After that your additional include-pathes are available.
N.B.: if somebody will help you developping your project with automake
1.5 you will have to update to an actual version of KDevelop (more
recent than 2.0.2).
Another solution to your problem is using
inside your sources.
The KDevelop project: tasin at kdevelop.de [www.kdevelop.org]
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
:-------W. Tasin, FB 04,FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645>
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
More information about the KDevelop