Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-01

Lazarus project compile flags

18 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Toan Pham

Hi,

When we compile an object-pascal/delphi project, we generally rely on Lazarus to do the work.
Yet, normally Lazarus knows how a project is setup and knows link the project with its run-time library. This is good, but not so good if you want to compile the application without lazarus.

So, as an example, a object pascal project may have the following FPC_FLAGS:

-MObjFPC -Scghi -O1 -g -gl -vewnhi -Filib/i386-linux -Fl/opt/gnome/lib -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux/gtk2 -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux
-Fu/usr/lib/lazarus/1.2.4/components/lazutils/lib/i386-linux -Fu/usr/lib/lazarus/1.2.4/packager/units/i386-linux -Fu. -FUlib/i386-linux -l -dLCL -dLCLgtk2

These directives are the equivalent of C++/C, compile and link flags. Typically we call pkg-config to find out the flags when we compile a c/C++ application. Is there a lazarus/fpc utility that is equivalent to pkg-config that would allow me to find out these flags at compile/configure time?

I really want to be able to build a project without lazarus, and on different machine machines.

Thank you,

Toan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150130/fc8fbef3/attachment.html>

Reply by email

Mattias Gaertner
to Toan Pham
Show quoted text 27 lines
Hi, When we compile an object-pascal/delphi project, we generally rely on Lazarus to do the work. Yet, normally Lazarus knows how a project is setup and knows link the project with its run-time library. This is good, but not so good if you want to compile the application without lazarus. So, as an example, a object pascal project may have the following FPC_FLAGS: -MObjFPC -Scghi -O1 -g -gl -vewnhi -Filib/i386-linux -Fl/opt/gnome/lib -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux/gtk2 -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux -Fu/usr/lib/lazarus/1.2.4/components/lazutils/lib/i386-linux -Fu/usr/lib/lazarus/1.2.4/packager/units/i386-linux -Fu. -FUlib/i386-linux -l -dLCL -dLCLgtk2 These directives are the equivalent of C++/C, compile and link flags. Typically we call pkg-config to find out the flags when we compile a c/C++ application. Is there a lazarus/fpc utility that is equivalent to pkg-config that would allow me to find out these flags at compile/configure time? I really want to be able to build a project without lazarus, and on different machine machines.

You can use lazbuild to build without the IDE. You can build lazbuild on machines without GUI libraries:
make lazbuild

Mattias

Reply by email

Toan Pham
to Mattias Gaertner

Mattias,

lazbuild does the work, but then i even want to get away from lazbuild dependency.
I muck around with fpcmake but then, it too can't really create a proper makefile project.
for some reasons, fpcmake failed to know where to locate the LCL gtk2 interface directory.
The best way is probably to do it manually, like autoconfigure and pkg-config.
Please share if you know of other ways.

thank you

On Fri, Jan 30, 2015 at 4:17 PM, Mattias Gaertner <

Show quoted text 50 lines
wrote: On Fri, 30 Jan 2015 12:56:12 -0500 Toan Pham wrote: > Hi, > > > When we compile an object-pascal/delphi project, we generally rely on > Lazarus to do the work. > Yet, normally Lazarus knows how a project is setup and knows link the > project with its run-time library. This is good, but not so good if you > want to compile the application without lazarus. > > > So, as an example, a object pascal project may have the following FPC_FLAGS: > > -MObjFPC -Scghi -O1 -g -gl -vewnhi -Filib/i386-linux -Fl/opt/gnome/lib > -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux/gtk2 > -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux > -Fu/usr/lib/lazarus/1.2.4/components/lazutils/lib/i386-linux > -Fu/usr/lib/lazarus/1.2.4/packager/units/i386-linux -Fu. -FUlib/i386-linux > -l -dLCL -dLCLgtk2 > > These directives are the equivalent of C++/C, compile and link flags. > Typically we call pkg-config to find out the flags when we compile a c/C++ > application. Is there a lazarus/fpc utility that is equivalent to > pkg-config that would allow me to find out these flags at compile/configure > time? > > I really want to be able to build a project without lazarus, and on > different machine machines. You can use lazbuild to build without the IDE. You can build lazbuild on machines without GUI libraries: make lazbuild Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150130/11768e5c/attachment.html>

Reply by email

Toan Pham
to Toan Pham

Ideally, it would be nice to compile any fpc project using the following command:

fpc `fpc-config --cflags --ldflags rtl,lcl,lcl-gtk2,paszlib` project1.lpr

fpc-config is a utility that manages configuration of all packages, and knows where and what to pass along to the fpc compiler.

Toan Pham wrote 74 lines
Mattias, lazbuild does the work, but then i even want to get away from lazbuild dependency. I muck around with fpcmake but then, it too can't really create a proper makefile project. for some reasons, fpcmake failed to know where to locate the LCL gtk2 interface directory. The best way is probably to do it manually, like autoconfigure and pkg-config. Please share if you know of other ways. thank you On Fri, Jan 30, 2015 at 4:17 PM, Mattias Gaertner < > wrote: > On Fri, 30 Jan 2015 12:56:12 -0500 > Toan Pham wrote: > > > Hi, > > > > > > When we compile an object-pascal/delphi project, we generally rely on > > Lazarus to do the work. > > Yet, normally Lazarus knows how a project is setup and knows link the > > project with its run-time library. This is good, but not so good if you > > want to compile the application without lazarus. > > > > > > So, as an example, a object pascal project may have the following > FPC_FLAGS: > > > > -MObjFPC -Scghi -O1 -g -gl -vewnhi -Filib/i386-linux -Fl/opt/gnome/lib > > -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux/gtk2 > > -Fu/usr/lib/lazarus/1.2.4/lcl/units/i386-linux > > -Fu/usr/lib/lazarus/1.2.4/components/lazutils/lib/i386-linux > > -Fu/usr/lib/lazarus/1.2.4/packager/units/i386-linux -Fu. > -FUlib/i386-linux > > -l -dLCL -dLCLgtk2 > > > > These directives are the equivalent of C++/C, compile and link flags. > > Typically we call pkg-config to find out the flags when we compile a > c/C++ > > application. Is there a lazarus/fpc utility that is equivalent to > > pkg-config that would allow me to find out these flags at > compile/configure > > time? > > > > I really want to be able to build a project without lazarus, and on > > different machine machines. > > You can use lazbuild to build without the IDE. You can build lazbuild > on machines without GUI libraries: > make lazbuild > > > Mattias > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150130/743c59ae/attachment-0001.html>

Reply by email

Michael Van Canneyt
to Toan Pham
Toan Pham wrote 6 lines
Ideally, it would be nice to compile any fpc project using the following command: fpc `fpc-config --cflags --ldflags rtl,lcl,lcl-gtk2,paszlib` project1.lpr fpc-config is a utility that manages configuration of all packages, and knows where and what to pass along to the fpc compiler.

That is what lazbuild does ?

Michael.

Reply by email

Mattias Gaertner
to Toan Pham: lazbuild does the work, but then i even want to get away from lazbuild dependency. I muck…
Show quoted text 9 lines
[...] lazbuild does the work, but then i even want to get away from lazbuild dependency. I muck around with fpcmake but then, it too can't really create a proper makefile project. for some reasons, fpcmake failed to know where to locate the LCL gtk2 interface directory. The best way is probably to do it manually, like autoconfigure and pkg-config.

I'm not sure what you mean with autoconfigure and
pkg-config do it "manually".
If you want the full features you need lazbuild. If you don't want to use lazbuild then you have to explain what kind of project/packages you want to build.
What exactly should be done automatically and what manually?

Mattias

Reply by email

Mattias Gaertner
to Toan Pham: Ideally, it would be nice to compile any fpc project using the following command: fpc…
Show quoted text 7 lines
Ideally, it would be nice to compile any fpc project using the following command: fpc `fpc-config --cflags --ldflags rtl,lcl,lcl-gtk2,paszlib` project1.lpr fpc-config is a utility that manages configuration of all packages, and knows where and what to pass along to the fpc compiler.

What do you mean with cflags?
ldflags can be passed directly to fpc with -k.
rtl and paszlib are part of standard FPC.
lcl and lcl-gtk2 need to be built prior to the project with separate compiler calls (e.g. using make).
Many projects need more than calling the compiler to build.

Your system has everything to build gtk2 applications. And you have the lcl, so you have the Lazarus sources. And you have built them, so you have lazbuild. And you want to build a Lazarus project using Lazarus packages.
Why can't you use lazbuild?

Mattias

Reply by email

Toan Pham
to Mattias Gaertner: On Fri, 30 Jan 2015 16:42:55 -0500 I'm not sure what you mean with autoconfigure and…

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 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.

On Fri, Jan 30, 2015 at 5:22 PM, Mattias Gaertner <

Show quoted text 31 lines
wrote: On Fri, 30 Jan 2015 16:42:55 -0500 Toan Pham wrote: >[...] > lazbuild does the work, but then i even want to get away from lazbuild > dependency. > I muck around with fpcmake but then, it too can't really create a proper > makefile project. > for some reasons, fpcmake failed to know where to locate the LCL gtk2 > interface directory. > The best way is probably to do it manually, like autoconfigure and > pkg-config. I'm not sure what you mean with autoconfigure and pkg-config do it "manually". If you want the full features you need lazbuild. If you don't want to use lazbuild then you have to explain what kind of project/packages you want to build. What exactly should be done automatically and what manually? Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150130/c9fc0f8d/attachment.html>

Reply by email

Michael Van Canneyt
to Toan Pham
Toan Pham wrote 29 lines
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.

Reply by email

Mattias Gaertner
to Toan Pham: Autotool, cmake and pkgconfig are tools for configuring and building C/C++ projects. The…
Show quoted text 12 lines
[...] 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

About cflags:
Not usable by fpc.

About lflags:
The -l parameters are auto created by the compiler. This usually leaves none or very few options.

For example $(pkg-config --cflags --libs gtk+-2.0) provides no option needed by fpc.

About needed libraries:
Because of the above it usually works in FPC the other way round. You compile and if a library is missing you get an error message. You then install the missing library and try again.

Nevertheless you are right, it would be nice if you could get the list of needed libraries without compiling. You can use a tool like auto-tool for that.

Mattias

Reply by email

Mehmet Erol Sanliturk
to Michael Van Canneyt: Why do you think so ? I have a fully automated build environment that uses lazbuild,…

On Fri, Jan 30, 2015 at 3:38 PM, Michael Van Canneyt <

Show quoted text 72 lines
wrote: 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 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. --

Are these ( program sources and shell script ) open to public ? If "Yes" , would you please supply link(s) to download ?

Thank you very much .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150130/a4a69b85/attachment-0001.html>

Reply by email

Michael Van Canneyt
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote 6 lines
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.

[snip]

Are these ( program sources and shell script ) open to public ? If "Yes" , would you please supply link(s) to download ?

They are not available for public.

I can supply the '.iss -> zip file' code for linux, if that is of any use.

Michael.

Reply by email

FreeMan
to Michael Van Canneyt

Hi Michael,
Is it possible share simple example or link for example? I'm interesting use iss for linux. If I'm not wrong that can work in osx too. Thank you.

Michael Van Canneyt wrote 6 lines
They are not available for public. I can supply the '.iss -> zip file' code for linux, if that is of any use. Michael.

Reply by email

Mehmet Erol Sanliturk
to Michael Van Canneyt: [snip] They are not available for public. I can supply the '.iss -> zip file' code for…

On Sat, Jan 31, 2015 at 12:26 AM, Michael Van Canneyt <

Show quoted text 30 lines
wrote: On Fri, 30 Jan 2015, Mehmet Erol Sanliturk wrote: 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. > > [snip] > > Are these ( program sources and shell script ) open to public ? > If "Yes" , would you please supply link(s) to download ? > They are not available for public. I can supply the '.iss -> zip file' code for linux, if that is of any use. Michael. --

Dear Michael ,

My main interest is to learn to generate install files for FreeBSD similar to Linux .
Therefore , I do not know whether I can use the '.iss -> zip file' code for linux for such work .
You know better than me .

Thank you very much .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150131/365c7790/attachment.html>

Reply by email

Michael Van Canneyt
to Mehmet Erol Sanliturk
Mehmet Erol Sanliturk wrote 36 lines
On Sat, Jan 31, 2015 at 12:26 AM, Michael Van Canneyt wrote: On Fri, 30 Jan 2015, Mehmet Erol Sanliturk wrote: ? ? ? 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. [snip] Are these ( program sources and shell script ) open to public ? If "Yes" , would you please supply link(s) to download ? They are not available for public. I can supply the '.iss -> zip file' code for linux, if that is of any use. Michael. -- Dear Michael , My main interest is to learn to generate install files for FreeBSD similar to Linux . Therefore , I do not know whether I can use the '.iss -> zip file' code for linux for such work . You know better than me .

.iss is the source file for an Inno Setup installer, an installer for Windows.

I have FPC code that converts the [Files] section to a Zip file, which is then bundled with a custom setup.sh shell script to create a self-extracting installer. This is done with makeself (check internet for makeself).

The self-extracting installer works on any linux system that has unzip installed. Even that can probably be reduced to simply tar and compress, given some work.

According to the author, the makeself self-extractor should work on any unix compatible system.

If this is an acceptable procedure for you, then I can send the sources and the setup.sh script.

Michael.

Reply by email

Mehmet Erol Sanliturk
to Michael Van Canneyt

On Sat, Jan 31, 2015 at 6:42 AM, Michael Van Canneyt <

Show quoted text 74 lines
wrote: On Sat, 31 Jan 2015, Mehmet Erol Sanliturk wrote: > > On Sat, Jan 31, 2015 at 12:26 AM, Michael Van Canneyt < > > wrote: > > > On Fri, 30 Jan 2015, Mehmet Erol Sanliturk wrote: > > 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. > > [snip] > > Are these ( program sources and shell script ) open to public > ? > If "Yes" , would you please supply link(s) to download ? > > > They are not available for public. > > I can supply the '.iss -> zip file' code for linux, if that is of > any use. > > Michael. > > -- > > > > Dear Michael , > > My main interest is to learn to generate install files for FreeBSD > similar to Linux . > Therefore , I do not know whether I can use the '.iss -> zip file' code > for linux for such work . > You know better than me . > .iss is the source file for an Inno Setup installer, an installer for Windows. I have FPC code that converts the [Files] section to a Zip file, which is then bundled with a custom setup.sh shell script to create a self-extracting installer. This is done with makeself (check internet for makeself). The self-extracting installer works on any linux system that has unzip installed. Even that can probably be reduced to simply tar and compress, given some work. According to the author, the makeself self-extractor should work on any unix compatible system. If this is an acceptable procedure for you, then I can send the sources and the setup.sh script. Michael. --

Please do not worry fro me .

Thank you very much .

Mehmet Erol Sanliturk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150131/168e7666/attachment.html>

Reply by email

Toan Pham
to Mehmet Erol Sanliturk

Thank you guys,

I'll evaluate lazbuild, and see how well it integrates into my build environment.

I really like the build system of c/c++, and that's why I would like to know if there is a way to use the same build system for fpc projects. For instance, if I were to compile a c++ project that uses the wxWidget library, calling the wx-config utility is sufficient to compile the project(eg. wx-config --libs). The LCL library is similar to the wxWidget library, having a utility like lcl-config (eg. lcl-config --libs), would simplify the fpc build process; and would make it possible to convert any fpc project to a makefile build project.

@Michael Van - let's say you have one build environment, how are you able to manage cross-building for many machine types (i486, pentium etc), and different architectures (x86, arm)?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150202/d8c2a9d0/attachment-0001.html>

Reply by email

Mattias Gaertner
to Toan Pham
Thank you guys, I'll evaluate lazbuild, and see how well it integrates into my build environment.

Pascal programmers are spoiled. That's we are trying to simplify compilation. For example FPC and
Lazarus themselves do not need ./configure. Simply compile.

Show quoted text 8 lines
I really like the build system of c/c++, and that's why I would like to know if there is a way to use the same build system for fpc projects. For instance, if I were to compile a c++ project that uses the wxWidget library, calling the wx-config utility is sufficient to compile the project(eg. wx-config --libs). The LCL library is similar to the wxWidget library, having a utility like lcl-config (eg. lcl-config --libs), would simplify the fpc build process; and would make it possible to convert any fpc project to a makefile build project.

Lazarus takes this a step further. lazbuild does not only compile your project, it automatically rebuilds all used Lazarus packages if needed. For example when compiling your project for Linux, it will fully automatically compile the LCL. When you cross compile your project for Windows, it will automatically compile the LCL for Windows.

The "--libs" parameters are usually stored in the sources. So the compiler knows what libs are needed.

If you want something like make, you might want to take a look at "fpmake".

@Michael Van - let's say you have one build environment, how are you able to manage cross-building for many machine types (i486, pentium etc), and different architectures (x86, arm)?

See here:
http://wiki.lazarus.freepascal.org/Cross_compiling

Mattias

Reply by email