[Lazarus] setting defines in makefile
graemeg.lists at gmail.com
Sun Nov 2 15:35:50 CET 2008
On Sun, Nov 2, 2008 at 12:50 PM, Sebastian Kraft <sebastian_kraft at gmx.de> wrote:
> Did not know this exists. Looks interesting... But as far as I can see
> only predefined targets are usable(clean, build, ..) and there is no
> possibility to create a own .deb package target/command.
> Or did I miss something?
I don't know much about 'fpmake', but there is a PDF document
somewhere regarding fpmake. Otherwise Michael or Henry or somebody
else might be able to help you.
Your original question was how to add a specific define for a target.
The following code does that.
if Defaults.OS in AllUnixOSes
then Defaults.Options := Defaults.Options + '-dX11'
else Defaults.Options := Defaults.Options + '-dGDI';
As for targets... <package>.Targets is a TCollection, so I'm pretty
sure you can add custom targets to that collection.
fpmake.pas or fpmake.pp is all over the FPC source directories. So I'm
pretty sure if you take a look at a few of those examples, it will
reveal more information.
- Graeme -
fpGUI - a cross-platform Free Pascal GUI toolkit
More information about the Lazarus