Christian Damus(deleted)
|
Re: Seperating the IDE / build project from the source tree
|
Christian Damus(deleted)
06/14/2010 11:33 AM
post56759
|
Re: Seperating the IDE / build project from the source tree
Hi, Christopher,
Using the recursive makefiles provided with the QNX SDP, you can
maintain a single source tree that targets Win32 and Linux operating
systems in addition to Neutrino. The project layout looks like
project
- Makefile [LIST=COMPONENT]
+ <component1>
- Makefile [LIST=OS]
- common.mk
+ nto
- Makefile [LIST=CPU]
+ <cpu>
- Makefile [LIST=VARIANT]
+ <variant>
- Makefile [include ../../../common.mk]
+ win32
- Makefile [LIST=CPU]
+ x86
- Makefile [LIST=VARIANT]
+ <variant>
- Makefile [include ../../../common.mk]
+ linux
- Makefile [LIST=CPU]
+ x86
- Makefile [LIST=VARIANT]
+ <variant>
- Makefile [include ../../../common.mk]
+ <component1>
...
See the Programmer's Guide documentation for details of how this layout
works:
http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html
Platform-specific considerations can be managed using a QNX C/C++
Project in the common.mk, with its extended macro syntax for variants.
If you don't want to maintain Makefiles in your source tree, then you
should be able to accomplish the separation that you describe using
plain makefile projects (New C/C++ Project, the "Makefile project ->
Empty project" template) with the "No toolchain" option. A managed-make
project won't work because you will need different toolchains for the
different platforms, but a managed project only has one toolchain.
Put your Makefiles in the build/<component1>/<platform1> etc. folders
and have them compile the sources from the src/<component1> etc.
trees. For an example of how this might work in the IDE, create a
Managed Make project with a source folder that links to a folder in some
other project. Update the project settings to use the external "Gnu
Make Builder" and build the project to generate the makefiles. The
generated files will use absolute paths where you would want to use
relative paths for workspace portability, but otherwise the basic
structure should work similarly. I expect that it would take a fair
amount of work to set this up, with duplication across all of the
platform build folders, which will be a bit of a maintenance headache as
the source tree evolves. The QNX SDP's recursive makefiles really do
greatly simplify this problem.
Where running and debugging is concerned, the IDE provides all of the
flexibility that you need to configure gdb's library search path, source
look-up path, etc. You would need different launch configurations for
the different platform binaries, of course, each using the appropriate
gdb, but that's all straightforward to do. Including sources in your
project via linked folders makes them appear to be members of that
project, and all the usual editing functions should "just work."
HTH,
Christian
On 14/06/10 10:43 AM, Christopher Pohl wrote:
> Dear all,
>
> for a platform component which is built for multiple target architectures (not only QNX) we would like to organize the
source tree seperately from the build files and IDE project files, something like this:
>
> project
> + build
> + container
> +<platofrm1>
> +<platform2>
> +<component1>
> +<platform1>
> +<platform2>
> +<component2>
> +<platform1>
> +<platform2>
> + [...]
> + src
> +<component1>
> ...
View Full Message
|
|
|