Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Including files from other locations in a build: (3 Items)
   
Including files from other locations in a build  
Windows 7/64, Momentics IDE 4.7.0

We have an existing cross-platform library that is built for Windows, Linux, Mac OS X.  We are now adding a QNX build of
 that library.  Linux and Mac are built using simple Makefiles.  Windows is built in the Visual Studio environment.  
they all occupy the same directory structure which is part of an SVN repository.

To keep the QNX/Eclipse bits from "polluting" the repo too much, we want to put them in a separate folder, e.g.:

.
   api
   api/src
   api/include
   test
   QNXLibrary       <--- Here's where all the Momentix project stuff will go.

To do this, we somehow need to tell the Momentix project to pull sources from above its own directory tree.

How do we go about adding individual source files from elsewhere on the filesystem?  They'll always be the same relative
 path from the QNXLibrary portion.
Re: Including files from other locations in a build  
Hi, Jake,

This depends on the kind of project that you are using for the QNX platform build.  For a QNX recursive makefile project
 it is different than for a custom makefile project and different again for a managed-build project (with or generation 
of makefiles for external "make" builds).

For a QNX recursive makefile project, you can add the "QNXLibrary" location to the EXTRA_SRCVPATH macro in the common.mk
 (which may not yet be defined).  See the documentation of the "Conventions for Recursive Makefiles" in the Neutrino 
Programmer's Guide in the on-line help for details of that.

For a managed-build project, you can create a linked folder that virtually imports the "QNXLibrary" directory into your 
project, then add it as a source folder in your build configuration.

For a custom makefile, well, that's up to you.  It depends on how you have designed your makefile.

If you need to cherry-pick individual source files from the QNXLibrary, then it becomes more complicated.

HTH,

Christian


On 2011-12-29, at 12:19 PM, Jake Janovetz wrote:

> Windows 7/64, Momentics IDE 4.7.0
> 
> We have an existing cross-platform library that is built for Windows, Linux, Mac OS X.  We are now adding a QNX build 
of that library.  Linux and Mac are built using simple Makefiles.  Windows is built in the Visual Studio environment.  
they all occupy the same directory structure which is part of an SVN repository.
> 
> To keep the QNX/Eclipse bits from "polluting" the repo too much, we want to put them in a separate folder, e.g.:
> 
> .
>   api
>   api/src
>   api/include
>   test
>   QNXLibrary       <--- Here's where all the Momentix project stuff will go.
> 
> To do this, we somehow need to tell the Momentix project to pull sources from above its own directory tree.
> 
> How do we go about adding individual source files from elsewhere on the filesystem?  They'll always be the same 
relative path from the QNXLibrary portion.
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post90774
> 
Re: Including files from other locations in a build  
Christian--

Thanks for the info.  Armed with the information of what works and doesn't, we made some changes to our sources to just 
conditionally compile the whole lot based on the target for now.  Would prefer a more granular approach to adding / 
removing sources, but this works for now.