source: trunk/Compiler/Modules/GCC/ModuleGCC.pas

Last change on this file was 77, checked in by chronos, 6 months ago
  • Modified: Compiler targets moved into modules.
File size: 884 bytes
Line 
1unit ModuleGCC;
2
3interface
4
5uses
6 Classes, SysUtils, ModularSystem, ProducerGCC, TargetGCC, CompilerAPI;
7
8type
9
10 { TModuleGCC }
11
12 TModuleGCC = class(TModule)
13 public
14 Target: TTargetGCC;
15 constructor Create(AOwner: TComponent); override;
16 destructor Destroy; override;
17 procedure DoInstall; override;
18 procedure DoUninstall; override;
19 end;
20
21
22implementation
23
24resourcestring
25 SGCC = 'GCC';
26
27{ TModuleGCC }
28
29constructor TModuleGCC.Create;
30begin
31 inherited;
32 Identification := 'GCC';
33 Title := SGCC;
34end;
35
36destructor TModuleGCC.Destroy;
37begin
38 inherited;
39end;
40
41procedure TModuleGCC.DoInstall;
42begin
43 Target := TTargetGCC.Create;
44 with TCompilerAPI(API) do begin
45 RegisterTarget(TTargetGCC);
46 end;
47 inherited;
48end;
49
50procedure TModuleGCC.DoUninstall;
51begin
52 with TCompilerAPI(API) do begin
53 UnregisterTarget(TTargetGCC);
54 end;
55 inherited;
56end;
57
58end.
59
Note: See TracBrowser for help on using the repository browser.