]>
Commit | Line | Data |
---|---|---|
84481f76 RK |
1 | ------------------------------------------------------------------------------ |
2 | -- -- | |
3 | -- GNAT COMPILER COMPONENTS -- | |
4 | -- -- | |
5 | -- M D L L -- | |
6 | -- -- | |
7 | -- S p e c -- | |
8 | -- -- | |
1d005acc | 9 | -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- |
84481f76 RK |
10 | -- -- |
11 | -- GNAT is free software; you can redistribute it and/or modify it under -- | |
12 | -- terms of the GNU General Public License as published by the Free Soft- -- | |
b5c84c3c | 13 | -- ware Foundation; either version 3, or (at your option) any later ver- -- |
84481f76 RK |
14 | -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
15 | -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- | |
16 | -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- | |
17 | -- for more details. You should have received a copy of the GNU General -- | |
b5c84c3c RD |
18 | -- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
19 | -- http://www.gnu.org/licenses for a complete copy of the license. -- | |
84481f76 RK |
20 | -- -- |
21 | -- GNAT was originally developed by the GNAT team at New York University. -- | |
71ff80dc | 22 | -- Extensive contributions were provided by Ada Core Technologies Inc. -- |
84481f76 RK |
23 | -- -- |
24 | ------------------------------------------------------------------------------ | |
25 | ||
26 | -- This package provides the core high level routines used by GNATDLL | |
27 | -- to build Windows DLL | |
28 | ||
29 | with GNAT.OS_Lib; | |
c885d7a1 | 30 | -- Should have USE here ??? |
84481f76 RK |
31 | |
32 | package MDLL is | |
33 | ||
34 | subtype Argument_List is GNAT.OS_Lib.Argument_List; | |
35 | subtype Argument_List_Access is GNAT.OS_Lib.Argument_List_Access; | |
36 | ||
37 | Null_Argument_List : constant Argument_List := (1 .. 0 => new String'("")); | |
38 | ||
c885d7a1 AC |
39 | Null_Argument_List_Access : Argument_List_Access := |
40 | new Argument_List (1 .. 0); | |
84481f76 | 41 | |
c885d7a1 | 42 | Tools_Error : exception; |
dec55d76 | 43 | -- Comment required |
84481f76 | 44 | |
c885d7a1 AC |
45 | Verbose : Boolean := False; |
46 | Quiet : Boolean := False; | |
47 | -- Comment required ??? | |
84481f76 | 48 | |
c885d7a1 | 49 | Kill_Suffix : Boolean := False; |
84481f76 RK |
50 | -- Kill_Suffix is used by dlltool to know whether or not the @nn suffix |
51 | -- should be removed from the exported names. When Kill_Suffix is set to | |
52 | -- True then dlltool -k option is used. | |
53 | ||
5e257178 PO |
54 | procedure Build_Dynamic_Library |
55 | (Ofiles : Argument_List; | |
56 | Afiles : Argument_List; | |
57 | Options : Argument_List; | |
58 | Bargs_Options : Argument_List; | |
59 | Largs_Options : Argument_List; | |
60 | Lib_Filename : String; | |
61 | Def_Filename : String; | |
62 | Lib_Address : String := ""; | |
63 | Build_Import : Boolean := False; | |
c885d7a1 AC |
64 | Relocatable : Boolean := False; |
65 | Map_File : Boolean := False); | |
5e257178 | 66 | -- Build a DLL and the import library to link against the DLL. |
84481f76 RK |
67 | -- this function handles relocatable and non relocatable DLL. |
68 | -- If the Afiles argument list contains some Ada units then it will | |
69 | -- generate the right adainit and adafinal and integrate it in the DLL. | |
70 | -- If the Afiles argument list is empty (there is only some object files | |
71 | -- provided) then it will not try to build a binder file. This is ok to | |
c885d7a1 AC |
72 | -- build DLL containing no Ada code. If Map_File is set to True, a map |
73 | -- file named Lib_Filename & ".map" will be created. | |
84481f76 | 74 | |
5e257178 PO |
75 | procedure Build_Import_Library |
76 | (Lib_Filename : String; | |
77 | Def_Filename : String); | |
84481f76 RK |
78 | -- Build an import library (.a) from a definition files. An import library |
79 | -- is needed to link against a DLL. | |
80 | ||
81 | end MDLL; |