Splitting up a large project into subfolders?

Simon Ejsing simon at esoft.dk
Fri Jun 11 10:26:06 UTC 2004


On Friday 11 June 2004 01:06, Sascha Cunz wrote:
> Hi Simon,
> like Steven I can feel your pain here.
>
> Well, it is common to archive the same by creating subdirectories
> containing staticly or dynamically linked libraries. ( See what Andras
> Mantia suggested here )
>
> However, I have heard of people using "subdir/file1.cpp subdir/file2.cpp"
> in Makefile.am. And they are telling that it works. KDevelop has no way of
> creating such a Makefile.am with the user interface.
>
> Actually, i never tried whether kdevelop can handle "subdir/file1.cpp"
> entries in Makefile.am correctly. I would not know anything off my head
> which would make kdevelop deny working with such a Makefile.am (once it
> exists).
>
> As i think, this solution is pretty much what you're looking for, i'd
> suggest to try moving the texture.cpp and texture.h files into a sub
> directory called texture and then modifiy the Makefile.am manually with a
> text editor. I _think_ you have to change "texture.cpp" to
> "texture/texture.cpp" (same for .h file). Then open the project in kdevelop
> (Automake manager can get confused, if you change Makefile.am while project
> is open).
>
> As i've never really tried to do that, this is more like a "call for
> problems" than a final solution. I'm pretty sure that KDevelop will have
> trouble with files from subdirs being in a Makefile.am. So i'd appreciate
> any feedback on what's to be done in kdevelop to work under the above
> conditions.
>
> Cheers Sascha

	First of all, I would like to thank everyone for helping.

	The solution I've found from inside KDevelop and Automake manager, is to 
create a sub-project called "texture" with a target "Library" named 
"texture". This will create a texture.a static library. Inside this 
sub-project I just add the relevant files, then from the Automake manager of 
the main project you can add dependencies of this library, and also add it as 
a "convenience library inside project". The only downside of this effect is 
that the location of the header files changes, so if texture.cpp includes eg. 
"struct.h", this have to be changed to "../struct.h", but that's correct 
anyway :)

	This solution works very well for me, however other problems may arise, that 
I don't know of yet.

-- 
Simon Ejsing, Systemudvikler
esoft ApS, http://www.esoft.dk
Skibhusvej 52C, DK-5000 Odense C.
Tlf: 70 222 466, Fax: 63 122 466




More information about the KDevelop-devel mailing list