summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-23 09:28:01 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-23 09:28:01 +0000
commit6bda2054c8dda9b98f9958c54fce9f27927642c5 (patch)
treee304f50ba1211542ba885a3787f3b03d6c05b796 /examples
parent1e00430227e56fd2691f8374418f352c171039b1 (diff)
downloadfpGUI-6bda2054c8dda9b98f9958c54fce9f27927642c5.tar.xz
Part 2 of the restructure.
* Moved all the images from the prototype directory. * Removed all the obsolete examples
Diffstat (limited to 'examples')
-rw-r--r--examples/gui/concepttest/compileroptform.frm137
-rw-r--r--examples/gui/concepttest/frmCompilerOpt.pas132
-rw-r--r--examples/gui/concepttest/hello.lpi62
-rw-r--r--examples/gui/concepttest/hello.lpr342
-rw-r--r--examples/gui/dbftest/Makefile1366
-rw-r--r--examples/gui/dbftest/Makefile.fpc10
-rw-r--r--examples/gui/dbftest/dbftest.lpi53
-rw-r--r--examples/gui/dbftest/dbftest.pas138
-rw-r--r--examples/gui/dbftest/mainform.frm40
-rw-r--r--examples/gui/dbftest/test.dbfbin704 -> 0 bytes
-rw-r--r--examples/gui/helloworld/Makefile1320
-rw-r--r--examples/gui/helloworld/Makefile.fpc10
-rw-r--r--examples/gui/helloworld/helloworld.lpi57
-rw-r--r--examples/gui/helloworld/helloworld.pas63
-rw-r--r--examples/gui/helloworld/mainform.frm11
-rw-r--r--examples/gui/interbasetest/Makefile1320
-rw-r--r--examples/gui/interbasetest/Makefile.fpc10
-rw-r--r--examples/gui/interbasetest/interbasetest.pas131
-rw-r--r--examples/gui/interbasetest/mainform.frm55
-rw-r--r--examples/gui/interbasetest/mkdb53
-rw-r--r--examples/gui/layouttest/Makefile1320
-rw-r--r--examples/gui/layouttest/Makefile.fpc10
-rw-r--r--examples/gui/layouttest/boxform.frm24
-rw-r--r--examples/gui/layouttest/layouttest.lpi59
-rw-r--r--examples/gui/layouttest/layouttest.pas417
-rw-r--r--examples/gui/utfdemo/test.pas4
-rw-r--r--examples/gui/utfdemo/utfdemo.lpi56
-rw-r--r--examples/gui/utfdemo/utfdemo.lpr82
-rw-r--r--examples/gui/widgetdemo/widgetdemo.lpi56
-rw-r--r--examples/gui/widgetdemo/widgetdemo.lpr356
-rw-r--r--examples/gui/widgettest/Makefile1320
-rw-r--r--examples/gui/widgettest/Makefile.fpc10
-rw-r--r--examples/gui/widgettest/checkboxform.frm17
-rw-r--r--examples/gui/widgettest/comboboxform.frm19
-rw-r--r--examples/gui/widgettest/editform.frm85
-rw-r--r--examples/gui/widgettest/gridform.frm9
-rw-r--r--examples/gui/widgettest/groupboxform.frm49
-rw-r--r--examples/gui/widgettest/listboxform.frm23
-rw-r--r--examples/gui/widgettest/mainform.frm91
-rw-r--r--examples/gui/widgettest/radiobuttonform.frm33
-rw-r--r--examples/gui/widgettest/scrollbarform.frm175
-rw-r--r--examples/gui/widgettest/scrollboxform.frm14
-rw-r--r--examples/gui/widgettest/widgettest.lpi55
-rw-r--r--examples/gui/widgettest/widgettest.pas887
-rw-r--r--examples/img/Makefile1313
-rw-r--r--examples/img/Makefile.fpc6
-rw-r--r--examples/img/disp_bmp/Makefile1306
-rw-r--r--examples/img/disp_bmp/Makefile.fpc14
-rw-r--r--examples/img/disp_bmp/disp_bmp.pas81
-rw-r--r--examples/img/disp_bmp/test2.bmpbin8254 -> 0 bytes
-rw-r--r--examples/img/disp_bmp/test24.bmpbin196662 -> 0 bytes
-rw-r--r--examples/img/disp_bmp/test4.bmpbin32886 -> 0 bytes
-rw-r--r--examples/img/disp_bmp/test8.bmpbin66614 -> 0 bytes
-rw-r--r--examples/img/masktest/Makefile1347
-rw-r--r--examples/img/masktest/Makefile.fpc14
-rw-r--r--examples/img/masktest/image2.bmpbin4542 -> 0 bytes
-rw-r--r--examples/img/masktest/image24.bmpbin96054 -> 0 bytes
-rw-r--r--examples/img/masktest/image4.bmpbin16118 -> 0 bytes
-rw-r--r--examples/img/masktest/image8.bmpbin32566 -> 0 bytes
-rw-r--r--examples/img/masktest/mask.bmpbin4542 -> 0 bytes
-rw-r--r--examples/img/masktest/masktest.lpi51
-rw-r--r--examples/img/masktest/masktest.pas131
62 files changed, 0 insertions, 14744 deletions
diff --git a/examples/gui/concepttest/compileroptform.frm b/examples/gui/concepttest/compileroptform.frm
deleted file mode 100644
index 708f2e09..00000000
--- a/examples/gui/concepttest/compileroptform.frm
+++ /dev/null
@@ -1,137 +0,0 @@
-object CompilerOptForm: TCompilerOptForm
- Text = 'Compiler Options - Code'
- BorderWidth = 5
- object Box1: TFBoxLayout
- Spacing = 8
- Orientation = Vertical
- object Box2: TFBoxLayout
- Orientation = Vertical
- Spacing = 4
- object Box4: TFBoxLayout
- object grpBox1: TFGroupBox
- Text = 'Unit Style:'
- object grpBox1VBox1: TFBoxLayout
- Orientation = Vertical
- object cbSmartLink: TFCheckbox
- Checked = True
- Text = 'Smart Linkable (-CX)'
- end
- end
- end
- object grpBox2: TFGroupBox
- Text = 'Checks:'
- object grpBox2VBox1: TFBoxLayout
- Orientation = Vertical
- object rbIO: TFRadioButton
- Checked = True
- Text = 'I/O (-Ci)'
- end
- object rbOverflow: TFRadioButton
- Checked = True
- Text = 'Overflow (-Co)'
- end
- object rbRange: TFRadioButton
- Checked = True
- Text = 'Range (-Cr)'
- end
- object rbStack: TFRadioButton
- Checked = True
- Text = 'Stack (-Ct)'
- end
- end
- end
- object grpBox3: TFGroupBox
- Text = 'Heap Size (-Ch):'
- object grpBox3VBox1: TFBoxLayout
- Orientation = Vertical
- object edHeapSize: TFEdit
- Text = '0'
- CanExpandWidth = False
- end
- end
- end
- end
- object Box5: TFBoxLayout
- object grpBox4: TFGroupBox
- Text = 'Generate:'
- object grpBox4VBox1: TFBoxLayout
- Orientation = Vertical
- object rbNormal: TFRadioButton
- Text = 'Normal Code (none)'
- end
- object rbFaster: TFRadioButton
- Checked = True
- Text = 'Faster Code (-OG)'
- end
- object rbSmaller: TFRadioButton
- Text = 'Smaller Code (-Og)'
- end
- end
- end
- object grpBox5: TFGroupBox
- Text = 'Target Platform:'
- CanExpandHeight = True
- object grpBox5VBox1: TFBoxLayout
- Orientation = Vertical
- VertAlign = vertTop
- object lblTarget1: TFLabel
- Text = 'Target OS (-T)'
- end
- object lblTarget2: TFLabel
- Text = 'Target CPU (-P)'
- end
- object lblTarget3: TFLabel
- Text = 'Target i386'
- end
- end
- end
- end
- object Box6: TFBoxLayout
- object grpBox6: TFGroupBox
- Text = 'Optimizations:'
- object grpBox6VBox1: TFBoxLayout
- Orientation = Vertical
- CanExpandWidth = True
- object rbLevel0: TFRadioButton
- Text = 'Level 0 (no extra Optimizations) (none)'
- end
- object rbLevel1: TFRadioButton
- Checked = True
- Text = 'Level 1 (Quick Optimizations) (-O1)'
- end
- object rbLevel2: TFRadioButton
- Text = 'Level 2 (Level 1 + Slower Optimizations) (-O2)'
- end
- object rbLevel3: TFRadioButton
- Text = 'Level 3 (Level 2 + Uncertain) (-O3)'
- end
- object rbKeepVarReg: TFCheckbox
- Text = 'Keep certain variables in registers (-Or)'
- end
- object rbUncOpt: TFCheckbox
- Text = 'Uncertain Optimizations (-Ou)'
- end
- end
- end
- end
- end
- object Box3: TFBoxLayout
- object btnOK: TFButton
- Text = 'OK'
- OnClick = btnCloseClick
- end
- object btnCancel: TFButton
- Text = 'Cancel'
- end
- object btnShowOpt: TFButton
- Text = 'Show Options'
- end
- object btnTest: TFButton
- Text = 'Test'
- end
- object btnLoadSave: TFButton
- Text = 'Load/Save'
- end
- end
- end
-end
diff --git a/examples/gui/concepttest/frmCompilerOpt.pas b/examples/gui/concepttest/frmCompilerOpt.pas
deleted file mode 100644
index 1a883c64..00000000
--- a/examples/gui/concepttest/frmCompilerOpt.pas
+++ /dev/null
@@ -1,132 +0,0 @@
-unit frmCompilerOpt;
-
-{$mode objfpc}{$H+}
-
-interface
-uses
- Classes, SysUtils, fpgui;
-
-
-type
-
- { TCompilerOptForm }
-
- TCompilerOptForm = Class(TFForm)
- private
- FGroupBoxStyle: TStyleAbs;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- procedure CompOptFormOnActivate(Sender: TObject);
- procedure SmartLinkClick(Sender: TObject);
- published
- procedure btnCloseClick(Sender: TObject);
- Box1: TFBoxLayout;
- Box2: TFBoxLayout;
- Box3: TFBoxLayout;
- Box4: TFBoxLayout;
- Box5: TFBoxLayout;
- Box6: TFBoxLayout;
- btnOK, btnCancel, btnShowOp, btnTest, btnLoadSave : TFButton;
- grpBox1: TFGroupBox;
- grpBox1VBox1: TFBoxLayout;
- cbSmartLink: TFCheckbox;
- grpBox2: TFGroupBox;
- grpBox2VBox1: TFBoxLayout;
- rbIO: TFRadioButton;
- rbOverflow: TFRadioButton;
- rbRange: TFRadioButton;
- rbStack: TFRadioButton;
- grpBox3: TFGroupBox;
- grpBox3VBox1: TFBoxLayout;
- edHeapSize: TFEdit;
- grpBox4: TFGroupBox;
- grpBox4VBox1: TFBoxLayout;
- rbNormal: TFRadioButton;
- rbFaster: TFRadioButton;
- rbSmaller: TFRadioButton;
- grpBox5: TFGroupBox;
- grpBox5VBox1: TFBoxLayout;
- lblTarget1: TFLabel;
- lblTarget2: TFLabel;
- lblTarget3: TFLabel;
- grpBox6: TFGroupBox;
- grpBox6VBox1: TFBoxLayout;
- rbLevel0: TFRadioButton;
- rbLevel1: TFRadioButton;
- rbLevel2: TFRadioButton;
- rbLevel3: TFRadioButton;
- rbKeepVarReg: TFCheckbox;
- rbUncOpt: TFCheckbox;
- end;
-
-var
- CompOpt: TCompilerOptForm;
-
-implementation
-//uses
-// OpenSoftStyle;
-
-{ TCompilerOptForm }
-
-
-
-constructor TCompilerOptForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-// FGroupBoxStyle := TOpenSoftStyle.Create(Application.Display);
-// Style := FGroupBoxStyle;
-// Style := FOpenSoftStyle;
- OnActivate := @CompOptFormOnActivate;
-end;
-
-
-destructor TCompilerOptForm.Destroy;
-begin
- FGroupBoxStyle.Free;
- inherited Destroy;
-end;
-
-
-procedure TCompilerOptForm.CompOptFormOnActivate(Sender: TObject);
-begin
- cbSmartLink.OnClick := @SmartLinkClick;
-
-{
- grpBox1.CanExpandHeight := True;
- grpBox1VBox1.CanExpandHeight := True;
- grpBox1.CanExpandWidth := True;
- grpBox2.CanExpandWidth := True;
- grpBox3.CanExpandWidth := True;
- grpBox4.CanExpandWidth := True;
- grpBox5.CanExpandWidth := True;
- grpBox6.CanExpandWidth := True;
-
- grpBox6VBox1.CanExpandWidth := True;
-}
- grpBox5VBox1.VertAlign := vertFill;
-// grpBox1.Style := FGroupBoxStyle;
-// grpBox6.Style := FGroupBoxStyle;
-end;
-
-
-procedure TCompilerOptForm.SmartLinkClick(Sender: TObject);
-begin
- grpBox1.Style := nil;
- self.Redraw;
-// grpBox1.Redraw;
-end;
-
-
-procedure TCompilerOptForm.btnCloseClick(Sender: TObject);
-begin
- Close;
-end;
-
-
-initialization
-finalization
- CompOpt.Free;
-
-end.
-
diff --git a/examples/gui/concepttest/hello.lpi b/examples/gui/concepttest/hello.lpi
deleted file mode 100644
index 7d035197..00000000
--- a/examples/gui/concepttest/hello.lpi
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
- </General>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- </Item1>
- </RequiredPackages>
- <Units Count="3">
- <Unit0>
- <Filename Value="hello.lpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="hello"/>
- </Unit0>
- <Unit1>
- <Filename Value="frmCompilerOpt.pas"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="frmCompilerOpt"/>
- </Unit1>
- <Unit2>
- <Filename Value="compileroptform.frm"/>
- <IsPartOfProject Value="True"/>
- </Unit2>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <Parsing>
- <SyntaxOptions>
- <AllowLabel Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/concepttest/hello.lpr b/examples/gui/concepttest/hello.lpr
deleted file mode 100644
index 8a2fbc31..00000000
--- a/examples/gui/concepttest/hello.lpr
+++ /dev/null
@@ -1,342 +0,0 @@
-program hello;
-
-{$mode objfpc}{$H+}
-
-uses
- {$IFDEF UNIX}{$IFDEF UseCThreads}
- cthreads,
- {$ENDIF}{$ENDIF}
- Classes,
- fpGUI, fpGFX, gfxbase, frmCompilerOpt, StyleManager;
-
-type
-
- { TMainForm }
-
- TMainForm = class(TFForm)
- procedure Button3Clicked(Sender: TObject);
- private
- procedure btnCloseClick(Sender: TObject);
- procedure btnGridFormClick(Sender: TObject);
- procedure btnCompOptClick(Sender: TObject);
- procedure btnTopClick(Sender: TObject);
- procedure MainFormActivate(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- published
- HBox: TFBoxLayout;
- VBox: TFBoxLayout;
- TextLabel: TFLabel;
- Button: TFButton;
- btnGridForm: TFButton;
- btnCompOpt: TFButton;
- Button1: TFButton;
- Button2: TFButton;
- Button3: TFButton;
- end;
-
-
- { TGridForm }
-
- TGridForm = Class(TFForm)
- Layout: TFGridLayout;
- Button1,Button2,Button3,Button4,Button5: TFButton;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- { TFindDialog }
-
- TFindDialog = class(TFForm)
- private
- procedure btnCloseClick(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- published
- lblFind: TFLabel;
- btnFindNext, btnClose: TFButton;
- edFind: TFEdit;
- GroupBox1: TFGroupBox;
- grpBox1Layout: TFBoxLayout;
- Radio1, Radio2: TFRadioButton;
- cbCase: TFCheckBox;
- leftLayout, rightLayout: TFBoxLayout;
- topLeftLayout: TFBoxLayout;
- mainLayout: TFBoxLayout;
- end;
-
-
-{ TFindDialog }
-
-procedure TFindDialog.btnCloseClick(Sender: TObject);
-begin
- Close;
-end;
-
-
-constructor TFindDialog.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Text := 'Find Dialog';
- BorderWidth := 8;
-
- topLeftLayout := TFBoxLayout.Create(self);
- topLeftLayout.CanExpandWidth := True;
- lblFind := TFLabel.Create(self);
- lblFind.Text := 'Find what:';
- edFind := TFEdit.Create(self);
- topLeftLayout.InsertChild(lblFind);
- topLeftLayout.InsertChild(edFind);
-
- leftLayout := TFBoxLayout.Create(self);
- leftLayout.Orientation := Vertical;
- leftLayout.CanExpandWidth := True;
-
- GroupBox1 := TFGroupBox.Create(self);
- GroupBox1.Text := 'Direction';
- GroupBox1.CanExpandWidth := True;
- grpBox1Layout := TFBoxLayout.Create(self);
- Radio1 := TFRadioButton.Create(self);
- Radio1.Text := 'Up';
- Radio1.CanExpandWidth := True;
- Radio2 := TFRadioButton.Create(self);
- Radio2.Text := 'Down';
- Radio2.CanExpandWidth := True;
- GroupBox1.InsertChild(grpBox1Layout);
- grpBox1Layout.InsertChild(Radio1);
- grpBox1Layout.InsertChild(Radio2);
-
- cbCase := TFCheckBox.Create(self);
- cbCase.Text := 'Case sensitive';
- cbCase.CanExpandWidth := True;
-
- leftLayout.InsertChild(topLeftLayout);
- leftLayout.InsertChild(GroupBox1);
- leftLayout.InsertChild(cbCase);
-
- rightLayout := TFBoxLayout.Create(self);
- rightLayout.Orientation := Vertical;
- rightLayout.VertAlign := vertTop;
- btnFindNext := TFButton.Create(self);
- btnFindNext.Text := 'Find Next';
- btnClose := TFButton.Create(self);
- btnClose.Text := 'Close';
- btnClose.CanExpandWidth := True;
- btnClose.OnClick := @btnCloseClick;
- rightLayout.InsertChild(btnFindNext);
- rightLayout.InsertChild(btnClose);
-
- mainLayout := TFBoxLayout.Create(self);
- mainLayout.InsertChild(leftLayout);
- mainLayout.InsertChild(rightLayout);
-
- Child := mainLayout;
-end;
-
-{
-QHBoxLayout *topLeftLayout = new QHBoxLayout;
-topLeftLayout->addWidget(label);
-topLeftLayout->addWidget(lineEdit);
-
-QVBoxLayout *leftLayout = new QVBoxLayout;
-leftLayout->addLayout(topLeftLayout);
-leftLayout->addWidget(buttonGroup);
-leftLayout->addWidget(caseCheckBox);
-
-QVBoxLayout *rightLayout = new QVBoxLayout;
-rightLayout->addWidget(findNextButton);
-rightLayout->addWidget(closeButton);
-rightLayout->addStretch(1);
-
-QHBoxLayout *mainLayout = new QHBoxLayout(this);
-mainLayout->setMargin(11);
-mainLayout->setSpacing(6);
-mainLayout->addLayout(leftLayout);
-mainLayout->addLayout(rightLayout);
-}
-
-
-var
- GridForm: TGridForm;
- FindDialog: TFindDialog;
-
-{ TGridForm }
-
-constructor TGridForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-
- Text := 'Grid Layout';
- BorderWidth := 8;
- self.BorderWidth := 11;
-
- Layout := TFGridLayout.Create(Self);
- Layout.Name := 'Layout';
- Layout.RowCount := 3;
- Layout.ColCount := 3;
-
- Button1 := TFButton.Create(Self);
- Button1.Name := 'TopLeft';
- Button1.Text := 'Top Left';
- Layout.AddWidget(Button1, 0, 0, 1, 1);
- Button2 := TFButton.Create(Self);
- Button2.Name := 'TopRight';
- Button2.Text := 'Top Right';
- Layout.AddWidget(Button2, 2,0,1,1);
- Button3 := TFButton.Create(Self);
- Button3.Name := 'CenterCenter';
- Button3.Text := 'Center Center';
- // Button3.CanExpandWidth := False;
- // Button3.CanExpandHeight := False;
- Layout.AddWidget(Button3, 1,1,1,1);
- Button4 := TFButton.Create(Self);
- Button4.Name := 'BottomLeft';
- Button4.Text := 'Bottom Left';
- Layout.AddWidget(Button4,0,2,1,1);
- Button5 := TFButton.Create(Self);
- Button5.Name := 'BottomRight';
- Button5.Text := 'Bottom Right';
- Layout.AddWidget(Button5, 2,2,1,1);
- Child := Layout;
-end;
-
-
-{ TMainForm }
-
-procedure TMainForm.Button3Clicked(Sender: TObject);
-begin
- Button.SetBounds(100, 50, 100, 45);
- Redraw;
-end;
-
-procedure TMainForm.btnCloseClick(Sender: TObject);
-begin
- Close;
-end;
-
-
-procedure TMainForm.btnGridFormClick(Sender: TObject);
-begin
- if not Assigned(GridForm) then
- begin
- GridForm := TGridForm.Create(self);
-// Application.AddForm(GridForm);
- end;
-
- GridForm.Show;
-end;
-
-
-procedure TMainForm.btnCompOptClick(Sender: TObject);
-begin
- if not Assigned(CompOpt) then
- begin
- CompOpt := TCompilerOptForm.Create(GFApplication);
- LoadForm(CompOpt);
- CompOpt.Style := gStyleManager.CreateInstance('OpenSoft');
- CompOpt.Show;
- end
- else
- CompOpt.Show;
-end;
-
-
-procedure TMainForm.btnTopClick(Sender: TObject);
-begin
- if not Assigned(FindDialog) then
- FindDialog := TFindDialog.Create(self);
- FindDialog.Show;
-end;
-
-
-procedure TMainForm.MainFormActivate(Sender: TObject);
-var
- max: TSize;
-begin
- max.cx := 600;
- max.cy := 400;
- self.Wnd.SetMinMaxClientSize(MinSize, max);
-end;
-
-
-constructor TMainForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Name := 'frmMain';
- BorderWidth := 8;
- OnActivate := @MainFormActivate;
-
- HBox := TFBoxLayout.Create(self);
- HBox.Name := 'HBox';
- HBox.Parent := self;
- HBox.Spacing := 3;
- HBox.Orientation := Horizontal;
-
- TextLabel := TFLabel.Create(self);
- TextLabel.Name := 'TextLabel';
- TextLabel.Text := 'Hello';
- TextLabel.Parent := HBox;
-
- Button := TFButton.Create(self);
- Button.Parent := HBox;
- Button.Text := 'Close';
- Button.OnClick := @btnCloseClick;
-
- btnGridForm := TFButton.Create(self);
- btnGridForm.Parent := HBox;
- btnGridForm.Text := 'Grid Form';
- btnGridForm.OnClick := @btnGridFormClick;
-
- btnCompOpt := TFButton.Create(Self);
- btnCompOpt.Parent := HBox;
- btnCompOpt.Name := 'btnCompOpt';
- btnCompOpt.Text := 'Compiler Options';
- btnCompOpt.OnClick := @btnCompOptClick;
-
- VBox := TFBoxLayout.Create(self);
- VBox.Orientation := Vertical;
- Button1 := TFButton.Create(Self);
- Button1.Name := 'Top';
- Button1.Text := 'Top';
- Button1.CanExpandWidth := True; // if not used, button is smaller than others
- Button1.OnClick := @btnTopClick;
- VBox.InsertChild(Button1);
- Button2 := TFButton.Create(Self);
- Button2.Name := 'Centre';
- Button2.Text := 'Centre';
- Button2.CanExpandWidth := True;
- VBox.InsertChild(Button2);
- Button3 := TFButton.Create(Self);
- Button3.Name := 'Bottom';
- Button3.Text := 'Bottom (SetBounds)';
- Button3.OnClick := @Button3Clicked;
- VBox.InsertChild(Button3);
-
- HBox.InsertChild(VBox);
-
- Child := HBox;
-end;
-
-
-var
- MainForm: TMainForm;
-
-begin
- MainForm := nil;
-
- { set application wide style }
- GFApplication.Initialize;
-// gStyleManager.CreateInstance('OpenSoft');
-
- MainForm := TMainForm.Create(GFApplication);
- try
- MainForm.Style := gStyleManager.CreateInstance('OpenSoft');
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
-end.
-
-
diff --git a/examples/gui/dbftest/Makefile b/examples/gui/dbftest/Makefile
deleted file mode 100644
index 32ad7c72..00000000
--- a/examples/gui/dbftest/Makefile
+++ /dev/null
@@ -1,1366 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2001/01/17]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT or OS/2)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-# define inOS2 when running under OS/2
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-PWD:=$(firstword $(PWD))
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The extension of batch files / scripts
-ifdef inUnix
-BATCHEXT=.sh
-else
-ifdef inOS2
-BATCHEXT=.cmd
-else
-BATCHEXT=.bat
-endif
-endif
-
-# Path Separator, the subst trick is necessary for the \ that can't exists
-# at the end of a line
-ifdef inUnix
-PATHSEP=/
-else
-PATHSEP=$(subst /,\,/)
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=dbftest
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx fpgui
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-PPAS=ppas$(BATCHEXT)
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-PACKAGEFPGUI=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-ifdef PACKAGEFPGUI
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui/$(OS_TARGET)),)
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui/$(OS_TARGET)
-else
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGUI)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgui
-package_fpgui:
- $(MAKE) -C $(PACKAGEDIR_FPGUI) all
-endif
-UNITDIR_FPGUI=$(PACKAGEDIR_FPGUI)
-else
-PACKAGEDIR_FPGUI=
-ifneq ($(wildcard $(UNITSDIR)/fpgui),)
-ifneq ($(wildcard $(UNITSDIR)/fpgui/$(OS_TARGET)),)
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui/$(OS_TARGET)
-else
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui
-endif
-else
-UNITDIR_FPGUI=
-endif
-endif
-ifdef UNITDIR_FPGUI
-override NEEDUNITDIR+=$(UNITDIR_FPGUI)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-PACKAGESUFFIX=emx
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-# Use a wrapper script by default for OS/2
-ifdef inOS2
-USEZIPWRAPPER=1
-endif
-
-# Create commands to create the zip/tar file
-ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT)
-ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
-ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
-ifdef USETAR
-ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
-else
-ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
- $(DEL) $(ZIPDESTFILE)
-ifdef USEZIPWRAPPER
-ifneq ($(ECHO),echo)
- $(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
- $(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
- $(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
-else
- $(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
- $(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
- $(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
-endif
-ifdef inUnix
- /bin/sh $(ZIPWRAPPER)
-else
- $(ZIPWRAPPER)
-endif
- $(DEL) $(ZIPWRAPPER)
-else
- $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/gui/dbftest/Makefile.fpc b/examples/gui/dbftest/Makefile.fpc
deleted file mode 100644
index c3024e8b..00000000
--- a/examples/gui/dbftest/Makefile.fpc
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile.fpc for fpGUI DBFTest example
-#
-
-[targets]
-programs=dbftest
-
-[require]
-options=-S2h
-packages=fcl fpgfx fpgui
diff --git a/examples/gui/dbftest/dbftest.lpi b/examples/gui/dbftest/dbftest.lpi
deleted file mode 100644
index 17280f84..00000000
--- a/examples/gui/dbftest/dbftest.lpi
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="\"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value=".\"/>
- <TargetFileExt Value=""/>
- </General>
- <VersionInfo>
- <ProjectVersion Value=""/>
- </VersionInfo>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- </Item1>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="dbftest.pas"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="DBFTest"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <PathDelim Value="\"/>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CustomOptions Value="-FUunits"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/dbftest/dbftest.pas b/examples/gui/dbftest/dbftest.pas
deleted file mode 100644
index 948f8a29..00000000
--- a/examples/gui/dbftest/dbftest.pas
+++ /dev/null
@@ -1,138 +0,0 @@
-{
- fpGUI - Free Pascal GUI Library
-
- DBF Database example
-
- Copyright (C) 2006 - 2007 See the file AUTHORS.txt, included in this
- distribution, for details of the copyright.
-
- See the file COPYING.modifiedLGPL, included in this distribution,
- for details about redistributing fpGUI.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-}
-
-program DBFTest;
-
-uses
- SysUtils, Classes, fpGFX, fpGUI, fpGUI_DB, DB, DBF;
-
-type
-
- { TMainForm }
-
- TMainForm = class(TFForm)
- DataSet: TDBF;
- DataSource: TDataSource;
- Box: TFBoxLayout;
- ListBox: TFListBox;
- CurDataseTFLabel: TFLabel;
- CurNameText, CurEMailText: TDBText;
- Navi: TFBoxLayout;
- FirstDataset, PrevDataset, NextDataset, LastDataset: TFButton;
- CurEmailEdit: TDBEdit;
- procedure FormCreate(Sender: TObject);
- procedure FirstDatasetClick(Sender: TObject);
- procedure PrevDatasetClick(Sender: TObject);
- procedure NextDatasetClick(Sender: TObject);
- procedure LastDatasetClick(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- end;
-
-
-// -------------------------------------------------------------------
-// TMainForm
-// -------------------------------------------------------------------
-
-procedure TMainForm.FormCreate(Sender: TObject);
-var
- x: Integer;
- s: String;
-begin
- DataSet := TDBF.Create(Self);
- DataSet.TableName := 'test.dbf';
- DataSource := TDataSource.Create(Self);
- DataSource.DataSet := DataSet;
-
- CurNameText.DataSource := DataSource;
- CurNameText.DataField := 'Name';
- CurEMailText.DataSource := DataSource;
- CurEMailText.DataField := 'Address';
- CurEmailEdit.DataSource := DataSource;
- CurEmailEdit.DataField := 'Address';
-
- DataSet.Open;
- CurEmailEdit.Field.ReadOnly := True;
-
- while not DataSet.EOF do
- begin
- SetLength(s, 0);
- for x := 0 to DataSet.FieldCount - 2 do
- s := s + DataSet.Fields[x].AsString + ', ';
- s := s + DataSet.Fields[DataSet.FieldCount - 1].AsString;
- ListBox.Items.Add(s);
- DataSet.Next;
- end;
-
- DataSet.First;
-end;
-
-procedure TMainForm.FirstDatasetClick(Sender: TObject);
-begin
- DataSet.First;
- ReDraw; // a hack to get around a TFLabel.SetText issue
-end;
-
-procedure TMainForm.PrevDatasetClick(Sender: TObject);
-begin
- DataSet.Prior;
- ReDraw; // a hack to get around a TFLabel.SetText issue
-end;
-
-procedure TMainForm.NextDatasetClick(Sender: TObject);
-begin
- DataSet.Next;
- ReDraw; // a hack to get around a TFLabel.SetText issue
-end;
-
-procedure TMainForm.LastDatasetClick(Sender: TObject);
-begin
- DataSet.Last;
- ReDraw; // a hack to get around a TFLabel.SetText issue
-end;
-
-constructor TMainForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-destructor TMainForm.Destroy;
-begin
- DataSet.Close;
- DataSource.Free;
- DataSet.Free;
- inherited Destroy;
-end;
-
-
-var
- MainForm: TMainForm;
-begin
-// WriteLn('Version: ' + {$I %date%} + ' ' + {$I %time%});
- GFApplication.Initialize;
-
- MainForm := TMainForm.Create(GFApplication);
- try
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
-end.
-
diff --git a/examples/gui/dbftest/mainform.frm b/examples/gui/dbftest/mainform.frm
deleted file mode 100644
index 3e42abc1..00000000
--- a/examples/gui/dbftest/mainform.frm
+++ /dev/null
@@ -1,40 +0,0 @@
-object MainForm: TMainForm
- Text = 'DBF test'
- BorderWidth = 8
- OnCreate = FormCreate
- object Box: TFBoxLayout
- Spacing = 8
- Orientation = Vertical
- object ListBox: TFListBox
- end
- object CurDataseTFLabel: TFLabel
- Text = 'Current dataset:'
- end
- object CurNameText: TDBText
- Text = '<name>'
- end
- object CurEMailText: TDBText
- Text = '<e-mail>'
- end
- object CurEmailEdit: TDBEdit
- end
- object Navi: TFBoxLayout
- object FirstDataset: TFButton
- Text = 'First'
- OnClick = FirstDatasetClick
- end
- object PrevDataset: TFButton
- Text = 'Previous'
- OnClick = PrevDatasetClick
- end
- object NextDataset: TFButton
- Text = 'Next'
- OnClick = NextDatasetClick
- end
- object LastDataset: TFButton
- Text = 'Last'
- OnClick = LastDatasetClick
- end
- end
- end
-end
diff --git a/examples/gui/dbftest/test.dbf b/examples/gui/dbftest/test.dbf
deleted file mode 100644
index a432f32d..00000000
--- a/examples/gui/dbftest/test.dbf
+++ /dev/null
Binary files differ
diff --git a/examples/gui/helloworld/Makefile b/examples/gui/helloworld/Makefile
deleted file mode 100644
index c2e4e873..00000000
--- a/examples/gui/helloworld/Makefile
+++ /dev/null
@@ -1,1320 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/12/14]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION FPCOPT
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=helloworld
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx fpgui
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inUnix
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-PACKAGEFPGUI=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-ifdef PACKAGEFPGUI
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui/$(OS_TARGET)),)
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui/$(OS_TARGET)
-else
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGUI)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgui
-package_fpgui:
- $(MAKE) -C $(PACKAGEDIR_FPGUI) all
-endif
-UNITDIR_FPGUI=$(PACKAGEDIR_FPGUI)
-else
-PACKAGEDIR_FPGUI=
-ifneq ($(wildcard $(UNITSDIR)/fpgui),)
-ifneq ($(wildcard $(UNITSDIR)/fpgui/$(OS_TARGET)),)
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui/$(OS_TARGET)
-else
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui
-endif
-else
-UNITDIR_FPGUI=
-endif
-endif
-ifdef UNITDIR_FPGUI
-override NEEDUNITDIR+=$(UNITDIR_FPGUI)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
- cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/gui/helloworld/Makefile.fpc b/examples/gui/helloworld/Makefile.fpc
deleted file mode 100644
index 03d81490..00000000
--- a/examples/gui/helloworld/Makefile.fpc
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile.fpc for fpGUI HelloWorld example
-#
-
-[targets]
-programs=helloworld
-
-[require]
-options=-S2h
-packages=fcl fpgfx fpgui
diff --git a/examples/gui/helloworld/helloworld.lpi b/examples/gui/helloworld/helloworld.lpi
deleted file mode 100644
index 9ebe89bc..00000000
--- a/examples/gui/helloworld/helloworld.lpi
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="\"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value=".\"/>
- <TargetFileExt Value=""/>
- </General>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- </Item1>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="helloworld.pas"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="HelloWorld"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <PathDelim Value="\"/>
- <SearchPaths>
- <OtherUnitFiles Value="..\..\src\"/>
- </SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <AllowLabel Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/helloworld/helloworld.pas b/examples/gui/helloworld/helloworld.pas
deleted file mode 100644
index 5e139fff..00000000
--- a/examples/gui/helloworld/helloworld.pas
+++ /dev/null
@@ -1,63 +0,0 @@
-program HelloWorld;
-
-{$mode objfpc}{$h+}
-
-uses
- fpGUI
- ,fpGFX { GFApplication }
- ,gfxBase
- ;
-
-type
- TMainForm = class(TFForm)
- private
- BoxLayout: TFBoxLayout;
- btnHello: TFButton;
- public
- procedure AfterConstruction; override;
- end;
-
-
-{ TMainForm }
-
-procedure TMainForm.AfterConstruction;
-var
- lSize: TSize;
-begin
- inherited AfterConstruction;
- Name := 'MainForm';
- BorderWidth := 8;
- Text := 'fpGUI Application';
-
- { every fpGUI app needs a layout manager }
- BoxLayout := TFBoxLayout.Create(self);
- BoxLayout.Spacing := 8;
- BoxLayout.VertAlign := vertFill;
- InsertChild(BoxLayout);
-
- { create our button }
- btnHello := TFButton.Create('Hello World!', self);
- btnHello.CanExpandWidth := True;
- btnHello.CanExpandHeight := True;
- BoxLayout.InsertChild(btnHello);
-
- { set a min and max size }
- lSize.cx := 150;
- lSize.cy := 100;
- Wnd.SetMinMaxClientSize(lSize, lSize);
-end;
-
-
-var
- MainForm: TMainForm;
-begin
- GFApplication.Initialize;
- MainForm := TMainForm.Create(GFApplication);
- try
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
-end.
-
diff --git a/examples/gui/helloworld/mainform.frm b/examples/gui/helloworld/mainform.frm
deleted file mode 100644
index 2f36a8e7..00000000
--- a/examples/gui/helloworld/mainform.frm
+++ /dev/null
@@ -1,11 +0,0 @@
-object MainWindow: TMainWindow
- BorderWidth = 8
- WindowOptions = [woWindow]
- object TexTFLabel: TFLabel
- Text = 'Hello, world!'
- end
- object lblClose: TFLabel
- Text = '&Close'
- end
-end
-
diff --git a/examples/gui/interbasetest/Makefile b/examples/gui/interbasetest/Makefile
deleted file mode 100644
index 94d80579..00000000
--- a/examples/gui/interbasetest/Makefile
+++ /dev/null
@@ -1,1320 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/12/14]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION FPCOPT
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=interbasetest
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx fpgui
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inUnix
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-PACKAGEFPGUI=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-ifdef PACKAGEFPGUI
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui/$(OS_TARGET)),)
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui/$(OS_TARGET)
-else
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGUI)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgui
-package_fpgui:
- $(MAKE) -C $(PACKAGEDIR_FPGUI) all
-endif
-UNITDIR_FPGUI=$(PACKAGEDIR_FPGUI)
-else
-PACKAGEDIR_FPGUI=
-ifneq ($(wildcard $(UNITSDIR)/fpgui),)
-ifneq ($(wildcard $(UNITSDIR)/fpgui/$(OS_TARGET)),)
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui/$(OS_TARGET)
-else
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui
-endif
-else
-UNITDIR_FPGUI=
-endif
-endif
-ifdef UNITDIR_FPGUI
-override NEEDUNITDIR+=$(UNITDIR_FPGUI)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
- cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/gui/interbasetest/Makefile.fpc b/examples/gui/interbasetest/Makefile.fpc
deleted file mode 100644
index 7d8d31ff..00000000
--- a/examples/gui/interbasetest/Makefile.fpc
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile.fpc for fpGUI InterbaseTest example
-#
-
-[targets]
-programs=interbasetest
-
-[require]
-options=-S2h
-packages=fcl fpgfx fpgui
diff --git a/examples/gui/interbasetest/interbasetest.pas b/examples/gui/interbasetest/interbasetest.pas
deleted file mode 100644
index b15aaee5..00000000
--- a/examples/gui/interbasetest/interbasetest.pas
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- $Id: interbasetest.pp,v 1.2 2001/01/17 21:35:45 sg Exp $
-
- fpGUI - Free Pascal Graphical User Interface
- Copyright (C) 2001 by
- Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org
-
- InterBase database test
-
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-}
-
-
-program InterBaseTest;
-
-{$linklib dl}
-{$linklib crypt}
-
-uses SysUtils, Classes, fpGUI, fpGUI_DB, DB, InterBase;
-
-type
-
- TMainForm = class(TForm)
- Database: TIBDatabase;
- Transaction: TIBTransaction;
- Query: TIBQuery;
- DataSource: TDataSource;
- Box, ConnectionBox: TFBoxLayout;
- ConnectionLabel, ConnectionStateLabel: TFLabel;
- ListBox: TListBox;
- CurDataseTFLabel: TFLabel;
- CurNameText, CurEMailText: TDBText;
- Navi: TFBoxLayout;
- FirstDataset, PrevDataset, NextDataset, LastDataset: TFButton;
- procedure FormCreate(Sender: TObject);
- procedure FirstDatasetClick(Sender: TObject);
- procedure PrevDatasetClick(Sender: TObject);
- procedure NextDatasetClick(Sender: TObject);
- procedure LastDatasetClick(Sender: TObject);
- end;
-
-
-// -------------------------------------------------------------------
-// TMainForm
-// -------------------------------------------------------------------
-
-procedure TMainForm.FormCreate(Sender: TObject);
-var
- x: Integer;
- s: String;
-begin
- Query := TIBQuery.Create(Self);
-
- Database.Connected := True;
- Database.Transaction := Transaction;
- Query.Database := Database;
- DataSource.DataSet := Query;
- Transaction.Action := caRollback;
- Transaction.Active := True;
-
- if Database.Connected then
- ConnectionStateLabel.Text := 'Yes'
- else
- ConnectionStateLabel.Text := 'No';
-
- CurNameText.DataSource := DataSource;
- CurNameText.DataField := 'UserName';
- CurEMailText.DataSource := DataSource;
- CurEMailText.DataField := 'InstEmail';
-
- Query.SQL.Add('select * from fpdev');
-WriteLn('Query.Active? ', Query.Active);
- Query.Open;
-
-WriteLn('Query.Active? ', Query.Active);
-
- while not Query.EOF do
- begin
- SetLength(s, 0);
- for x := 0 to Query.FieldCount - 2 do
- s := s + Query.Fields[x].AsString + ', ';
- s := s + Query.Fields[Query.FieldCount - 1].AsString;
- ListBox.Items.Add(s);
- Query.Next;
- end;
-
- Query.First;
-end;
-
-procedure TMainForm.FirstDatasetClick(Sender: TObject);
-begin
- Query.First;
-end;
-
-procedure TMainForm.PrevDatasetClick(Sender: TObject);
-begin
- Query.Prior;
-end;
-
-procedure TMainForm.NextDatasetClick(Sender: TObject);
-begin
- Query.Next;
-end;
-
-procedure TMainForm.LastDatasetClick(Sender: TObject);
-begin
- Query.Last;
-end;
-
-
-
-var
- MainForm: TMainForm;
-begin
- Application.Title := 'InterBase Test';
- Application.CreateForm(TMainForm, MainForm);
- Application.Run;
-end.
-
-
-{
- $Log: interbasetest.pp,v $
- Revision 1.2 2001/01/17 21:35:45 sg
- * Now uses fpGUI_DB unit
-
-}
diff --git a/examples/gui/interbasetest/mainform.frm b/examples/gui/interbasetest/mainform.frm
deleted file mode 100644
index c1e7917c..00000000
--- a/examples/gui/interbasetest/mainform.frm
+++ /dev/null
@@ -1,55 +0,0 @@
-object MainForm: TMainForm
- Text = 'Interbase test'
- BorderWidth = 8
- OnCreate = FormCreate
- object Database: TIBDatabase
- DatabaseName = 'test.gdb'
- UserName = 'sysdba'
- Password = 'masterkey'
- end
- object Transaction: TIBTransaction
- end
- object DataSource: TDataSource
- end
- object Box: TFBoxLayout
- Spacing = 8
- Orientation = Vertical
- object ConnectionBox: TFBoxLayout
- object ConnectionLabel: TFLabel
- Text = 'Connected to database? '
- end
- object ConnectionStateLabel: TFLabel
- Text = 'unknown'
- end
- end
- object ListBox: TListBox
- end
- object CurDataseTFLabel: TFLabel
- Text = 'Current dataset:'
- end
- object CurNameText: TDBText
- Text = '<name>'
- end
- object CurEMailText: TDBText
- Text = '<e-mail>'
- end
- object Navi: TFBoxLayout
- object FirstDataset: TFButton
- Text = 'First'
- OnClick = FirstDatasetClick
- end
- object PrevDataset: TFButton
- Text = 'Previous'
- OnClick = PrevDatasetClick
- end
- object NextDataset: TFButton
- Text = 'Next'
- OnClick = NextDatasetClick
- end
- object LastDataset: TFButton
- Text = 'Last'
- OnClick = LastDatasetClick
- end
- end
- end
-end
diff --git a/examples/gui/interbasetest/mkdb b/examples/gui/interbasetest/mkdb
deleted file mode 100644
index b4142314..00000000
--- a/examples/gui/interbasetest/mkdb
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# Script to create a table 'FPdev' and to fill it with data.
-# The script accepts an optional argument :
-# A database to connect to. (default 'testdb')
-#
-# Collect the database
-DATABASE=test.gdb
-# Choose one of the following:
-# ISQL=isql
-ISQL=/opt/interbase/bin/isql
-#
-# Don't edit after this.
-#
-echo -n "Creating and filling table FPdev in database $DATABASE..."
-# >/dev/null 2>&1
-${ISQL} << EOF
-set sql dialect 3;
-CREATE DATABASE "$DATABASE";
-create table FPDEV (
-id INT NOT NULL,
-UserName varchar(50),
-InstEmail CHAR(50),
-PRIMARY KEY (id));
-insert into FPdev values ('1','Michael Van Canneyt','Michael@tfdec1.fys.kuleuven.ac.be');
-insert into FPdev values ('2','Florian Klaempfl','ba2395@fen.baynet.de');
-insert into FPdev values ('3','Carl-Eric Codere','codc01@gel.usherb.ca');
-insert into FPdev values ('4','Daniel Mantione','d.s.p.mantione@twi.tudelft.nl');
-insert into FPdev values ('5','Pierre Muller','muller@europe.u-strasbg.fr');
-insert into FPdev values ('6','Jonas Maebe','jmaebe@mail.dma.be');
-insert into FPdev values ('7','Peter Vreman','pfv@worldonline.nl');
-insert into FPdev values ('8','Gerry Dubois','gerry@webworks.ml.org');
-insert into FPdev values ('9','name9','mail9');
-insert into FPdev values ('10','name10','mail10');
-insert into FPdev values ('11','name11','mail11');
-insert into FPdev values ('12','name12','mail12');
-create table test (
-timestamp_fld timestamp,
-smallint_fld smallint,
-integer_fld integer,
-float_fld float,
-double_fld double precision,
-char_fld char(10),
-varchar_fld varchar(50));
-insert into test values ('12.1.2000 00:30',10,70000,12.5,20.5,'testchar','testvarchar');
-commit;
-EOF
-if [ ! $? = 0 ]; then
- echo "Failed."
-else
- echo "Done."
-fi
-# Ready
diff --git a/examples/gui/layouttest/Makefile b/examples/gui/layouttest/Makefile
deleted file mode 100644
index 2ccf237e..00000000
--- a/examples/gui/layouttest/Makefile
+++ /dev/null
@@ -1,1320 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/12/14]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION FPCOPT
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=layouttest
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx fpgui
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inUnix
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-PACKAGEFPGUI=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-ifdef PACKAGEFPGUI
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui/$(OS_TARGET)),)
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui/$(OS_TARGET)
-else
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGUI)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgui
-package_fpgui:
- $(MAKE) -C $(PACKAGEDIR_FPGUI) all
-endif
-UNITDIR_FPGUI=$(PACKAGEDIR_FPGUI)
-else
-PACKAGEDIR_FPGUI=
-ifneq ($(wildcard $(UNITSDIR)/fpgui),)
-ifneq ($(wildcard $(UNITSDIR)/fpgui/$(OS_TARGET)),)
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui/$(OS_TARGET)
-else
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui
-endif
-else
-UNITDIR_FPGUI=
-endif
-endif
-ifdef UNITDIR_FPGUI
-override NEEDUNITDIR+=$(UNITDIR_FPGUI)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
- cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/gui/layouttest/Makefile.fpc b/examples/gui/layouttest/Makefile.fpc
deleted file mode 100644
index f779ccca..00000000
--- a/examples/gui/layouttest/Makefile.fpc
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile.fpc for fpGUI LayoutTest example
-#
-
-[targets]
-programs=layouttest
-
-[require]
-options=-S2h
-packages=fcl fpgfx fpgui
diff --git a/examples/gui/layouttest/boxform.frm b/examples/gui/layouttest/boxform.frm
deleted file mode 100644
index b2dc8320..00000000
--- a/examples/gui/layouttest/boxform.frm
+++ /dev/null
@@ -1,24 +0,0 @@
-object BoxWindow: TBoxWindow
- Text = 'Box layout'
- BorderWidth = 8
- object Layout: TFBoxLayout
- Spacing = 8
- Orientation = Vertical
- object BoxLayout: TFBoxLayout
- Spacing = 4
- object Button1: TFButton
- Text = 'Button 1'
- end
- object Button2: TFButton
- Text = 'Button 2'
- end
- object Button3: TFButton
- Text = 'Button 3'
- end
- end
- object FlipButton: TFButton
- Text = 'Switch to vertical'
- OnClick = FlipOrientation
- end
- end
-end
diff --git a/examples/gui/layouttest/layouttest.lpi b/examples/gui/layouttest/layouttest.lpi
deleted file mode 100644
index a37c989e..00000000
--- a/examples/gui/layouttest/layouttest.lpi
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
- </General>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- <MinVersion Minor="3" Valid="True"/>
- </Item1>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="layouttest.pas"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="LayoutTest"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <SearchPaths>
- <SrcPath Value="../../src/"/>
- </SearchPaths>
- <Parsing>
- <SyntaxOptions>
- <AllowLabel Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CustomOptions Value="-FUunits
-"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/layouttest/layouttest.pas b/examples/gui/layouttest/layouttest.pas
deleted file mode 100644
index acee6124..00000000
--- a/examples/gui/layouttest/layouttest.pas
+++ /dev/null
@@ -1,417 +0,0 @@
-program LayoutTest;
-
-uses
- Classes
- ,fpGUI
- ,fpguipackage
- ,fpGFX
- ,SysUtils
- ;
-
-type
- // Forward declarations
- TDockingForm = class;
- TGridForm = class;
- TBoxForm = class;
- TSimpleForm = class;
- TFixedForm = class;
-
- { TMainForm }
-
- TMainForm = class(TFForm)
- private
- DockingForm: TDockingForm;
- GridForm: TGridForm;
- BoxForm: TBoxForm;
- SimpleForm: TSimpleForm;
- FixedForm: TFixedForm;
- procedure BuildGUI;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- Box: TFBoxLayout;
- Title: TFLabel;
- SimpleBtn, FixedBtn, BoxBtn, GridBtn, DockingBtn, ExitBtn: TFButton;
- Separator: TSeparator;
- procedure SimpleBtnClicked(Sender: TObject);
- procedure FixedBtnClicked(Sender: TObject);
- procedure DockingBtnClicked(Sender: TObject);
- procedure GridBtnClicked(Sender: TObject);
- procedure BoxBtnClicked(Sender: TObject);
- procedure ExitBtnClicked(Sender: TObject);
- end;
-
-
- TSimpleForm = class(TFForm)
- Button: TFButton;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TFixedForm = class(TFForm)
- Layout: TFFixedLayout;
- Button1, Button2: TFButton;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TDockingForm = Class(TFForm)
- Layout: TFDockingLayout;
- Button1, Button2, Button3, Button4, Button5: TFButton;
- ListBox: TFListBox;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TGridForm = Class(TFForm)
- Layout: TFGridLayout;
- Button1, Button2, Button3, Button4, Button5, Button6: TFButton;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TBoxForm = Class(TFForm)
- Layout, BoxLayout: TFBoxLayout;
- Button1, Button2, Button3, FlipButton: TFButton;
- procedure FlipOrientation(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
-// -------------------------------------------------------------------
-// TMainForm
-// -------------------------------------------------------------------
-
-procedure TMainForm.BuildGUI;
-begin
- Name := 'MainForm';
- BorderWidth := 8;
- Text := 'Layout Demo';
-
- Box := TFBoxLayout.Create(self);
- Box.Spacing := 8;
- Box.Orientation := Vertical;
- InsertChild(Box);
-
- Title := TFLabel.Create('Choose a test Window:', self);
- Box.InsertChild(Title);
-
- SimpleBtn := TFButton.Create('Simple layout', self);
- SimpleBtn.CanExpandWidth := True;
- SimpleBtn.OnClick := @SimpleBtnClicked;
- Box.InsertChild(SimpleBtn);
-
- FixedBtn := TFButton.Create('Fixed layout', self);
- FixedBtn.CanExpandWidth := True;
- FixedBtn.OnClick := @FixedBtnClicked;
- Box.InsertChild(FixedBtn);
-
- BoxBtn := TFButton.Create('Boxed layout', self);
- BoxBtn.CanExpandWidth := True;
- BoxBtn.OnClick := @BoxBtnClicked;
- Box.InsertChild(BoxBtn);
-
- GridBtn := TFButton.Create('Grid layout', self);
- GridBtn.CanExpandWidth := True;
- GridBtn.OnClick := @GridBtnClicked;
- Box.InsertChild(GridBtn);
-
- DockingBtn := TFButton.Create('Docking layout', self);
- DockingBtn.CanExpandWidth := True;
- DockingBtn.OnClick := @DockingBtnClicked;
- Box.InsertChild(DockingBtn);
-
- Separator := TSeparator.Create(self);
- Box.InsertChild(Separator);
-
- ExitBtn := TFButton.Create('Exit', self);
- ExitBtn.CanExpandWidth := True;
- ExitBtn.OnClick := @ExitBtnClicked;
- Box.InsertChild(ExitBtn);
-end;
-
-constructor TMainForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- BuildGUI;
-end;
-
-destructor TMainForm.Destroy;
-begin
- FixedForm.Free;
- GridForm.Free;
- BoxForm.Free;
- DockingForm.Free;
- SimpleForm.Free;
- inherited Destroy;
-end;
-
-
-procedure TMainForm.SimpleBtnClicked(Sender: TObject);
-begin
- if not Assigned(SimpleForm) then
- SimpleForm := TSimpleForm.Create(self);
- SimpleForm.Show;
-end;
-
-
-type
- TFriend = class(TFFixedLayout)
- end;
-
-procedure TMainForm.FixedBtnClicked(Sender: TObject);
-begin
- if not Assigned(FixedForm) then
- FixedForm := TFixedForm.Create(self);
- FixedForm.Show;
-end;
-
-
-procedure TMainForm.DockingBtnClicked(Sender: TObject);
-begin
- if not Assigned(DockingForm) then
- DockingForm := TDockingForm.Create(self);
- DockingForm.Show;
-end;
-
-
-procedure TMainForm.GridBtnClicked(Sender: TObject);
-var
- f, f2: TStream;
-begin
- if not Assigned(GridForm) then
- GridForm := TGridForm.Create(self);
- GridForm.Show;
- { Output the structure of GridForm.Layout }
- f := TMemoryStream.Create;
- f.WriteComponent(GridForm.Layout);
- f2 := THandleStream.Create(StdOutputHandle);
- f.Position := 0;
- ObjectBinaryToText(f, f2);
- f2.Free;
- f.Free;
-end;
-
-
-procedure TMainForm.BoxBtnClicked(Sender: TObject);
-begin
- if not Assigned(BoxForm) then
- BoxForm := TBoxForm.Create(self);
- BoxForm.Show;
-end;
-
-
-procedure TMainForm.ExitBtnClicked(Sender: TObject);
-begin
- Close;
-end;
-
-
-// -------------------------------------------------------------------
-// TSimpleForm
-// -------------------------------------------------------------------
-
-constructor TSimpleForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-
- Text := 'Simple Layout';
- BorderWidth := 8;
-
- Button := TFButton.Create(Self);
- Button.Text := 'A button...';
- Child := Button;
-end;
-
-
-// -------------------------------------------------------------------
-// TFixedForm
-// -------------------------------------------------------------------
-
-constructor TFixedForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-
- Text := 'Fixed Layout';
- BorderWidth := 8;
-
- Layout := TFFixedLayout.Create(Self);
- Layout.Name := 'Layout';
- InsertChild(Layout);
-
- Button1 := TFButton.Create('A button', self);
- Button1.Name := 'Button1';
- Layout.AddWidget(Button1, 20, 20);
-
- Button2 := TFButton.Create('Another button', self);
- Button2.Name := 'Button2';
- Layout.AddWidget(Button2, 50, 100);
- Button2.SetBounds(50, 100, 100, 25); // resize second button to show it works
-end;
-
-
-// -------------------------------------------------------------------
-// TDockingForm
-// -------------------------------------------------------------------
-
-
-constructor TDockingForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-
- Text := 'Docking Layout';
- BorderWidth := 8;
-
- Layout := TFDockingLayout.Create(Self);
- Layout.Name := 'Layout';
- InsertChild(Layout);
-
- Layout.AddWidget(TFButton.Create('Top Alignment', self), dmTop);
- Layout.AddWidget(TFButton.Create('Bottom Alignment', self), dmBottom);
- Layout.AddWidget(TFButton.Create('Left Alignment', self), dmLeft);
- Layout.AddWidget(TFButton.Create('Right Alignment', self), dmRight);
-
- Layout.AddWidget(TFButton.Create('aaa (bottom)', self), dmBottom);
- Layout.AddWidget(TFButton.Create('bbb (bottom)', self), dmBottom);
- Layout.AddWidget(TFButton.Create('ccc (bottom)', self), dmBottom);
-
- ListBox := TFListBox.Create(self);
- ListBox.Items.Add('Client Alignment');
- ListBox.Items.Add('');
- ListBox.Items.Add('procedure KeyPressed();');
- ListBox.Items.Add('procedure KeyReleased();');
- ListBox.Items.Add('procedure ButtonPressed();');
- ListBox.Items.Add('procedure ButtonReleased();');
- ListBox.Items.Add('procedure EnterWindow();');
- ListBox.Items.Add('procedure LeaveWindow();');
- ListBox.Items.Add('procedure PointerMoved();');
- ListBox.Items.Add('procedure Expose();');
- ListBox.Items.Add('procedure FocusIn();');
- ListBox.Items.Add('procedure FocusOut();');
- ListBox.Items.Add('procedure Map();');
- ListBox.Items.Add('procedure Unmap();');
- ListBox.Items.Add('procedure Reparent();');
- ListBox.Items.Add('procedure DestroyWindow();');
- ListBox.Items.Add('procedure Configure();');
- ListBox.Items.Add('procedure ClientMessage();');
- Layout.AddWidget(ListBox, dmClient);
-end;
-
-
-// -------------------------------------------------------------------
-// TGridForm
-// -------------------------------------------------------------------
-
-constructor TGridForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
-
- Text := 'Grid Layout';
- BorderWidth := 8;
-
- Layout := TFGridLayout.Create(Self);
- Layout.Name := 'Layout';
- Layout.RowCount := 4;
- Layout.ColCount := 3;
- InsertChild(Layout);
-
- Button1 := TFButton.Create('Top Left', Self);
- Button1.Name := 'TopLeft';
- Layout.AddWidget(Button1, 0, 0, 1, 1);
-
- Button2 := TFButton.Create('Top Right', Self);
- Button2.Name := 'TopRight';
- Layout.AddWidget(Button2, 2,0,1,1);
-
- Button3 := TFButton.Create(Self);
- Button3.Name := 'CenterCenter';
- Button3.Text := 'Center Center';
- Layout.AddWidget(Button3, 1,1,1,1);
-
- Button4 := TFButton.Create('Bottom Left', Self);
- Button4.Name := 'BottomLeft';
- Layout.AddWidget(Button4,0,2,1,1);
-
- Button5 := TFButton.Create('Bottom Right', Self);
- Button5.Name := 'BottomRight';
- Layout.AddWidget(Button5, 2,2,1,1);
-
- Button6 := TFButton.Create('Span Columns', Self);
- Button6.Name := 'BottomSpan';
- Layout.AddWidget(Button6, 0,3,3,1);
-end;
-
-
-// -------------------------------------------------------------------
-// TBoxForm
-// -------------------------------------------------------------------
-
-procedure TBoxForm.FlipOrientation(Sender: TObject);
-begin
- with BoxLayout do
- begin
- if Orientation = Horizontal then
- begin
- Orientation := Vertical;
- FlipButton.Text:='Switch to horizontal';
- end
- else
- begin
- Orientation := Horizontal;
- FlipButton.text:='Switch to vertical';
- end;
- end; { with }
-
- // A quick hack to get the Form to redraw correctly
- Close;
- Show;
-end;
-
-constructor TBoxForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Text := 'Box Layout';
- BorderWidth := 8;
-
- Layout := TFBoxLayout.Create(self);
- Layout.Spacing := 8;
- Layout.Orientation := Vertical;
- InsertChild(Layout);
-
- BoxLayout := TFBoxLayout.Create(self);
- BoxLayout.Spacing := 4;
- Layout.InsertChild(BoxLayout);
-
- Button1 := TFButton.Create('Button 1', self);
- BoxLayout.InsertChild(Button1);
-
- Button2 := TFButton.Create('Button 2', self);
- BoxLayout.InsertChild(Button2);
-
- Button3 := TFButton.Create('Button 3', self);
- BoxLayout.InsertChild(Button3);
-
- FlipButton := TFButton.Create('Switch to vertical', self);
- FlipButton.OnClick := @FlipOrientation;
- Layout.InsertChild(FlipButton);
-end;
-
-
-var
- MainForm: TMainForm;
-begin
- GFApplication.Initialize;
- MainForm := TMainForm.Create(GFApplication);
- try
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
-end.
diff --git a/examples/gui/utfdemo/test.pas b/examples/gui/utfdemo/test.pas
deleted file mode 100644
index 6c551cb1..00000000
--- a/examples/gui/utfdemo/test.pas
+++ /dev/null
@@ -1,4 +0,0 @@
-╔══════════════╕
-╠══════════════╡
-║ │
-╚══════════════╛
diff --git a/examples/gui/utfdemo/utfdemo.lpi b/examples/gui/utfdemo/utfdemo.lpi
deleted file mode 100644
index 07c7660d..00000000
--- a/examples/gui/utfdemo/utfdemo.lpi
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=".exe"/>
- </General>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- <MinVersion Minor="3" Valid="True"/>
- </Item1>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="utfdemo.lpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="utfdemo"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <Parsing>
- <SyntaxOptions>
- <AllowLabel Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CustomOptions Value="-FUunits
-"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/utfdemo/utfdemo.lpr b/examples/gui/utfdemo/utfdemo.lpr
deleted file mode 100644
index 92422bff..00000000
--- a/examples/gui/utfdemo/utfdemo.lpr
+++ /dev/null
@@ -1,82 +0,0 @@
-program utfdemo;
-
-{$mode objfpc}{$H+}
-
-uses
- {$IFDEF UNIX}{$IFDEF UseCThreads}
- cthreads,
- {$ENDIF}{$ENDIF}
- Classes
- ,GFXBase
- ,fpGFX
- ,fpGUI
- ;
-
-type
-
- { TMainForm }
-
- TMainForm = class(TFForm)
- private
- FLayout: TFBoxLayout;
- procedure MainFormActivate(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- published
- TextLabel: TFLabel;
- Edit: TFEdit;
- end;
-
-
-{ TMainForm }
-
-procedure TMainForm.MainFormActivate(Sender: TObject);
-var
- max: TSize;
-begin
- max.cx := 250;
- max.cy := 80;
- Wnd.SetMinMaxClientSize(max, max);
-end;
-
-
-constructor TMainForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Name := 'frmMain';
- BorderWidth := 8;
- Text := 'UTF Demo';
- OnActivate := @MainFormActivate;
-
- FLayout := TFBoxLayout.Create(self);
- FLayout.Orientation := Vertical;
- FLayout.Parent := self;
- InsertChild(FLayout);
-
- TextLabel := TFLabel.Create(self);
-// TextLabel.Text := 'Gráficas Magnificacion! Teste';
- TextLabel.Text := 'Test Russian text -> Òåñò';
- FLayout.InsertChild(TextLabel);
-
- Edit := TFEdit.Create(self);
- Edit.CanExpandWidth := True;
-// Edit.Text := 'Gráficas Magnificacion! Teste';
- Edit.Text := 'Test Russian text -> Òåñò';
- FLayout.InsertChild(Edit);
-end;
-
-
-var
- MainForm: TMainForm;
-begin
- GFApplication.Initialize;
- MainForm := TMainForm.Create(nil);
- try
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
-end.
-
-
diff --git a/examples/gui/widgetdemo/widgetdemo.lpi b/examples/gui/widgetdemo/widgetdemo.lpi
deleted file mode 100644
index 54798ccc..00000000
--- a/examples/gui/widgetdemo/widgetdemo.lpi
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
- </General>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- </Item1>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="widgetdemo.lpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="widgetdemo"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <Parsing>
- <SyntaxOptions>
- <IncludeAssertionCode Value="True"/>
- <AllowLabel Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CustomOptions Value="-FUunits
-"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/widgetdemo/widgetdemo.lpr b/examples/gui/widgetdemo/widgetdemo.lpr
deleted file mode 100644
index 60679669..00000000
--- a/examples/gui/widgetdemo/widgetdemo.lpr
+++ /dev/null
@@ -1,356 +0,0 @@
-{
- A proof of concept demo to see if we could duplicate one of Qt4's demos.
-}
-
-program WidgetDemo;
-
-{$mode objfpc}{$H+}
-
-uses
- {$IFDEF UNIX}{$IFDEF UseCThreads}
- cthreads,
- {$ENDIF}{$ENDIF}
- Classes
- ,SysUtils
- ,fpGFX
- ,fpGUI
- ,StyleManager
- ;
-
-type
-
- { TWidgetDemoForm }
-
- TWidgetDemoForm = class(TFForm)
- topLayout: TFBoxLayout;
- mainLayout: TFGridLayout;
- MainMenu: TFMenuBar;
-
- topStyleComboLayout: TFBoxLayout;
- lblStyle: TFLabel;
- cbStyle: TFComboBox;
-
- topCheckboxLayout: TFBoxLayout;
- chkStdPalette: TFCheckBox;
- chkDisable: TFCheckBox;
-
- topLeftGroupBox: TFGroupBox;
- topLeftGroupBoxLayout: TFBoxLayout;
- Radio1: TFRadioButton;
- Radio2: TFRadioButton;
- Radio3: TFRadioButton;
-
- topRightGroupBox: TFGroupBox;
- topRightGroupBoxLayout: TFBoxLayout;
- Button1: TFButton;
- Button2: TFButton;
-
- StringGrid: TFStringGrid;
-
- bottomRightGroupBox: TFGroupBox;
- bottomRightGroupBoxLayout: TFBoxLayout;
- Edit1: TFEdit;
- Edit2: TFEdit;
-
- bottomButtonLayout: TFBoxLayout;
- btnExit: TFButton;
- btnHelp: TFButton;
-
- procedure btnExitClick(Sender: TObject);
- procedure Radio1Click(Sender: TObject);
- procedure Radio2Click(Sender: TObject);
- procedure cbStyleChanged(Sender: TObject);
- procedure TranslateToAfrikaans;
- procedure TranslateToEnglish;
- procedure chkDisableClick(Sender: TObject);
- private
- procedure CreateTopMenu;
- procedure CreateStyleCombo;
- procedure CreateTopCheckboxLine;
- procedure CreateTopLeftGroupBox;
- procedure CreateTopRightGroupBox;
- procedure CreateBottomLeftStringGrid;
- procedure CreateBottomRightGroupBox;
- procedure CreateBottomButtonLayout;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
-{ TWidgetDemoForm }
-
-procedure TWidgetDemoForm.btnExitClick(Sender: TObject);
-begin
- Close;
-end;
-
-procedure TWidgetDemoForm.Radio1Click(Sender: TObject);
-begin
- TranslateToEnglish;
-end;
-
-procedure TWidgetDemoForm.Radio2Click(Sender: TObject);
-begin
- TranslateToAfrikaans;
-end;
-
-procedure TWidgetDemoForm.cbStyleChanged(Sender: TObject);
-begin
- { I want to try something later with this }
-// gStyleManager.SetStyle(cbStyle.Text);
- if cbStyle.Text <> cDefaultStyle then
- Style.Free;
- Style := gStyleManager.CreateInstance(cbStyle.Text);
- Redraw;
-end;
-
-procedure TWidgetDemoForm.TranslateToAfrikaans;
-begin
- Text := 'Widget Demo - Afrikaans';
- lblStyle.Text := 'Venster Steil:';
- chkStdPalette.Text := 'Standaard kleur tablette';
- chkDisable.Text := 'Ge-deaktiveerde controles';
- topLeftGroupBox.Text := 'Groep Boks Een';
- Radio1.Text := 'Radio knoppie een';
- Radio2.Text := 'Radio knoppie twee';
- Radio3.Text := 'Radio knoppie drie';
- topLeftGroupBox.Text := 'Groep Boks Twee';
- Button1.Text := 'Normal Button';
- Button2.Text := 'Embedded Button';
- bottomRightGroupBox.Text := 'Group Boks Drie';
- Edit1.Text := 'Normale teks';
- Edit2.Text := 'Wagwoord teks';
- btnExit.Text := 'Verlaat Verlaat';
- btnHelp.Text := 'Hulp';
- Update;
- Redraw;
-end;
-
-procedure TWidgetDemoForm.TranslateToEnglish;
-begin
- Text := 'Widget Demo - English';
- lblStyle.Text := 'Style:';
- chkStdPalette.Text := 'Standard color palette';
- chkDisable.Text := 'Disable widgets';
- topLeftGroupBox.Text := 'Group Box 1';
- Radio1.Text := 'Radio button 1';
- Radio2.Text := 'Radio button 2';
- Radio3.Text := 'Radio button 3';
- topRightGroupBox.Text := 'Group Box 2';
- Button1.Text := 'Normal Button';
- Button2.Text := 'Embedded Button';
- bottomRightGroupBox.Text := 'Group Box 3';
- Edit1.Text := 'Normal Edit';
- Edit2.Text := 'Password Edit';
- btnExit.Text := 'Exit';
- btnHelp.Text := 'Help';
- Update;
- Redraw;
-end;
-
-procedure TWidgetDemoForm.chkDisableClick(Sender: TObject);
-begin
- lblStyle.Enabled := not chkDisable.Checked;
- cbStyle.Enabled := not chkDisable.Checked;
- chkStdPalette.Enabled := not chkDisable.Checked;
- topLeftGroupBox.Enabled := not chkDisable.Checked;
- topRightGroupBox.Enabled := not chkDisable.Checked;
- StringGrid.Enabled := not chkDisable.Checked;
- bottomRightGroupBox.Enabled := not chkDisable.Checked;
-end;
-
-procedure TWidgetDemoForm.CreateTopMenu;
-var
- mi: TFMenuItem;
-begin
- MainMenu := TFMenuBar.Create(self);
- mi := MainMenu.AddMenu('File');
- mi.SubMenu.AddMenu('Exit', '', @btnExitClick);
- MainMenu.AddMenu('Edit');
- MainMenu.AddMenu('Options');
- MainMenu.AddMenu('Windows');
- MainMenu.AddMenu('Help');
-// MainMenu.CanExpandWidth := True;
-end;
-
-procedure TWidgetDemoForm.CreateStyleCombo;
-begin
- topStyleComboLayout := TFBoxLayout.Create(self);
-
- lblStyle := TFLabel.Create('Style:', self);
-
- cbStyle := TFComboBox.Create(self);
- cbStyle.CanExpandWidth := True;
- gStyleManager.AssignStyleTypes(cbStyle.Items);
- cbStyle.OnChange := @cbStyleChanged;
- cbStyle.ItemIndex := 0;
-
- topStyleComboLayout.InsertChild(lblStyle);
- topStyleComboLayout.InsertChild(cbStyle);
-end;
-
-procedure TWidgetDemoForm.CreateTopCheckboxLine;
-begin
- topCheckboxLayout := TFBoxLayout.Create(self);
-
- chkStdPalette := TFCheckBox.Create('Standard color palette', self);
- chkStdPalette.CanExpandWidth := True;
- chkStdPalette.Checked := True;
-
- chkDisable := TFCheckBox.Create('Disable widgets', self);
- chkDisable.OnClick := @chkDisableClick;
-
- topCheckboxLayout.InsertChild(chkStdPalette);
- topCheckboxLayout.InsertChild(chkDisable);
-end;
-
-procedure TWidgetDemoForm.CreateTopLeftGroupBox;
-begin
- topLeftGroupBox := TFGroupBox.Create('Group Box 1', self);
- topLeftGroupBox.CanExpandWidth := True;
-
- topLeftGroupBoxLayout := TFBoxLayout.Create(self);
- topLeftGroupBoxLayout.Orientation := Vertical;
-
- Radio1 := TFRadioButton.Create('Radio button 1', self);
- Radio1.Checked := True;
- Radio1.CanExpandWidth := True;
- Radio1.OnClick := @Radio1Click;
-
- Radio2 := TFRadioButton.Create('Radio button 2', self);
- Radio2.CanExpandWidth := True;
- Radio2.OnClick := @Radio2Click;
-
- Radio3 := TFRadioButton.Create('Radio button 3', self);
- Radio3.CanExpandWidth := True;
-
- topLeftGroupBox.InsertChild(topLeftGroupBoxLayout);
- topLeftGroupBoxLayout.InsertChild(Radio1);
- topLeftGroupBoxLayout.InsertChild(Radio2);
- topLeftGroupBoxLayout.InsertChild(Radio3);
-end;
-
-procedure TWidgetDemoForm.CreateTopRightGroupBox;
-begin
- topRightGroupBox := TFGroupBox.Create('Group Box 2', self);
- topRightGroupBox.CanExpandWidth := True;
- topRightGroupBox.CanExpandHeight := True;
-
- topRightGroupBoxLayout := TFBoxLayout.Create(self);
- topRightGroupBoxLayout.Orientation := Vertical;
- topRightGroupBoxLayout.VertAlign := vertCenter;
- topRightGroupBoxLayout.Spacing := 8;
-
- Button1 := TFButton.Create('Normal Button', self);
- Button1.CanExpandWidth := True;
-
- Button2 := TFButton.Create('Embedded Button', self);
- Button2.CanExpandWidth := True;
- Button2.Embedded := True;
-
- topRightGroupBox.InsertChild(topRightGroupBoxLayout);
- topRightGroupBoxLayout.InsertChild(Button1);
- topRightGroupBoxLayout.InsertChild(Button2);
-end;
-
-procedure TWidgetDemoForm.CreateBottomLeftStringGrid;
-var
- x, y: integer;
-begin
- StringGrid := TFStringGrid.Create(self);
- StringGrid.ColCount := 10;
- StringGrid.RowCount := 15;
- for y := 0 to StringGrid.RowCount - 1 do
- for x := 0 to StringGrid.ColCount - 1 do
- StringGrid.Cells[x, y] := Format('%d, %d', [x, y]);
-end;
-
-procedure TWidgetDemoForm.CreateBottomRightGroupBox;
-begin
- bottomRightGroupBox := TFGroupBox.Create('Group Box 3', self);
- bottomRightGroupBox.CanExpandHeight := True;
- bottomRightGroupBox.CanExpandWidth := True;
-
- bottomRightGroupBoxLayout := TFBoxLayout.Create(self);
- bottomRightGroupBoxLayout.Orientation := Vertical;
-
- Edit1 := TFEdit.Create('Normal Edit', self);
- Edit2 := TFEdit.Create('Password Edit', self);
- Edit2.PasswordChar := '*';
-
- bottomRightGroupBox.InsertChild(bottomRightGroupBoxLayout);
- bottomRightGroupBoxLayout.InsertChild(Edit1);
- bottomRightGroupBoxLayout.InsertChild(Edit2);
-end;
-
-procedure TWidgetDemoForm.CreateBottomButtonLayout;
-begin
- bottomButtonLayout := TFBoxLayout.Create(self);
- bottomButtonLayout.HorzAlign := horzRight;
-
- btnHelp := TFButton.Create('Help', self);
-
- btnExit := TFButton.Create('Exit', self);
- btnExit.OnClick := @btnExitClick;
-
- bottomButtonLayout.InsertChild(btnHelp);
- bottomButtonLayout.InsertChild(btnExit);
-end;
-
-constructor TWidgetDemoForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Text := 'Widget Demo';
- BorderWidth := 8;
-
- topLayout := TFBoxLayout.Create(self);
- topLayout.Orientation := Vertical;
- mainLayout := TFGridLayout.Create(self);
- mainLayout.RowCount := 2;
-// mainlayout.RowSpacing := 0;
-
- CreateTopMenu;
- topLayout.InsertChild(MainMenu);
-
- CreateStyleCombo;
- topLayout.InsertChild(topStyleComboLayout);
-
- CreateTopCheckboxLine;
- topLayout.InsertChild(topCheckboxLayout);
-
- CreateTopLeftGroupBox;
- mainLayout.AddWidget(topLeftGroupBox, 0, 0, 1, 1);
-
- CreateTopRightGroupBox;
- mainLayout.AddWidget(topRightGroupBox, 1, 0, 1, 1);
-
- CreateBottomLeftStringGrid;
- mainLayout.AddWidget(StringGrid, 0, 1, 1, 1);
-
- CreateBottomRightGroupBox;
- mainLayout.AddWidget(bottomRightGroupBox, 1, 1, 1, 1);
-
- topLayout.InsertChild(mainLayout);
-
- CreateBottomButtonLayout;
- topLayout.InsertChild(bottomButtonLayout);
-
- Child := topLayout;
-end;
-
-
-var
- WidgetDemoForm: TWidgetDemoForm;
-
-begin
- GFApplication.Initialize;
-
- WidgetDemoForm := TWidgetDemoForm.Create(nil);
- try
- WidgetDemoForm.Show;
- GFApplication.Run;
- finally
- WidgetDemoForm.Free;
- end;
-end.
-
diff --git a/examples/gui/widgettest/Makefile b/examples/gui/widgettest/Makefile
deleted file mode 100644
index 2c9fa63e..00000000
--- a/examples/gui/widgettest/Makefile
+++ /dev/null
@@ -1,1320 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/12/14]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION FPCOPT
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=widgettest
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx fpgui
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inUnix
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-PACKAGEFPGUI=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-ifdef PACKAGEFPGUI
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgui/$(OS_TARGET)),)
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui/$(OS_TARGET)
-else
-PACKAGEDIR_FPGUI=$(PACKAGESDIR)/fpgui
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGUI)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgui
-package_fpgui:
- $(MAKE) -C $(PACKAGEDIR_FPGUI) all
-endif
-UNITDIR_FPGUI=$(PACKAGEDIR_FPGUI)
-else
-PACKAGEDIR_FPGUI=
-ifneq ($(wildcard $(UNITSDIR)/fpgui),)
-ifneq ($(wildcard $(UNITSDIR)/fpgui/$(OS_TARGET)),)
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui/$(OS_TARGET)
-else
-UNITDIR_FPGUI=$(UNITSDIR)/fpgui
-endif
-else
-UNITDIR_FPGUI=
-endif
-endif
-ifdef UNITDIR_FPGUI
-override NEEDUNITDIR+=$(UNITDIR_FPGUI)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
- cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/gui/widgettest/Makefile.fpc b/examples/gui/widgettest/Makefile.fpc
deleted file mode 100644
index 57009620..00000000
--- a/examples/gui/widgettest/Makefile.fpc
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile.fpc for fpGUI WidgetTest example
-#
-
-[targets]
-programs=widgettest
-
-[require]
-options=-S2h
-packages=fcl fpgfx fpgui
diff --git a/examples/gui/widgettest/checkboxform.frm b/examples/gui/widgettest/checkboxform.frm
deleted file mode 100644
index 6b0ec377..00000000
--- a/examples/gui/widgettest/checkboxform.frm
+++ /dev/null
@@ -1,17 +0,0 @@
-object CheckBoxForm: TCheckBoxForm
- BorderWidth = 8
- Text = 'Check box test'
- object Box: TFBoxLayout
- Orientation = Vertical
- object GrayCheckBox: TFCheckBox
- Text = 'Gray other check boxes'
- OnClick = GrayCheckBoxClick
- end
- object CheckBox1: TFCheckBox
- Text = 'First other check box'
- end
- object CheckBox2: TFCheckBox
- Text = 'Second other check box'
- end
- end
-end
diff --git a/examples/gui/widgettest/comboboxform.frm b/examples/gui/widgettest/comboboxform.frm
deleted file mode 100644
index 4953eccf..00000000
--- a/examples/gui/widgettest/comboboxform.frm
+++ /dev/null
@@ -1,19 +0,0 @@
-object ComboBoxForm: TComboBoxForm
- BorderWidth = 8
- Text = 'Combo box test'
- OnCreate = FormCreate
- object VertBox: TFBoxLayout
- Orientation = Vertical
- object GrayCheckBox: TFCheckBox
- Text = 'Gray combo boxes'
- OnClick = GrayCheckBoxClick
- end
- object BetaLabel: TFLabel
- Text = '(the drop-down lists are work in progress)'
- end
- object ComboBox1: TFComboBox
- end
- object ComboBox2: TFComboBox
- end
- end
-end
diff --git a/examples/gui/widgettest/editform.frm b/examples/gui/widgettest/editform.frm
deleted file mode 100644
index 8e8c97de..00000000
--- a/examples/gui/widgettest/editform.frm
+++ /dev/null
@@ -1,85 +0,0 @@
-object EditForm: TEditForm
- BorderWidth = 8
- Text = 'Edit field test'
- object Grid: TFGridLayout
- ColCount = 3
- RowCount = 5
- GridPositions = <
- item
- Widget = Label1
- end
- item
- x = 1
- Widget = Edit1
- end
- item
- x = 2
- Widget = GrayCheckBox1
- end
- item
- y = 1
- width = 3
- Widget = Separator
- end
- item
- y = 2
- Widget = Label2
- end
- item
- x = 1
- y = 2
- Widget = Edit2
- end
- item
- x = 2
- y = 2
- Widget = GrayCheckBox2
- end
- item
- x = 1
- y = 3
- Widget = PasswordDisplay
- end
- item
- Widget = cbBorderStyle
- x = 2
- y = 4
- Width = 1
- Height = 1
- end>
- object Label1: TFLabel
- Text = 'Normal edit field:'
- CanExpandWidth = False
- end
- object Edit1: TFEdit
- Text = 'Edit1'
- end
- object GrayCheckBox1: TFCheckBox
- Text = 'Disabled'
- OnClick = GrayCheckBox1Click
- end
- object Separator: TSeparator
- end
- object Label2: TFLabel
- Text = 'Password edit field:'
- CanExpandWidth = False
- end
- object Edit2: TFEdit
- PasswordChar = '*'
- Text = 'Edit2'
- OnChange = Edit2Change
- end
- object GrayCheckBox2: TFCheckBox
- Text = 'Show Text'
- OnClick = GrayCheckBox2Click
- end
- object PasswordDisplay: TFLabel
- Text = '(Password field)'
- CanExpandWidth = False
- end
- object cbBorderStyle: TFButton
- Text = 'Alternate Border Style'
- OnClick = cbBorderStyleClick
- end
- end
-end
diff --git a/examples/gui/widgettest/gridform.frm b/examples/gui/widgettest/gridform.frm
deleted file mode 100644
index 26680064..00000000
--- a/examples/gui/widgettest/gridform.frm
+++ /dev/null
@@ -1,9 +0,0 @@
-object GridForm: TGridForm
- BorderWidth = 8
- Text = 'Grid test'
- OnCreate = FormCreate
- object StringGrid: TFStringGrid
- ColCount = 10
- RowCount = 15
- end
-end
diff --git a/examples/gui/widgettest/groupboxform.frm b/examples/gui/widgettest/groupboxform.frm
deleted file mode 100644
index e3b7111e..00000000
--- a/examples/gui/widgettest/groupboxform.frm
+++ /dev/null
@@ -1,49 +0,0 @@
-object GroupBoxForm: TGroupBoxForm
- BorderWidth = 8
- Text = 'Group box test'
- object HorzBox: TFBoxLayout
- VertAlign = vertTop
- object GroupBox1: TFGroupBox
- Text = 'Group box #1'
- object VertBox1: TFBoxLayout
- Orientation = Vertical
- object GrayCheckBox: TFCheckBox
- Text = 'Gray other group box'
- OnClick = GrayCheckBoxClick
- end
- object Button: TFButton
- Enabled = False
- Text = 'Reset radio buttons'
- OnClick = ButtonClick
- end
- end
- end
- object GroupBox2: TFGroupBox
- Text = 'Group box #2'
- object VertBox2: TFBoxLayout
- Orientation = Vertical
- object Radio1: TFRadioButton
- Checked = True
- Text = 'Option 1'
- OnClick = RadioButtonClick
- end
- object Radio2: TFRadioButton
- Text = 'Option 2'
- OnClick = RadioButtonClick
- end
- object Radio3: TFRadioButton
- Text = 'Option 3'
- OnClick = RadioButtonClick
- end
- object Radio4: TFRadioButton
- Text = 'Option 4'
- OnClick = RadioButtonClick
- end
- object Radio5: TFRadioButton
- Text = 'Option 5'
- OnClick = RadioButtonClick
- end
- end
- end
- end
-end
diff --git a/examples/gui/widgettest/listboxform.frm b/examples/gui/widgettest/listboxform.frm
deleted file mode 100644
index 2071b122..00000000
--- a/examples/gui/widgettest/listboxform.frm
+++ /dev/null
@@ -1,23 +0,0 @@
-object ListBoxForm: TListBoxForm
- BorderWidth = 8
- Text = 'List box test'
- object ListBox: TFListBox
- Items.Strings = (
- 'procedure KeyPressed(var Event: TXKeyPressedEvent); message X.KeyPress;'
- 'procedure KeyReleased(var Event: TXKeyReleasedEvent); message X.KeyRelease;'
- 'procedure ButtonPressed(var Event: TXButtonPressedEvent); message X.ButtonPress;'
- 'procedure ButtonReleased(var Event: TXButtonReleasedEvent); message X.ButtonRelease;'
- 'procedure EnterWindow(var Event :TXEnterWindowEvent); message X.EnterNotify;'
- 'procedure LeaveWindow(var Event :TXLeaveWindowEvent); message X.LeaveNotify;'
- 'procedure PointerMoved(var Event: TXPointerMovedEvent); message X.MotionNotify;'
- 'procedure Expose(var Event: TXExposeEvent); message X.Expose;'
- 'procedure FocusIn(var Event: TXFocusInEvent); message X.FocusIn;'
- 'procedure FocusOut(var Event: TXFocusOutEvent); message X.FocusOut;'
- 'procedure Map(var Event: TXMapEvent); message X.MapNotify;'
- 'procedure Unmap(var Event: TXUnmapEvent); message X.UnmapNotify;'
- 'procedure Reparent(var Event: TXReparentEvent); message X.ReparentNotify;'
- 'procedure DestroyWindow(var Event: TXDestroyWindowEvent); message X.DestroyNotify;'
- 'procedure Configure(var Event: TXConfigureEvent); message X.ConfigureNotify;'
- 'procedure ClientMessage(var Event: TXClientMessageEvent); message X.ClientMessage;')
- end
-end
diff --git a/examples/gui/widgettest/mainform.frm b/examples/gui/widgettest/mainform.frm
deleted file mode 100644
index bf91f0fd..00000000
--- a/examples/gui/widgettest/mainform.frm
+++ /dev/null
@@ -1,91 +0,0 @@
-object MainForm: TMainForm
- Text = 'Widget tests'
- BorderWidth = 8
- WindowOptions = [woWindow]
- object Box: TFBoxLayout
- CanExpandWidth = False
- Spacing = 8
- Orientation = Vertical
- object Label: TFLabel
- CanExpandWidth = True
- Text = 'Choose a test form:'
- end
- object CheckboxBtn: TFButton
- CanExpandWidth = True
- Text = 'Check boxes'
- OnClick = CheckboxBtnClick
- end
- object RadioButtonBtn: TFButton
- CanExpandWidth = True
- Text = 'Radio buttons'
- OnClick = RadioButtonBtnClick
- end
- object GroupBoxBtn: TFButton
- CanExpandWidth = True
- Text = 'Group boxes'
- OnClick = GroupBoxBtnClick
- end
- object EditBtn: TFButton
- CanExpandWidth = True
- Text = 'Edit fields'
- OnClick = EditBtnClick
- end
- object ScrollBarBtn: TFButton
- CanExpandWidth = True
- Text = 'Scroll bars'
- OnClick = ScrollBarBtnClick
- end
- object ScrollBoxBtn: TFButton
- CanExpandWidth = True
- Text = 'Scroll boxes'
- OnClick = ScrollBoxBtnClick
- end
- object ListBoxBtn: TFButton
- CanExpandWidth = True
- Text = 'List boxes'
- OnClick = ListBoxBtnClick
- end
- object ComboBoxBtn: TFButton
- CanExpandWidth = True
- Text = 'Combo boxes'
- OnClick = ComboBoxBtnClick
- end
- object GridBtn: TFButton
- CanExpandWidth = True
- Text = 'Grids'
- OnClick = GridBtnClick
- end
- object MenuBtn: TFButton
- CanExpandWidth = True
- Text = 'Menus'
- OnClick = MenuBtnClick
- end
- object PanelBtn: TFButton
- CanExpandWidth = True
- Text = 'Panel'
- OnClick = PanelBtnClick
- end
- object ProgressBarBtn: TFButton
- CanExpandWidth = True
- Text = 'Progress Bar'
- OnClick = ProgressBarBtnClick
- end
- object MemoBtn: TFButton
- CanExpandWidth = True
- Text = 'Memo widget'
- OnClick = MemoBtnClick
- end
- object ShowMessageBtn: TFButton
- CanExpandWidth = True
- Text = 'ShowMessage()'
- OnClick = ShowMessageBtnClick
- end
- object Separator: TSeparator
- end
- object ExitBtn: TFButton
- CanExpandWidth = True
- Text = 'Exit'
- OnClick = ExitBtnClick
- end
- end
-end
diff --git a/examples/gui/widgettest/radiobuttonform.frm b/examples/gui/widgettest/radiobuttonform.frm
deleted file mode 100644
index 97e338c3..00000000
--- a/examples/gui/widgettest/radiobuttonform.frm
+++ /dev/null
@@ -1,33 +0,0 @@
-object RadioButtonForm: TRadioButtonForm
- BorderWidth = 8
- Text = 'Radio button test'
- object Box: TFBoxLayout
- Orientation = Vertical
- object GrayCheckbox: TFCheckbox
- Text = 'Gray radio buttons'
- OnClick = GrayCheckboxClick
- end
- object HorzBox: TFBoxLayout
- object ButtonBox1: TFBoxLayout
- Orientation = Vertical
- object Radio1a: TFRadioButton
- Checked = True
- Text = 'Button 1 a'
- end
- object Radio1b: TFRadioButton
- Text = 'Button 1 b'
- end
- end
- object ButtonBox2: TFBoxLayout
- Orientation = Vertical
- object Radio2a: TFRadioButton
- Text = 'Button 2 a'
- end
- object Radio2b: TFRadioButton
- Checked = True
- Text = 'Button 2 b'
- end
- end
- end
- end
-end
diff --git a/examples/gui/widgettest/scrollbarform.frm b/examples/gui/widgettest/scrollbarform.frm
deleted file mode 100644
index bc820b77..00000000
--- a/examples/gui/widgettest/scrollbarform.frm
+++ /dev/null
@@ -1,175 +0,0 @@
-object ScrollBarForm: TScrollBarForm
- BorderWidth = 8
- Text = 'Scroll bar test'
- object VertBox: TFBoxLayout
- Orientation = Vertical
- object GrayCheckBox: TFCheckBox
- Text = 'Gray everything'
- OnClick = GrayCheckBoxClick
- end
- object HorzBox: TFBoxLayout
- object HorzGrid: TFGridLayout
- ColCount = 3
- RowCount = 6
- ColSpacing = 8
- GridPositions = <
- item
- x = 2
- Widget = Col3Label
- end
- item
- y = 1
- Widget = Label1
- end
- item
- x = 1
- y = 1
- Widget = ScrollBar1
- end
- item
- x = 2
- y = 1
- Widget = PosLabel1
- end
- item
- y = 2
- Widget = Label2
- end
- item
- x = 1
- y = 2
- Widget = ScrollBar2
- end
- item
- x = 2
- y = 2
- Widget = PosLabel2
- end
- item
- y = 3
- Widget = Label3
- end
- item
- x = 1
- y = 3
- Widget = ScrollBar3
- end
- item
- x = 2
- y = 3
- Widget = PosLabel3
- end
- item
- y = 4
- Widget = Label4
- end
- item
- x = 1
- y = 4
- Widget = ScrollBar4
- end
- item
- x = 2
- y = 4
- Widget = PosLabel4
- end
- item
- y = 5
- Widget = Label5
- end
- item
- x = 1
- y = 5
- Widget = ScrollBar5
- end
- item
- x = 2
- y = 5
- Widget = PosLabel5
- end>
- object Col3Label: TFLabel
- Alignment = taCenter
- Text = 'Position'
- end
- object Label1: TFLabel
- Alignment = taRightJustify
- Text = '0..1, PageSize=0:'
- end
- object ScrollBar1: TFScrollBar
- Min = 0
- Max = 1
- OnChange = ScrollBar1Change
- end
- object PosLabel1: TFLabel
- Alignment = taCenter
- Text = '---'
- end
- object Label2: TFLabel
- Alignment = taRightJustify
- Text = '0..1, PageSize=1:'
- end
- object ScrollBar2: TFScrollBar
- Max = 1
- PageSize = 1
- OnChange = ScrollBar2Change
- end
- object PosLabel2: TFLabel
- Alignment = taCenter
- Text = '---'
- end
- object Label3: TFLabel
- Alignment = taRightJustify
- Text = '-2..3, PageSize=0:'
- end
- object ScrollBar3: TFScrollBar
- Min = -2
- Max = 3
- OnChange = ScrollBar3Change
- end
- object PosLabel3: TFLabel
- Alignment = taCenter
- Text = '---'
- end
- object Label4: TFLabel
- Alignment = taRightJustify
- Text = '-5..9, PageSize=4:'
- end
- object ScrollBar4: TFScrollBar
- Min = -5
- Max = 9
- PageSize = 4
- OnChange = ScrollBar4Change
- end
- object PosLabel4: TFLabel
- Alignment = taCenter
- Text = '---'
- end
- object Label5: TFLabel
- Alignment = taRightJustify
- Text = '-100..200, PageSize=7:'
- end
- object ScrollBar5: TFScrollBar
- Min = -100
- Max = 200
- PageSize = 7
- OnChange = ScrollBar5Change
- end
- object PosLabel5: TFLabel
- Alignment = taCenter
- Text = '---'
- end
- end
- object VertBar: TSeparator
- Orientation = Vertical
- end
- object VerTFLabel: TFLabel
- Text = 'Vertical:'
- end
- object VertScrollBar: TFScrollBar
- Orientation = Vertical
- Min = -2
- Max = 3
- end
- end
- end
-end
diff --git a/examples/gui/widgettest/scrollboxform.frm b/examples/gui/widgettest/scrollboxform.frm
deleted file mode 100644
index b83d47a1..00000000
--- a/examples/gui/widgettest/scrollboxform.frm
+++ /dev/null
@@ -1,14 +0,0 @@
-object ScrollBoxForm: TScrollBoxForm
- BorderWidth = 8
- Text = 'Scroll box test'
- WindowOptions = [woWindow]
- object VertLayout: TFBoxLayout
- Orientation = Vertical
- object Label1: TFLabel
- CanExpandWidth = True
- Text = 'ScrollBox should be transparent in this demo.'
- end
- object ScrollBox: TFScrollBox
- end
- end
-end
diff --git a/examples/gui/widgettest/widgettest.lpi b/examples/gui/widgettest/widgettest.lpi
deleted file mode 100644
index 6f4700f4..00000000
--- a/examples/gui/widgettest/widgettest.lpi
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="5"/>
- <General>
- <Flags>
- <SaveOnlyProjectUnits Value="True"/>
- <AlwaysBuild Value="False"/>
- </Flags>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=""/>
- </General>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="fpguipackage"/>
- <MinVersion Minor="3" Valid="True"/>
- </Item1>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="widgettest.pas"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="WidgetTest"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <Parsing>
- <SyntaxOptions>
- <IncludeAssertionCode Value="True"/>
- <AllowLabel Value="False"/>
- </SyntaxOptions>
- </Parsing>
- <Other>
- <CustomOptions Value="-FUunits -dTraceEventsX -dDebugX
-"/>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/gui/widgettest/widgettest.pas b/examples/gui/widgettest/widgettest.pas
deleted file mode 100644
index 22a70a89..00000000
--- a/examples/gui/widgettest/widgettest.pas
+++ /dev/null
@@ -1,887 +0,0 @@
-program WidgetTest;
-
-uses
- SysUtils
- ,Classes
- ,fpGFX
- ,fpGUI
- ;
-
-type
-
- // forward declarations
- TCheckboxForm = class;
- TRadioButtonForm = class;
- TGroupBoxForm = class;
- TEditForm = class;
- TScrollBarForm = class;
- TScrollBoxForm = class;
- TListBoxForm = class;
- TComboBoxForm = class;
- TGridForm = class;
- TMenuForm = class;
- TPanelForm = class;
- TProgressBarForm = class;
- TMemoForm = class;
-
- { TMainForm }
-
- TMainForm = class(TFForm)
- private
- _frmCheckBox: TCheckboxForm;
- _frmRadioButton: TRadioButtonForm;
- _frmGroupBox: TGroupBoxForm;
- _frmEdit: TEditForm;
- _frmScrollBar: TScrollBarForm;
- _frmScrollBox: TScrollBoxForm;
- _frmListBox: TListBoxForm;
- _frmComboBox: TComboBoxForm;
- _frmGrid: TGridForm;
- _frmMenu: TMenuForm;
- _frmPanel: TPanelForm;
- _frmProgressBar: TProgressBarForm;
- _frmMemo: TMemoForm;
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- Box: TFBoxLayout;
- Title: TFLabel;
- CheckboxBtn: TFButton;
- RadioButtonBtn: TFButton;
- GroupBoxBtn: TFButton;
- EditBtn: TFButton;
- ScrollBarBtn: TFButton;
- ScrollBoxBtn: TFButton;
- ListBoxBtn: TFButton;
- ComboBoxBtn: TFButton;
- GridBtn: TFButton;
- MenuBtn: TFButton;
- PanelBtn: TFButton;
- ProgressBarBtn: TFButton;
- MemoBtn: TFButton;
- ShowMessageBtn: TFButton;
- Separator: TSeparator;
- ExitBtn: TFButton;
- procedure CheckBoxBtnClick(Sender: TObject);
- procedure RadioButtonBtnClick(Sender: TObject);
- procedure GroupBoxBtnClick(Sender: TObject);
- procedure EditBtnClick(Sender: TObject);
- procedure ScrollBarBtnClick(Sender: TObject);
- procedure ScrollBoxBtnClick(Sender: TObject);
- procedure ListBoxBtnClick(Sender: TObject);
- procedure ComboBoxBtnClick(Sender: TObject);
- procedure GridBtnClick(Sender: TObject);
- procedure ExitBtnClick(Sender: TObject);
- procedure MenuBtnClick(Sender: TObject);
- procedure PanelBtnClick(Sender: TObject);
- procedure ProgressBarBtnClick(Sender: TObject);
- procedure MemoBtnClick(Sender: TObject);
- procedure ShowMessageBtnClick(Sender: TObject);
- end;
-
-
- TTestForm = class(TFForm)
- end;
-
-
- TCheckboxForm = class(TTestForm)
- Box: TFBoxLayout;
- GrayCheckBox, CheckBox1, CheckBox2: TFCheckbox;
- procedure GrayCheckBoxClick(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TRadioButtonForm = class(TTestForm)
- Box, HorzBox, ButtonBox1, ButtonBox2: TFBoxLayout;
- GrayCheckBox: TFCheckbox;
- Radio1a, Radio1b, Radio2a, Radio2b: TFRadioButton;
- procedure GrayCheckBoxClick(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TGroupBoxForm = class(TTestForm)
- HorzBox, VertBox1, VertBox2: TFBoxLayout;
- GroupBox1, GroupBox2: TFGroupBox;
- GrayCheckBox: TFCheckbox;
- Button: TFButton;
- Radio1, Radio2, Radio3, Radio4, Radio5: TFRadioButton;
- procedure GrayCheckBoxClick(Sender: TObject);
- procedure ButtonClick(Sender: TObject);
- procedure RadioButtonClick(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- { TEditForm }
-
- TEditForm = class(TTestForm)
- published
- Grid: TFGridLayout;
- VertBox, HorzBox1, HorzBox2: TFBoxLayout;
- Label1, Label2, PasswordDisplay: TFLabel;
- Edit1, Edit2: TFEdit;
- GrayCheckBox1, GrayCheckBox2: TFCheckbox;
- Separator: TSeparator;
- cbBorderStyle: TFButton;
- procedure GrayCheckBox1Click(Sender: TObject);
- procedure GrayCheckBox2Click(Sender: TObject);
- procedure cbBorderStyleClick(Sender: TObject);
- procedure Edit2Change(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TScrollBarForm = class(TTestForm)
- VertLayout: TFBoxLayout;
- GrayCheckBox: TFCheckbox;
- HorzBox: TFBoxLayout;
- HorzGrid, VertGrid: TFGridLayout;
- VertBar: TSeparator;
- VerTFLabel, Label1, Label2, Label3, Label4, Label5: TFLabel;
- PosLabel1, PosLabel2, PosLabel3, PosLabel4, PosLabel5: TFLabel;
- VerTFScrollBar, ScrollBar1, ScrollBar2, ScrollBar3,
- ScrollBar4, ScrollBar5: TFScrollBar;
- procedure GrayCheckBoxClick(Sender: TObject);
- procedure ScrollBar1Change(Sender: TObject);
- procedure ScrollBar2Change(Sender: TObject);
- procedure ScrollBar3Change(Sender: TObject);
- procedure ScrollBar4Change(Sender: TObject);
- procedure ScrollBar5Change(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TScrollBoxForm = class(TTestForm)
- VertLayout: TFBoxLayout;
- Label1: TFLabel;
- ScrollBox: TFScrollBox;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TListBoxForm = class(TTestForm)
- ListBox: TFListBox;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TComboBoxForm = class(TTestForm)
- published
- VertLayout: TFBoxLayout;
- GrayCheckBox: TFCheckbox;
- BetaLabel: TFLabel;
- ComboBox1: TFComboBox;
- ComboBox2: TFComboBox;
- procedure GrayCheckBoxClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- TGridForm = class(TTestForm)
- StringGrid: TFStringGrid;
- procedure FormCreate(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-
- { TMenuForm }
-
- TMenuForm = class(TTestForm)
- private
- procedure CloseMenuClicked(Sender: TObject);
- procedure AboutMenuClicked(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- published
- BoxLayout: TFBoxLayout;
- MainMenu: TFMenuBar;
- Title: TFLabel;
- p1, p2, p3, p4, p5, p6: TFPanel;
- MenuBox: TFBoxLayout;
- Separator: TSeparator;
- end;
-
-
- TPanelForm = class(TTestForm)
- private
- procedure RadioButtonClick(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- MainLayout: TFBoxLayout;
- StyleGroup: TFGroupBox;
- rbPlain, rbLowered, rbRaised: TFRadioButton;
- VBox1: TFBoxLayout;
- Panel: TFPanel;
- Separator: TSeparator;
- end;
-
-
- TProgressBarForm = class(TTestForm)
- private
- procedure cbShowPercentClick(Sender: TObject);
- procedure RadioButtonClick(Sender: TObject);
- procedure GeneratePercentage(Sender: TObject);
- public
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- published
- MainLayout: TFGridLayout;
- VBox: TFBoxLayout;
- PB: TFProgressBar;
- cbShowPercent: TFCheckbox;
- gbColor: TFGroupBox;
- rbBlue: TFRadioButton;
- rbRed: TFRadioButton;
- rbGreen: TFRadioButton;
- Separator: TSeparator;
- btnRandom: TFButton;
- end;
-
-
- { TMemoForm }
-
- TMemoForm = class(TTestForm)
- private
- BoxLayout: TFBoxLayout;
- Memo: TFMemo;
- lblTitle: TFLabel;
- public
- constructor Create(AOwner: TComponent); override;
- end;
-
-{ TMemoForm }
-
-constructor TMemoForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Name := 'MemoForm';
- Text := 'Memo Test';
- BorderWidth := 8;
-
- BoxLayout := TFBoxLayout.Create(self);
- BoxLayout.Orientation := Vertical;
- self.InsertChild(BoxLayout);
-
- lblTitle := TFLabel.Create('Work in progress! No mouse or cursor support yet.', self);
- lblTitle.FontColor := clBlue;
- lblTitle.CanExpandWidth := True;
- BoxLayout.InsertChild(lblTitle);
-
- Memo := TFMemo.Create(self);
- BoxLayout.InsertChild(Memo);
-
- Memo.Lines.Text :=
- 'constructor TMemoForm.Create(AOwner: TComponent); ' + #10 +
- 'begin ' + #10 +
- ' inherited Create(AOwner); ' + #10 +
- ' Name := ''MemoForm''; ' + #10 +
- ' Text := ''Memo Test''; ' + #10 +
- ' BorderWidth := 8; ' + #10 +
- ' ' + #10 +
- ' BoxLayout := TFBoxLayout.Create(self); ' + #10 +
- ' BoxLayout.Orientation := Vertical; ' + #10 +
- ' self.InsertChild(BoxLayout); ' + #10 +
- ' ' + #10 +
- ' lblTitle := TFLabel.Create(''Work in progress!'', self); ' + #10 +
- ' lblTitle.FontColor := clBlue; ' + #10 +
- ' lblTitle.CanExpandWidth := True; ' + #10 +
- ' BoxLayout.InsertChild(lblTitle); ' + #10 +
- ' ' + #10 +
- ' Memo := TFMemo.Create(self); ' + #10 +
- ' BoxLayout.InsertChild(Memo); ';
-end;
-
-
-{ TListBoxForm }
-
-constructor TListBoxForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-{ TScrollBoxForm }
-
-constructor TScrollBoxForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-{ TMenuForm }
-
-procedure TMenuForm.CloseMenuClicked(Sender: TObject);
-begin
- writeln('...Close menu clicked');
- Close;
-end;
-
-procedure TMenuForm.AboutMenuClicked(Sender: TObject);
-begin
- writeln(' About menu clicked from <' + Sender.ClassName + '>');
- if Sender is TFMenuItem then
- writeln(' from: ' + TFMenuItem(Sender).Text);
-end;
-
-constructor TMenuForm.Create(AOwner: TComponent);
-var
- lMenuItem: TFMenuItem;
-begin
- inherited Create(AOwner);
- Name := 'MenuForm';
- Text := 'Menu Test';
-
- BoxLayout := TFBoxLayout.Create(self);
- BoxLayout.Orientation := Vertical;
-
- MainMenu := TFMenuBar.Create(self);
- BoxLayout.InsertChild(MainMenu);
-
- MainMenu.AddMenu('Close', 'C', @CloseMenuClicked);
-// MainMenu.AddMenu('File');
- MainMenu.AddMenu('Edit');
- MainMenu.AddMenu('Options');
- MainMenu.AddMenu('Windows');
- lMenuItem := MainMenu.AddMenu('Help');
- lMenuItem.SubMenu.AddMenu('Online Help');
- lMenuItem.SubMenu.AddMenu('Tutorials');
- lMenuItem.SubMenu.AddMenu('About', '', @AboutMenuClicked);
-
- Separator := TSeparator.Create(self);
- BoxLayout.InsertChild(Separator);
-
- Title := TFLabel.Create(self);
- Title.CanExpandWidth := True;
- Title.Alignment := taCenter;
- Title.Text := 'This is work in progress...';
- Title.FontColor := clBlue;
- BoxLayout.InsertChild(Title);
-
- Child := BoxLayout;
-end;
-
-
-{ TPanelForm }
-
-procedure TPanelForm.RadioButtonClick(Sender: TObject);
-begin
- case TFRadioButton(Sender).Tag of
- 1: Panel.BevelStyle := bsPlain;
- 2: Panel.BevelStyle := bsLowered;
- 3: Panel.BevelStyle := bsRaised;
- end;
-end;
-
-constructor TPanelForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Name := 'PanelForm';
- Text := 'Panel Test';
- BorderWidth := 8;
-
- MainLayout := TFBoxLayout.Create(self);
- MainLayout.Orientation := Vertical;
-
- StyleGroup := TFGroupBox.Create('Bevel Style:', self);
- StyleGroup.CanExpandWidth := True;
- MainLayout.InsertChild(StyleGroup);
-
- VBox1 := TFBoxLayout.Create(self);
- VBox1.Orientation := Vertical;
- StyleGroup.InsertChild(VBox1);
-
- rbPlain := TFRadioButton.Create('Plain', self);
- rbPlain.Tag := 1;
- rbPlain.OnClick := @RadioButtonClick;
- rbLowered := TFRadioButton.Create('Lowered', self);
- rbLowered.Tag := 2;
- rbLowered.OnClick := @RadioButtonClick;
- rbRaised := TFRadioButton.Create('Raised', self);
- rbRaised.Tag := 3;
- rbRaised.OnClick := @RadioButtonClick;
- rbRaised.Checked := True;
- VBox1.InsertChild(rbPlain);
- VBox1.InsertChild(rbLowered);
- VBox1.InsertChild(rbRaised);
-
- Separator := TSeparator.Create(self);
- MainLayout.InsertChild(Separator);
-
- Panel := TFPanel.Create('My Panel', self);
- MainLayout.InsertChild(Panel);
-
- Child := MainLayout;
-end;
-
-destructor TPanelForm.Destroy;
-begin
- inherited Destroy;
-end;
-
-
-{ TProgressBarForm }
-
-procedure TProgressBarForm.cbShowPercentClick(Sender: TObject);
-begin
- PB.ShowPercentage := cbShowPercent.Checked;
-end;
-
-procedure TProgressBarForm.RadioButtonClick(Sender: TObject);
-begin
- case TFRadioButton(Sender).Tag of
- 1: PB.FillColor := clRed;
- 2: PB.FillColor := clGreen;
- 3: PB.FillColor := clBlue;
- end;
-end;
-
-procedure TProgressBarForm.GeneratePercentage(Sender: TObject);
-begin
- PB.Position := Random(100);
-end;
-
-constructor TProgressBarForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- Text := 'Progress Bar Demo';
- BorderWidth := 8;
-
- MainLayout := TFGridLayout.Create(self);
- MainLayout.RowCount := 4;
- MainLayout.ColCount := 2;
-
- VBox := TFBoxLayout.Create(self);
- VBox.Orientation := Vertical;
-
- gbColor := TFGroupBox.Create('Fill Color', self);
- rbRed := TFRadioButton.Create('Red', self);
- rbRed.Tag := 1;
- rbRed.OnClick := @RadioButtonClick;
- rbRed.Checked := True;
-
- rbGreen := TFRadioButton.Create('Green', self);
- rbGreen.Tag := 2;
- rbGreen.OnClick := @RadioButtonClick;
-
- rbBlue := TFRadioButton.Create('Blue', self);
- rbBlue.Tag := 3;
- rbBlue.OnClick := @RadioButtonClick;
-
- VBox.InsertChild(rbRed);
- VBox.InsertChild(rbGreen);
- VBox.InsertChild(rbBlue);
- gbColor.InsertChild(VBox);
- MainLayout.AddWidget(gbColor, 0, 0, 1, 2);
-
- cbShowPercent := TFCheckbox.Create('Show Percentage', self);
- cbShowPercent.Checked := True;
- cbShowPercent.OnClick := @cbShowPercentClick;
- cbShowPercent.CanExpandWidth := True;
- MainLayout.AddWidget(cbShowPercent, 1, 0, 1, 1);
-
- btnRandom := TFButton.Create('Randomize', self);
- btnRandom.OnClick := @GeneratePercentage;
- MainLayout.AddWidget(btnRandom, 1, 1, 1, 1);
-
- Separator := TSeparator.Create(self);
- MainLayout.AddWidget(Separator, 0, 2, 2, 1);
-
- PB := TFProgressBar.Create('', self);
- PB.Position := 75;
- MainLayout.AddWidget(PB, 0, 3, 2, 1);
-
- Child := MainLayout;
-end;
-
-destructor TProgressBarForm.Destroy;
-begin
- inherited Destroy;
-end;
-
-
-// -------------------------------------------------------------------
-// TMainForm
-// -------------------------------------------------------------------
-
-constructor TMainForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-destructor TMainForm.Destroy;
-begin
- _frmCheckBox.Free;
- _frmRadioButton.Free;
- _frmGroupBox.Free;
- _frmEdit.Free;
- _frmScrollBar.Free;
- _frmScrollBox.Free;
- _frmListBox.Free;
- _frmComboBox.Free;
- _frmGrid.Free;
- _frmMenu.Free;
- _frmPanel.Free;
- _frmProgressBar.Free;
- _frmMemo.Free;
- inherited Destroy;
-end;
-
-
-procedure TMainForm.CheckBoxBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmCheckBox) then
- _frmCheckBox := TCheckboxForm.Create(self);
- _frmCheckBox.Show;
-end;
-
-
-procedure TMainForm.RadioButtonBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmRadioButton) then
- _frmRadioButton := TRadioButtonForm.Create(self);
- _frmRadioButton.Show;
-end;
-
-
-procedure TMainForm.GroupBoxBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmGroupBox) then
- _frmGroupBox := TGroupBoxForm.Create(self);
- _frmGroupBox.Show;
-end;
-
-
-procedure TMainForm.EditBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmEdit) then
- _frmEdit := TEditForm.Create(self);
- _frmEdit.Show;
-end;
-
-
-procedure TMainForm.ScrollBarBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmScrollBar) then
- _frmScrollBar := TScrollBarForm.Create(self);
- _frmScrollBar.Show;
-end;
-
-
-procedure TMainForm.ScrollBoxBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmScrollBox) then
- _frmScrollBox := TScrollBoxForm.Create(self);
- _frmScrollBox.Show;
-end;
-
-
-procedure TMainForm.ListBoxBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmListBox) then
- _frmListBox := TListBoxForm.Create(self);
- _frmListBox.Show;
-end;
-
-
-procedure TMainForm.ComboBoxBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmComboBox) then
- _frmComboBox := TComboBoxForm.Create(self);
- _frmComboBox.Show;
-end;
-
-
-procedure TMainForm.GridBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmGrid) then
- _frmGrid := TGridForm.Create(self);
- _frmGrid.Show;
-end;
-
-
-procedure TMainForm.ExitBtnClick(Sender: TObject);
-begin
- Close;
-end;
-
-
-procedure TMainForm.MenuBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmMenu) then
- _frmMenu := TMenuForm.Create(self);
- _frmMenu.Show;
- _frmMenu.SetPosition(Point(Left + Width + 5, FindForm.Top));
-end;
-
-procedure TMainForm.PanelBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmPanel) then
- _frmPanel := TPanelForm.Create(self);
- _frmPanel.ShowModal;
-// _frmPanel.SetPosition(Point(Left + Width + 5, FindForm.Top));
-end;
-
-procedure TMainForm.ProgressBarBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmProgressBar) then
- _frmProgressBar := TProgressBarForm.Create(self);
- _frmProgressBar.Show;
- _frmProgressBar.SetPosition(Point(Left + Width + 5, FindForm.Top));
-end;
-
-procedure TMainForm.MemoBtnClick(Sender: TObject);
-begin
- if not Assigned(_frmMemo) then
- _frmMemo := TMemoForm.Create(self);
- _frmMemo.Show;
- _frmMemo.SetPosition(Point(Left + Width + 5, FindForm.Top));
-end;
-
-procedure TMainForm.ShowMessageBtnClick(Sender: TObject);
-begin
- ShowMessage('Hello World!');
-end;
-
-
-// -------------------------------------------------------------------
-// TCheckboxForm
-// -------------------------------------------------------------------
-
-procedure TCheckboxForm.GrayCheckBoxClick(Sender: TObject);
-begin
- CheckBox1.Enabled := not GrayCheckBox.Checked;
- CheckBox2.Enabled := not GrayCheckBox.Checked;
-end;
-
-constructor TCheckboxForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-// -------------------------------------------------------------------
-// TRadioButtonForm
-// -------------------------------------------------------------------
-
-procedure TRadioButtonForm.GrayCheckBoxClick(Sender: TObject);
-begin
- HorzBox.Enabled := not GrayCheckBox.Checked;
-end;
-
-constructor TRadioButtonForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-// -------------------------------------------------------------------
-// TGroupBoxForm
-// -------------------------------------------------------------------
-
-procedure TGroupBoxForm.GrayCheckBoxClick(Sender: TObject);
-begin
- GroupBox2.Enabled := not GrayCheckBox.Checked;
-end;
-
-
-procedure TGroupBoxForm.ButtonClick(Sender: TObject);
-begin
- Radio1.Checked := True;
- Button.Enabled := False;
-end;
-
-
-procedure TGroupBoxForm.RadioButtonClick(Sender: TObject);
-begin
- Button.Enabled := not Radio1.Checked;
-end;
-
-constructor TGroupBoxForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-// -------------------------------------------------------------------
-// TEditForm
-// -------------------------------------------------------------------
-
-procedure TEditForm.GrayCheckBox1Click(Sender: TObject);
-begin
- Edit1.Enabled := not GrayCheckBox1.Checked;
-end;
-
-
-procedure TEditForm.GrayCheckBox2Click(Sender: TObject);
-begin
-// Edit2.Enabled := not GrayCheckBox2.Checked;
- if GrayCheckBox2.Checked then
- Edit2.PasswordChar := #0
- else
- Edit2.PasswordChar := '*';
-end;
-
-procedure TEditForm.cbBorderStyleClick(Sender: TObject);
-begin
-// SaveForm(self);
- if Edit1.BorderStyle = bsNone then
- begin
- Edit1.BorderStyle := bsSingle;
- Edit2.BorderStyle := bsSingle;
- end
- else
- begin
- Edit1.BorderStyle := bsNone;
- Edit2.BorderStyle := bsNone;
- end;
-end;
-
-
-procedure TEditForm.Edit2Change(Sender: TObject);
-begin
-// PasswordDisplay.Text := '(= ' + Edit2.Text + ')';
-end;
-
-constructor TEditForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
- Edit1.Text := 'Gráficas Magnificacion! Teste';
- Edit2.Text := 'Gráficas';
- Edit2.PasswordChar := '*';
-end;
-
-
-// -------------------------------------------------------------------
-// TScrollBarForm
-// -------------------------------------------------------------------
-
-procedure TScrollBarForm.GrayCheckBoxClick(Sender: TObject);
-begin
- HorzBox.Enabled := not GrayCheckBox.Checked;
-end;
-
-
-procedure TScrollBarForm.ScrollBar1Change(Sender: TObject);
-begin
- PosLabel1.Text := IntToStr(ScrollBar1.Position);
-end;
-
-
-procedure TScrollBarForm.ScrollBar2Change(Sender: TObject);
-begin
- PosLabel2.Text := IntToStr(ScrollBar2.Position);
-end;
-
-
-procedure TScrollBarForm.ScrollBar3Change(Sender: TObject);
-begin
- PosLabel3.Text := IntToStr(ScrollBar3.Position);
-end;
-
-
-procedure TScrollBarForm.ScrollBar4Change(Sender: TObject);
-begin
- PosLabel4.Text := IntToStr(ScrollBar4.Position);
-end;
-
-
-procedure TScrollBarForm.ScrollBar5Change(Sender: TObject);
-begin
- PosLabel5.Text := IntToStr(ScrollBar5.Position);
-end;
-
-constructor TScrollBarForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-// -------------------------------------------------------------------
-// TComboBoxForm
-// -------------------------------------------------------------------
-
-procedure TComboBoxForm.GrayCheckBoxClick(Sender: TObject);
-begin
- ComboBox1.Enabled := not GrayCheckBox.Checked;
- ComboBox2.Enabled := not GrayCheckBox.Checked;
-end;
-
-
-procedure TComboBoxForm.FormCreate(Sender: TObject);
-var
- i: integer;
-begin
- for i := 1 to 20 do
- begin
- ComboBox1.Items.Add(Format('Item 1.%d...', [i]));
- ComboBox2.Items.Add(Format('Item 2.%d...', [i]));
- end;
- ComboBox2.Items.Add('A long item that should cause a horizontal scrollbar to appear.');
- BetaLabel.FontColor := clBlue;
-end;
-
-constructor TComboBoxForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-// -------------------------------------------------------------------
-// TGridForm
-// -------------------------------------------------------------------
-
-procedure TGridForm.FormCreate(Sender: TObject);
-var
- x, y: Integer;
-begin
- for y := 0 to StringGrid.RowCount - 1 do
- for x := 0 to StringGrid.ColCount - 1 do
- StringGrid.Cells[x, y] := Format('%d, %d', [x, y]);
-
- StringGrid.Cells[3, 3] := 'This is one long piece of text';
-end;
-
-constructor TGridForm.Create(AOwner: TComponent);
-begin
- inherited Create(AOwner);
- LoadForm(self);
-end;
-
-
-var
- MainForm: TMainForm;
-begin
- WriteLn('Version: ' + {$I %date%} + ' ' + {$I %time%});
- GFApplication.Initialize;
-
- MainForm := TMainForm.Create(GFApplication);
- try
- MainForm.Show;
- GFApplication.Run;
- finally
- MainForm.Free;
- end;
-end.
diff --git a/examples/img/Makefile b/examples/img/Makefile
deleted file mode 100644
index e799dc0f..00000000
--- a/examples/img/Makefile
+++ /dev/null
@@ -1,1313 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2001/01/01]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT or OS/2)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-# define inOS2 when running under OS/2
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-PWD:=$(firstword $(PWD))
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The extension of batch files / scripts
-ifdef inUnix
-BATCHEXT=.sh
-else
-ifdef inOS2
-BATCHEXT=.cmd
-else
-BATCHEXT=.bat
-endif
-endif
-
-# Path Separator, the subst trick is necessary for the \ that can't exists
-# at the end of a line
-ifdef inUnix
-PATHSEP=/
-else
-PATHSEP=$(subst /,\,/)
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override DIROBJECTS+=$(wildcard disp_bmp masktest)
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-PPAS=ppas$(BATCHEXT)
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all $(addsuffix _all,$(DIROBJECTS))
-
-debug: fpc_debug $(addsuffix _debug,$(DIROBJECTS))
-
-smart: fpc_smart $(addsuffix _smart,$(DIROBJECTS))
-
-shared: fpc_shared $(addsuffix _shared,$(DIROBJECTS))
-
-showinstall: fpc_showinstall $(addsuffix _showinstall,$(DIROBJECTS))
-
-install: fpc_install $(addsuffix _install,$(DIROBJECTS))
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean $(addsuffix _clean,$(DIROBJECTS))
-
-distclean: fpc_distclean $(addsuffix _distclean,$(DIROBJECTS))
-
-cleanall: fpc_cleanall $(addsuffix _cleanall,$(DIROBJECTS))
-
-require: $(addsuffix _require,$(DIROBJECTS))
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall require info
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-PACKAGESUFFIX=emx
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-# Use a wrapper script by default for OS/2
-ifdef inOS2
-USEZIPWRAPPER=1
-endif
-
-# Create commands to create the zip/tar file
-ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT)
-ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
-ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
-ifdef USETAR
-ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
-else
-ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
- $(DEL) $(ZIPDESTFILE)
-ifdef USEZIPWRAPPER
-ifneq ($(ECHO),echo)
- $(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
- $(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
- $(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
-else
- $(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
- $(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
- $(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
-endif
-ifdef inUnix
- /bin/sh $(ZIPWRAPPER)
-else
- $(ZIPWRAPPER)
-endif
- $(DEL) $(ZIPWRAPPER)
-else
- $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Directories
-#####################################################################
-
-OBJECTDIRDISP_BMP=1
-OBJECTDIRMASKTEST=1
-
-# Dir disp_bmp
-
-ifdef OBJECTDIRDISP_BMP
-.PHONY: disp_bmp_all disp_bmp_debug disp_bmp_examples disp_bmp_test disp_bmp_smart disp_bmp_shared disp_bmp_showinstall disp_bmp_install disp_bmp_sourceinstall disp_bmp_exampleinstall disp_bmp_zipinstall disp_bmp_zipsourceinstall disp_bmp_zipexampleinstall disp_bmp_clean disp_bmp_distclean disp_bmp_cleanall disp_bmp_require disp_bmp_info
-
-disp_bmp_all:
- $(MAKE) -C disp_bmp all
-
-disp_bmp_debug:
- $(MAKE) -C disp_bmp debug
-
-disp_bmp_examples:
- $(MAKE) -C disp_bmp examples
-
-disp_bmp_test:
- $(MAKE) -C disp_bmp test
-
-disp_bmp_smart:
- $(MAKE) -C disp_bmp smart
-
-disp_bmp_shared:
- $(MAKE) -C disp_bmp shared
-
-disp_bmp_showinstall:
- $(MAKE) -C disp_bmp showinstall
-
-disp_bmp_install:
- $(MAKE) -C disp_bmp install
-
-disp_bmp_sourceinstall:
- $(MAKE) -C disp_bmp sourceinstall
-
-disp_bmp_exampleinstall:
- $(MAKE) -C disp_bmp exampleinstall
-
-disp_bmp_zipinstall:
- $(MAKE) -C disp_bmp zipinstall
-
-disp_bmp_zipsourceinstall:
- $(MAKE) -C disp_bmp zipsourceinstall
-
-disp_bmp_zipexampleinstall:
- $(MAKE) -C disp_bmp zipexampleinstall
-
-disp_bmp_clean:
- $(MAKE) -C disp_bmp clean
-
-disp_bmp_distclean:
- $(MAKE) -C disp_bmp distclean
-
-disp_bmp_cleanall:
- $(MAKE) -C disp_bmp cleanall
-
-disp_bmp_require:
- $(MAKE) -C disp_bmp require
-
-disp_bmp_info:
- $(MAKE) -C disp_bmp info
-endif
-
-# Dir masktest
-
-ifdef OBJECTDIRMASKTEST
-.PHONY: masktest_all masktest_debug masktest_examples masktest_test masktest_smart masktest_shared masktest_showinstall masktest_install masktest_sourceinstall masktest_exampleinstall masktest_zipinstall masktest_zipsourceinstall masktest_zipexampleinstall masktest_clean masktest_distclean masktest_cleanall masktest_require masktest_info
-
-masktest_all:
- $(MAKE) -C masktest all
-
-masktest_debug:
- $(MAKE) -C masktest debug
-
-masktest_examples:
- $(MAKE) -C masktest examples
-
-masktest_test:
- $(MAKE) -C masktest test
-
-masktest_smart:
- $(MAKE) -C masktest smart
-
-masktest_shared:
- $(MAKE) -C masktest shared
-
-masktest_showinstall:
- $(MAKE) -C masktest showinstall
-
-masktest_install:
- $(MAKE) -C masktest install
-
-masktest_sourceinstall:
- $(MAKE) -C masktest sourceinstall
-
-masktest_exampleinstall:
- $(MAKE) -C masktest exampleinstall
-
-masktest_zipinstall:
- $(MAKE) -C masktest zipinstall
-
-masktest_zipsourceinstall:
- $(MAKE) -C masktest zipsourceinstall
-
-masktest_zipexampleinstall:
- $(MAKE) -C masktest zipexampleinstall
-
-masktest_clean:
- $(MAKE) -C masktest clean
-
-masktest_distclean:
- $(MAKE) -C masktest distclean
-
-masktest_cleanall:
- $(MAKE) -C masktest cleanall
-
-masktest_require:
- $(MAKE) -C masktest require
-
-masktest_info:
- $(MAKE) -C masktest info
-endif
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/img/Makefile.fpc b/examples/img/Makefile.fpc
deleted file mode 100644
index 9eb71ba2..00000000
--- a/examples/img/Makefile.fpc
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Makefile.fpc for fpImg examples
-#
-
-[targets]
-dirs=disp_bmp masktest
diff --git a/examples/img/disp_bmp/Makefile b/examples/img/disp_bmp/Makefile
deleted file mode 100644
index 688f1238..00000000
--- a/examples/img/disp_bmp/Makefile
+++ /dev/null
@@ -1,1306 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/12/19]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT or OS/2)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-# define inOS2 when running under OS/2
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-PWD:=$(firstword $(PWD))
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Default FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR=../../../../fpc
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=disp_bmp
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-override NEEDUNITDIR=../../src
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inUnix
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-PACKAGESUFFIX=emx
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
- cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
- $(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
- cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/img/disp_bmp/Makefile.fpc b/examples/img/disp_bmp/Makefile.fpc
deleted file mode 100644
index a4b5ccbb..00000000
--- a/examples/img/disp_bmp/Makefile.fpc
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Makefile.fpc for fpImg example "disp_bmp"
-#
-
-[targets]
-programs=disp_bmp
-
-[require]
-options=-S2h
-packages=fcl fpgfx
-
-[dirs]
-fpcdir=../../../../fpc
-unitdir=../../src
diff --git a/examples/img/disp_bmp/disp_bmp.pas b/examples/img/disp_bmp/disp_bmp.pas
deleted file mode 100644
index 5f581195..00000000
--- a/examples/img/disp_bmp/disp_bmp.pas
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- fpGUI - Free Pascal GUI Library
-
- Example: Display BMP file using the fpImg - Free Pascal Imaging Library
-
- Copyright (C) 2000 - 2007 See the file AUTHORS.txt, included in this
- distribution, for details of the copyright.
-
- See the file COPYING.modifiedLGPL, included in this distribution,
- for details about redistributing fpGUI.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-}
-
-
-program Disp_BMP;
-
-{$ifdef fpc}
- {$mode objfpc}{$H+}
-{$endif}
-
-uses
- Classes
- ,fpgfx
- ,gfxbase
- ,fpImg
- ,BMPReader
- ;
-
-type
- TMainForm = class(TFWindow)
- private
- Image: TFBitmap;
- public
- constructor Create; overload;
- destructor Destroy; override;
- procedure Paint(Sender: TObject; const Rect: TRect);
- end;
-
-constructor TMainForm.Create;
-begin
- inherited Create(nil, [woWindow]);
- Title := 'fpImg Bitmap Test';
- OnPaint := @Paint;
- Image := CreateImageFromFile(GFScreen, TBMPReader, ParamStr(1));
- SetClientSize(Size(Image.Width, Image.Height));
-end;
-
-destructor TMainForm.Destroy;
-begin
- Image.Free;
- inherited Destroy;
-end;
-
-procedure TMainForm.Paint(Sender: TObject; const Rect: TRect);
-begin
- // debug only
- Canvas.SetColor(colRed);
- Canvas.FillRect(Rect);
- Canvas.SetColor(colYellow);
- // paint image
- Canvas.DrawImage(Image, Point(0, 0));
-end;
-
-var
- MainForm: TMainForm;
-begin
- if ParamCount <> 1 then
- begin
- WriteLn(StdErr, 'Please give the name of a BMP file as argument');
- Halt(2);
- end;
-
- GFApplication.Initialize;
- MainForm := TMainForm.Create;
- MainForm.Show;
- GFApplication.Run;
-end.
-
diff --git a/examples/img/disp_bmp/test2.bmp b/examples/img/disp_bmp/test2.bmp
deleted file mode 100644
index 13d6323e..00000000
--- a/examples/img/disp_bmp/test2.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/disp_bmp/test24.bmp b/examples/img/disp_bmp/test24.bmp
deleted file mode 100644
index bda7377d..00000000
--- a/examples/img/disp_bmp/test24.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/disp_bmp/test4.bmp b/examples/img/disp_bmp/test4.bmp
deleted file mode 100644
index 4fd4a9db..00000000
--- a/examples/img/disp_bmp/test4.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/disp_bmp/test8.bmp b/examples/img/disp_bmp/test8.bmp
deleted file mode 100644
index 47fc32e6..00000000
--- a/examples/img/disp_bmp/test8.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/masktest/Makefile b/examples/img/masktest/Makefile
deleted file mode 100644
index 4ce21577..00000000
--- a/examples/img/masktest/Makefile
+++ /dev/null
@@ -1,1347 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2001/01/01]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT or OS/2)
-# define inUnix when running under Unix (Linux,FreeBSD)
-# define inWinNT when running under WinNT
-# define inOS2 when running under OS/2
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
- @echo You need the GNU utils package to use this Makefile!
- @echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
- @exit
-else
-inUnix=1
-PWD:=$(firstword $(PWD))
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-else
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inUnix
-SRCEXEEXT=
-else
-SRCEXEEXT=.exe
-endif
-
-# The extension of batch files / scripts
-ifdef inUnix
-BATCHEXT=.sh
-else
-ifdef inOS2
-BATCHEXT=.cmd
-else
-BATCHEXT=.bat
-endif
-endif
-
-# Path Separator, the subst trick is necessary for the \ that can't exists
-# at the end of a line
-ifdef inUnix
-PATHSEP=/
-else
-PATHSEP=$(subst /,\,/)
-endif
-
-# The path which is searched separated by spaces
-ifdef inUnix
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-FPC=ppc386
-endif
-endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Default FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR=../../../../fpc
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inUnix
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=masktest
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-override NEEDOPT=-S2h
-
-# Directories
-
-override NEEDUNITDIR=../../src
-
-# Packages
-
-override PACKAGES+=rtl fcl fpgfx
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inUnix
-INSTALL:=install -c -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inUnix
-INSTALLEXE:=install -c -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inUnix
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-PPAS=ppas$(BATCHEXT)
-
-# ldconfig to rebuild .so cache
-ifdef inUnix
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-EXEEXT=.exe
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.lnx
-endif
-
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-PACKAGEFPGFX=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
- $(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
- $(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-ifdef PACKAGEFPGFX
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx),)
-ifneq ($(wildcard $(PACKAGESDIR)/fpgfx/$(OS_TARGET)),)
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx/$(OS_TARGET)
-else
-PACKAGEDIR_FPGFX=$(PACKAGESDIR)/fpgfx
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FPGFX)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fpgfx
-package_fpgfx:
- $(MAKE) -C $(PACKAGEDIR_FPGFX) all
-endif
-UNITDIR_FPGFX=$(PACKAGEDIR_FPGFX)
-else
-PACKAGEDIR_FPGFX=
-ifneq ($(wildcard $(UNITSDIR)/fpgfx),)
-ifneq ($(wildcard $(UNITSDIR)/fpgfx/$(OS_TARGET)),)
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx/$(OS_TARGET)
-else
-UNITDIR_FPGFX=$(UNITSDIR)/fpgfx
-endif
-else
-UNITDIR_FPGFX=
-endif
-endif
-ifdef UNITDIR_FPGFX
-override NEEDUNITDIR+=$(UNITDIR_FPGFX)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-# When zipping use the target as default, when normal install then
-# use the source os as default
-ifdef ZIPNAME
-# Zipinstall
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-else
-# Normal install
-ifeq ($(OS_SOURCE),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_SOURCE),freebsd)
-UNIXINSTALLDIR=1
-endif
-endif
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inUnix
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY: all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
- @$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
- $(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(PPUEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pp
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-%$(EXEEXT): %.pas
- $(COMPILER) $< $(REDIR)
- $(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
- $(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef HASSHAREDLIB
-ifndef LIBNAME
- @$(ECHO) "LIBNAME not set"
-else
- $(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
- @$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
- @$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
- @$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
- @$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- @$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
- $(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
- -$(UPXPROG) $(INSTALLEXEFILES)
-endif
- $(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
- $(MKDIR) $(UNITINSTALLDIR)
- $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
- $(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
- $(MKDIR) $(LIBINSTALLDIR)
- $(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
- ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
- $(MKDIR) $(DATAINSTALLDIR)
- $(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
- $(MKDIR) $(SOURCEINSTALLDIR)
- $(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
- $(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
- $(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
- $(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-PACKAGESUFFIX=emx
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inUnix
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inUnix
-USETAR=1
-endif
-endif
-
-# Use a wrapper script by default for OS/2
-ifdef inOS2
-USEZIPWRAPPER=1
-endif
-
-# Create commands to create the zip/tar file
-ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT)
-ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
-ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
-ifdef USETAR
-ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
-else
-ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
- @$(ECHO) "Please specify ZIPNAME!"
- @exit 1
-else
- $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
- $(DEL) $(ZIPDESTFILE)
-ifdef USEZIPWRAPPER
-ifneq ($(ECHO),echo)
- $(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
- $(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
- $(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
-else
- $(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
- $(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
- $(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
-endif
-ifdef inUnix
- /bin/sh $(ZIPWRAPPER)
-else
- $(ZIPWRAPPER)
-endif
- $(DEL) $(ZIPWRAPPER)
-else
- $(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
-endif
- $(DELTREE) $(PACKDIR)
-endif
-
-.PHONY: fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY: fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
- $(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXEFILES
-override CLEANEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
-ifdef CLEANPPUFILES
- -$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
- -$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
- -$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
- -$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
- -$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
- -$(DEL) $(CLEANEXEFILES)
-endif
- -$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
- -$(DELTREE) *$(SMARTEXT)
- -$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
- fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
- @$(ECHO)
- @$(ECHO) == Configuration info ==
- @$(ECHO)
- @$(ECHO) FPC....... $(FPC)
- @$(ECHO) Version... $(FPC_VERSION)
- @$(ECHO) CPU....... $(CPU_TARGET)
- @$(ECHO) Source.... $(OS_SOURCE)
- @$(ECHO) Target.... $(OS_TARGET)
- @$(ECHO)
-
-fpc_infoobjects:
- @$(ECHO)
- @$(ECHO) == Object info ==
- @$(ECHO)
- @$(ECHO) LoaderObjects..... $(LOADEROBJECTS)
- @$(ECHO) UnitObjects....... $(UNITOBJECTS)
- @$(ECHO) ExeObjects........ $(EXEOBJECTS)
- @$(ECHO)
- @$(ECHO) ExtraCleanUnits... $(EXTRACLEANUNITS)
- @$(ECHO) ExtraCleanFiles... $(EXTRACLEANFILES)
- @$(ECHO)
- @$(ECHO) ExtraInstallUnits. $(EXTRAINSTALLUNITS)
- @$(ECHO) ExtraInstallFiles. $(EXTRAINSTALLFILES)
- @$(ECHO)
-
-fpc_infoinstall:
- @$(ECHO)
- @$(ECHO) == Install info ==
- @$(ECHO)
-ifdef DATE
- @$(ECHO) DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
- @$(ECHO) PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
- @$(ECHO) PackageName.......... $(PACKAGENAME)
-endif
- @$(ECHO) PackageSuffix........ $(PACKAGESUFFIX)
- @$(ECHO)
- @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
- @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
- @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
- @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
- @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
- @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
- @$(ECHO) DataInstallDir....... $(DATAINSTALLDIR)
- @$(ECHO)
- @$(ECHO) DestZipDir........... $(DESTZIPDIR)
- @$(ECHO) ZipName.............. $(ZIPNAME)
- @$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
diff --git a/examples/img/masktest/Makefile.fpc b/examples/img/masktest/Makefile.fpc
deleted file mode 100644
index 5151e7a3..00000000
--- a/examples/img/masktest/Makefile.fpc
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# Makefile.fpc for fpImg example "masktest"
-#
-
-[targets]
-programs=masktest
-
-[require]
-options=-S2h
-packages=fcl fpgfx
-
-[dirs]
-fpcdir=../../../../fpc
-unitdir=../../src
diff --git a/examples/img/masktest/image2.bmp b/examples/img/masktest/image2.bmp
deleted file mode 100644
index 8e08ff44..00000000
--- a/examples/img/masktest/image2.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/masktest/image24.bmp b/examples/img/masktest/image24.bmp
deleted file mode 100644
index 8c4f248d..00000000
--- a/examples/img/masktest/image24.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/masktest/image4.bmp b/examples/img/masktest/image4.bmp
deleted file mode 100644
index c57697ba..00000000
--- a/examples/img/masktest/image4.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/masktest/image8.bmp b/examples/img/masktest/image8.bmp
deleted file mode 100644
index 85d08b9f..00000000
--- a/examples/img/masktest/image8.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/masktest/mask.bmp b/examples/img/masktest/mask.bmp
deleted file mode 100644
index 7cc016e5..00000000
--- a/examples/img/masktest/mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/img/masktest/masktest.lpi b/examples/img/masktest/masktest.lpi
deleted file mode 100644
index e250102f..00000000
--- a/examples/img/masktest/masktest.lpi
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="/"/>
- <Version Value="5"/>
- <General>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <IconPath Value="./"/>
- <TargetFileExt Value=".exe"/>
- </General>
- <VersionInfo>
- <ProjectVersion Value=""/>
- </VersionInfo>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <RequiredPackages Count="2">
- <Item1>
- <PackageName Value="fpimgpackage"/>
- </Item1>
- <Item2>
- <PackageName Value="fpGFXPackage"/>
- </Item2>
- </RequiredPackages>
- <Units Count="1">
- <Unit0>
- <Filename Value="masktest.pas"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="MaskTest"/>
- </Unit0>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="5"/>
- <CodeGeneration>
- <Generate Value="Faster"/>
- </CodeGeneration>
- <Other>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
-</CONFIG>
diff --git a/examples/img/masktest/masktest.pas b/examples/img/masktest/masktest.pas
deleted file mode 100644
index d9db3e6a..00000000
--- a/examples/img/masktest/masktest.pas
+++ /dev/null
@@ -1,131 +0,0 @@
-{
- fpGUI - Free Pascal GUI Library
-
- Example: Display BMP file with monochrome mask
-
- Copyright (C) 2000 - 2007 See the file AUTHORS.txt, included in this
- distribution, for details of the copyright.
-
- See the file COPYING.modifiedLGPL, included in this distribution,
- for details about redistributing fpGUI.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-}
-
-program MaskTest;
-
-{$ifdef fpc}
- {$mode objfpc}{$H+}
-{$endif}
-
-uses
- Classes, GFXBase, fpGFX, fpImg, BMPReader;
-
-type
- TMainWindow = class(TFWindow)
- private
- Image2, Image4, Image8, Image24, Mask: TFBitmap;
- Image2Canvas, Image4Canvas, Image8Canvas,
- Image24Canvas, MaskCanvas: TFCanvas;
- protected
- procedure Paint(Sender: TObject; const ARect: TRect);
- public
- constructor Create; overload;
- destructor Destroy; override;
- end;
-
-constructor TMainWindow.Create;
-begin
- inherited Create(nil, [woWindow]);
-
- // Load and prepare the images
- Image2 := CreateImageFromFile(GFScreen, TBMPReader, 'image2.bmp');
- Image2Canvas := TFCanvas(GFScreen.CreateBitmapCanvas(Image2.Width, Image2.Height));
- Image2Canvas.DrawImage(Image2, Point(0, 0));
-
- Image4 := CreateImageFromFile(GFScreen, TBMPReader, 'image4.bmp');
- Image4Canvas := TFCanvas(GFScreen.CreateBitmapCanvas(Image4.Width, Image4.Height));
- Image4Canvas.DrawImage(Image4, Point(0, 0));
-
- Image8 := CreateImageFromFile(GFScreen, TBMPReader, 'image8.bmp');
- Image8Canvas := TFCanvas(GFScreen.CreateBitmapCanvas(Image8.Width, Image8.Height));
- Image8Canvas.DrawImage(Image8, Point(0, 0));
-
- Image24 := CreateImageFromFile(GFScreen, TBMPReader, 'image24.bmp');
- Image24Canvas := TFCanvas(GFScreen.CreateBitmapCanvas(Image24.Width, Image24.Height));
- Image24Canvas.DrawImage(Image24, Point(0, 0));
-
- // Load and prepare the image mask
- Mask := CreateImageFromFile(GFScreen, TBMPReader, 'mask.bmp');
- MaskCanvas := TFCanvas(GFScreen.CreateMonoBitmapCanvas(Mask.Width, Mask.Height));
-// MaskCanvas := Display.DefaultScreen.CreateMonoBitmap(Mask.Width, Mask.Height);
- MaskCanvas.DrawImage(Mask, Point(0, 0));
-
- Title := 'fpImg Blitting Mask Test';
- OnPaint := @Paint;
- SetClientSize(Size(Image2.Width * 2 + 64, Image2.Height * 2 + 64));
-end;
-
-destructor TMainWindow.Destroy;
-begin
- MaskCanvas.Free;
- Mask.Free;
- Image24Canvas.Free;
- Image24.Free;
- Image8Canvas.Free;
- Image8.Free;
- Image4Canvas.Free;
- Image4.Free;
- Image2Canvas.Free;
- Image2.Free;
- inherited Destroy;
-end;
-
-procedure TMainWindow.Paint(Sender: TObject; const ARect: TRect);
-var
- Color: TGfxColor;
- r: TRect;
- i, x1, y1, x2, y2: Integer;
-begin
- Color.Red := 0;
- Color.Green := 0;
- Color.Alpha := 0;
- r.Left := ARect.Left;
- r.Right := ARect.Right;
- for i := ARect.Top to ARect.Bottom - 1 do
- begin
- Color.Blue := $ffff - (i * $ffff) div Height;
- Color.Red := Color.Blue shr 1;
- Canvas.SetColor(Color);
- r.Top := i;
- r.Bottom := i + 1;
- Canvas.FillRect(r);
- end;
-
- x1 := ClientWidth div 4 - Image2.Width div 2;
- y1 := ClientHeight div 4 - Image2.Height div 2;
- x2 := x1 + ClientWidth div 2;
- y2 := y1 + ClientHeight div 2;
-
- Canvas.SetColor(colWhite);
- Canvas.MaskedCopy(Image2Canvas, MaskCanvas, Point(x1, y1));
- Canvas.TextOut(Point(x1, y1 + Image2.Height), 'monochrome');
- Canvas.MaskedCopy(Image4Canvas, MaskCanvas, Point(x2, y1));
- Canvas.TextOut(Point(x2, y1 + Image2.Height), '4bpp palettized');
- Canvas.MaskedCopy(Image8Canvas, MaskCanvas, Point(x1, y2));
- Canvas.TextOut(Point(x1, y2 + Image2.Height), '8bpp palettized');
- Canvas.MaskedCopy(Image24Canvas, MaskCanvas, Point(x2, y2));
- Canvas.TextOut(Point(x2, y2 + Image2.Height), '24bpp true color');
-end;
-
-var
- MainWindow: TMainWindow;
-begin
- GFApplication.Initialize;
- MainWindow := TMainWindow.Create;
- MainWindow.Show;
- GFApplication.Run;
-end.
-