Hi all,
I am glad to introduce a new script specifically designed for PixInsight/PCL developers: MakefileGenerator.
As its name suggests, this is a script for automatic generation of makefiles and project files for PCL-based PixInsight development projects. It covers all platforms and architectures currently supported by PixInsight: Linux/X11, Mac OS X and Windows, x86 and x86_64. Standard GNU make makefiles are generated for GCC on Linux and Mac OS X, and .vcproj XML project files for Visual C++ 2008 on Windows.
MakefileGenerator is being released under GPL v3 license. This is the script source code:
http://pteam.pixinsight.com/MakefileGenerator.js.zipand here is a screenshot of the script's interface:
MakefileGenerator has been written primarily as an internal tool. In fact, the entire PixInsight platform is being re-built with makefiles and projects generated by this script. This is from now on an essential element of PixInsight's multiplatform development chain.
I have decided to release this script because I think it can be extremely useful for developers on the PixInsight/PCL framework. Now you don't have to worry about the correct symbols defined, or the appropriate settings and compiler optimizations for each platform: just run the script, select the directory where you have your module source code, and click OK with default script settings. This will generate all necessary makefiles and projects for all platforms.
MakefileGenerator makes just one assumption: all the source code of your module (including .cpp, .h and resource files) lies under a single directory. There can be any number of subdirectories, but one root only. As long as this is your case, MakefileGenerator will work for you.
The script has been written for the new PCL version, which still has not been published. The new PCL introduces some breaking changes that require making a few manual changes to your current PCL installation in order to use generated makefiles and .vcproj files:
* All PCL libraries (both static and dynamic) carry the -pxi filename suffix on all platforms. Consequently, denoting as <PCL> your current PCL installation directory, you have to
rename:
- Linux and Mac OS X:
<PCL>/lib/PCL.a as
<PCL>/lib/PCL-pxi.a- Windows:
<PCL>\lib\PCL-vc9.lib as
<PCL>\lib\PCL-pxi.lib* All PCL libraries are from now on located on architecture-specific directories. You must
move your PCL-pxi.a or PCL-pxi.lib to a newly created
<PCL>/lib/x86 or
<PCL>/lib/x86_64 directory, depending on your platform/architecture. See the new PCLLIBDIR32 and PCLLIBDIR64 environmental variables below.
* The following environmental variables must be defined
on all platforms:
PCLDIR - PCL root installation directory. Usually ~/PCL or C:\PCL
PCLINCDIR - PCL include root directory, usually equal to $PCLDIR/include
PCLSRCDIR - PCL source root directory, usually equal to $PCLDIR/src
PCLLIBDIR32 - PCL 32-bit libraries directory, usually equal to $PCLDIR/lib/x86
PCLLIBDIR64 - PCL 64-bit libraries directory, usually equal to $PCLDIR/lib/x86_64
PCLBINDIR32 - PCL 32-bit binaries directory, usually equal to $PCLDIR/bin (on x86 platforms)
PCLBINDIR64 - PCL 64-bit binaries directory, usually equal to $PCLDIR/bin (on x86_64 platforms)
Let me know if you need more information, or if you find some error in generated makefiles or .vcproj files.
Enjoy!