This directory contains:
- Tools to build Phalcon extension from source - they are located in the current directory
- Copied, merged and optimized Phalcon source files, which are used during the build - they are located in
- Resources for build process (config files and source code of build generator) - they are located in
- Tool to re-generate copied Phalcon source files according to the main source files - that is
Preparing source code to be built
You can omit this step, if you've got source code for stable Phalcon version. Everything is up-to-date there.
The source code, used to build Phalcon extension, is not the actual code, being developed. When preparing to build
gen-build.php script needs to be executed. It copies, merges and slightly optimizes all the
sources, putting them into
The algorithm of
gen-build.php is as follows:
- Walk through all the code in
- Merge all the found files and copy them into
- Pre-calculate hashes for 32 bit PHP and 64 bit PHP and put optimized sources into corresponding
- Copy Linux and Windows build configs from to build directories
After those manipulations, any of the build directories contain full code, which can be used to build Phalcon. The differences of the directories are:
<php-version>/safedirectory contain source code to build Phalcon for any PHP - either 32 bit or 64 bit
<php-version>/32bitsdirectory contain slightly optimized source code to build Phalcon for 32 bit PHP, it will not work properly with 64 bit PHP
<php-version>/64bitsdirectory contain slightly optimized source code to build Phalcon for 64 bit PHP, it will not work properly with 32 bit PHP
gen-build.php, if you're working with development version of Phalcon sources and want to rebuild the extension.
Running the tool for stable version of Phalcon sources will not do anything new, because build directories are
regenerated by Phalcon team for every stable release.
The tool requires PHP 5.5+ to regenerate
<php-version>/safe directory. Additionally, installed Phalcon extension is
needed to regenerate
gen-build.php you are ready to build Phalcon extension.
Building extension for Linux
Please, refer to Phalcon documentation
Building extension for Windows
Please, refer to Phalcon Internals documentation