I just added a small project "irrBuild" to sourceforge.net and hope it helps.
irrBuild: http://irrbuild.sourceforge.net/
irrBuild generates native solution, Makefile and workspace for irrlicht library and its examples. It also can be used as build template for cross platform irrlicht applications.
Currently it supports :
* Windows :
1 Microsoft Visual Studio 2003
2 Microsoft Visual Studio 2005
3 Microsoft Visual Studio 2008
4 Code::Blocks 8.02 (MinGW gcc)
* Linux/GNU
1 GNU Make
2 Code::Blocks 8.02 (gcc)
For Windows platform, all of the drivers ( Direct3D, OpenGL and other software renders) are supported by default. All the above builds contain the following configurations:
* debug_shared
* release_shared
* debug_static
* release_static
Using batch build you can build all of the configurations at the same time.
irrBuild is released under Zlib/libpng license (same as irrlicht), you can use it as a template to generate the necessary solution/Makefile/workspace for your irrlicht-based applications.
Download it @
Release:
http://sourceforge.net/project/showfile ... _id=248344
SVN:
svn co https://irrbuild.svn.sourceforge.net/svnroot/irrbuild
See the above sourceforge page for details.
HTH,
Jiang
Here is the verbose README copied from the current release.
Code: Select all
This is the README file for irrBuild - The automatic build system for irrlicht
How to use irrBuild (an quick introduction)
=========================================================
* First copy "build" folder to irrlicht's as top level folder.
After that the top directories should look like this:
Root
|-bin/
|-build/ (<-- the new added build folder)
|-doc/
|-examples/
|-include/
|-lib/
|-media/
|-scripts/
|-source/
|-tests/
|-tools/
* [Windows: Microsoft Visual Studio]
To build irrlicht and its examples using Visual Studio 2003, 2005, 2008,
execute (double-click) the corresponding bat file in "build" folder:
* CreateVs2003Solution.bat (for Visual Studio 2003)
* CreateVs2005Solution.bat (for Visual Studio 2005)
* CreateVs2008Solution.bat (for Visual Studio 2008)
, and load the generated solution to your IDE.
Note the Direct3D SDK related include/library path are hard-coded in "irrlicht.lua",
if they are not specified within your IDE, then probably you should change
the definitions according to your SDK setting.
* [Linux/GNU: make]
To build irrlicht using makefile, first execute the following shell script:
* CreateGnuMakefile.sh (for Linux/GNU make)
,and then do the necessary build for your configurations within the build
directory. For example:
$ make CONFIG=release_static
$
$ make CONFIG=debug_shared
* [Windows, Linux/GNU: Code::Blocks 8.02]
To build irrlicht and its examples using Code::Blcoks, execute the
following shell/bat script:
* CreateCodeBlocksGccSolution.bat (for Windows)
* CreateCodeBlocksGccSolution.sh (for Linux/GNU)
and then load the generated workspace to your Code::Blocks IDE.
Note1: The all the Windows builds (Visual Studio, Code::Blocks) will build
all the drivers (Direct3D, OpenGL, software ...) and all dependencies (zlib,
libpng, ...) by default.
Note2: The Linux build for shared library works but current you must copy the
generated shared libraries to your library directory.
What will irrBuild build
=========================================================
irrBuild will build the following four configurations for irrlicht library
and its examples.
* debug_shared (debug version shared library and examples)
* debug_static (debug version static library and examples)
* release_shared (release version shared library and examples)
* release_shared (release version static library and examples)
Binary output and naming convention
=========================================================
irrBuild will never pollute irrlicht's source tree. That is, irrBuild will
*not* change any file and directory in irrlicht. So you can always use
irrlicht's original solution/Makefile/workspace if you want.
Of course, irrBuild will do add several directories for the built libraries
and executables. However, different names used and they will not conflict
with the files built by irrlicht's build system.
Suppose the root directory of irrlicht's source tree is Root, then by default
irrBuild will put libraries to
Root/lib/[target]/
,here [target] can be any
* vs2003
* vs2005
* vs2008
* gcc
* cb-gcc
, depends on your build target. And the executables are put in
Root/bin/[target]
, and [target] has exactly the same definition as explained above.
So you see none of them conflict with irrlicht's naming convention.
It is possible specify different output sub-directory for individual
configuration, but the examples use hard-coded path for necessary
media/resource, so the current is convenient for quick tests.
Also irrBuild uses following naming convention for individual built
files:
* debug build will add postfix "d" to the built binaries (lib, exe)
* debug build will add postfix "mt" to the static-link binaries (lib, exe)
For example, the debug DLL version of irrlicht library will be
generated as:
irrlichtd.lib
irrlichtd.dll
and the release static-linked version of irrlicht library is built as:
irrlichtmt.lib
Note the postfix "mt" means "multithreaded", as irrBuild always use
multithreaded DLL version runtime libraries.
Change the build option and internal information
=========================================================
1. Check premake @ sourceforge to get the details of premake. Some predefined options
are supported by premake. ( For example, disable exception, static version
runtime library, etc. )
2. New configurations can be added by changing "premake.lua".
3. For Code::Blocks, it is necessary to tell MinGW's gcc compiler the file type, which
is important for gcc to choose the back-end compiler (gcc, or g++). Unfortunately
currently premake can not do this automatically according to the file extensions
(.c or .cpp). Without such a functionality the MinGW compiler will give errors
for invalid symbol issues.
This problem is now solved by separate the third-party libraries (zlib, libpng,
libjpeg) to other builds, which are explicitly specified to use C language,
instead of C++ language. And later when building the examples, these third-party
libraries will be linked automatically. This is possible since premake can do the
necessary dependency check and it is guaranteed that the third-party libraries
will be built before the irrlicht library and examples. The build scripts in
"internal" are used for this purpose. This is not a clean solution but it works
for now.
4. The main differences between irrBuild based solutions and irrlicht's solution.
* Different naming convention used. Postfixes used to distinguish the different
configurations.
* For Visual Studio, DLL version of the runtime libraries are used in irrBuild.
* Although premake supports "no-exceptions", but unfortunately irrlicht does
throw exceptions (for example, irrMap.h), which results in compilation errors
for MinGW gcc. Therefore "no-exceptions" was removed currently. However, it
is trivial to add this option for Visual Studio.
* For Visual Studio, "/fp:precise" is used for all the configuration. Remove the
definition and add "/fp:fast" in "irrlicht.lua" if you want to use the unsafe
floating point arithmetics.
* "winmm.lib" is added for individual example and the core irrlicht library will
not like it.
* Highest warning level is set and the compilation is quite noisy, especially for
Visual Studio.
* Global library link time optimization is turned off.
TODO list
=========================================================
1. Improvement on Code::Blocks workspace generation.
2. Add "make install" for both Linux/GNU static and shared library builds.
3. Instead of copying "build" folder to the irrlicht source tree manually,
find a better way for searching and link the irrlicht tree.
4. Add build scripts for testsuite.
5. Add CYGWIN support (low priority).
=========================================================
end of README
=========================================================