[Lazarus] Lazarus project compile flags

Michael Van Canneyt michael at freepascal.org
Sat Jan 31 00:38:15 CET 2015



On Fri, 30 Jan 2015, Toan Pham wrote:

> 
> Mattias,
> 
> 
> Autotool, cmake and pkgconfig are tools for configuring and building C/C++ projects.
> The tools are very helpful because they allow the developers/software builders to detect software dependencies, version requirements,
> and also configure software features at build-time.  For example,
> let's say we want to build gtk-2, we would do the following steps:
> 
> 1.  Download the source code & unzip it
> 2.  We want to configure it, without opengl support (just to illustrate this example)
>      ./configure --disable-opengl
> 
> 3.  When we do this, auto-tool would call pkg-config (another utility), and see if it has libcairo version 2.1 and freefont library
> version 1.1 (for example).
> 
> 4.  If the dependencies are satisfied, pkg-config also tells auto-tool where to look for the libraries, by giving the CFLAGS and
> LFLAGS 
> 
> in a nutshell, that's how it works.  At first, the process looks like there is alot of work to build a package; but in practice; 
> its a standard way to build software, and it becomes very easier to manage when one has to build a linux distribution.
> 
> Object pascal and Lazarus projects are a little bit different.  I normally build those projects manually with lazarus.  lazbuild is
> nice, but it encapsulates many features from developers.  I understand you can use -k option to pass options to the linker etc...  But
> let say, you have 200+ pascal programs and libraries, how are you build them effective?
> 
> 
> You may think lazbuild is the solution; but let's say if you are a linux distributor and you have to build 200+ projects and libraries
> for different architectures, lazbuild may not be enough. 

Why do you think so ?

I have a fully automated build environment that uses lazbuild, guided by a custom written program and a shell script.
It works transparantly on linux and windows. 
It results in an installer on both platforms: 
inno setup on windows, self-extracting shell script on linux, built from the same .iss file.

This system compiles 40 interdependent packages/projects without human intervention; 
lazbuild takes care of the dependencies, paths and compiler options.
Moreover, different versions of packages are handled without problems.

I see no reason why it could not handle 200+ projects.

Using the --pcp option I can even use different lazarus setups for daily builds and release builds.

As far as I can see, Lazarus offers all you need. What do you think is missing ?

Michael.


More information about the Lazarus mailing list