1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
27 ------------------------------------------------------------------------------
29 -- This package provides the core high level routines used by GNATDLL
30 -- to build Windows DLL
36 subtype Argument_List is GNAT.OS_Lib.Argument_List;
37 subtype Argument_List_Access is GNAT.OS_Lib.Argument_List_Access;
39 Null_Argument_List : constant Argument_List := (1 .. 0 => new String'(""));
41 Null_Argument_List_Access : Argument_List_Access
42 := new Argument_List (1 .. 0);
44 Tools_Error : exception;
46 Verbose : Boolean := False;
47 Quiet : Boolean := False;
49 -- Kill_Suffix is used by dlltool to know whether or not the @nn suffix
50 -- should be removed from the exported names. When Kill_Suffix is set to
51 -- True then dlltool -k option is used.
53 Kill_Suffix : Boolean := False;
55 procedure Build_Dynamic_Library (Ofiles : in Argument_List;
56 Afiles : in Argument_List;
57 Options : in Argument_List;
58 Bargs_Options : in Argument_List;
59 Largs_Options : in Argument_List;
60 Lib_Filename : in String;
61 Def_Filename : in String;
62 Lib_Address : in String := "";
63 Build_Import : in Boolean := False;
64 Relocatable : in Boolean := False);
65 -- build a DLL and the import library to link against the DLL.
66 -- this function handles relocatable and non relocatable DLL.
67 -- If the Afiles argument list contains some Ada units then it will
68 -- generate the right adainit and adafinal and integrate it in the DLL.
69 -- If the Afiles argument list is empty (there is only some object files
70 -- provided) then it will not try to build a binder file. This is ok to
71 -- build DLL containing no Ada code.
73 procedure Build_Import_Library (Lib_Filename : in String;
74 Def_Filename : in String);
75 -- Build an import library (.a) from a definition files. An import library
76 -- is needed to link against a DLL.