OSDN Git Service

Delete all lines containing "$Revision:".
[pf3gnuchains/gcc-fork.git] / gcc / ada / mlib-tgt.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             M L I B . T G T                              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                                                                          --
10 --              Copyright (C) 2001, Ada Core Technologies, Inc.             --
11 --                                                                          --
12 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
13 -- terms of the  GNU General Public License as published  by the Free Soft- --
14 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
15 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
18 -- for  more details.  You should have  received  a copy of the GNU General --
19 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
20 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
21 -- MA 02111-1307, USA.                                                      --
22 --                                                                          --
23 -- GNAT was originally developed  by the GNAT team at  New York University. --
24 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
25 --                                                                          --
26 ------------------------------------------------------------------------------
27
28 --  This package provides a set of target dependent routines to build
29 --  static, dynamic and shared libraries.
30
31 --  There are several versions for the body of this package.
32
33 --  In the default version, libraries are not supported, so function
34 --  Libraries_Are_Supported returns False.
35
36 with GNAT.OS_Lib; use GNAT.OS_Lib;
37 with Types;       use Types;
38
39 package MLib.Tgt is
40
41    function Libraries_Are_Supported return Boolean;
42    --  Indicates if building libraries by gnatmake and gnatmlib
43    --  are supported by the GNAT implementation for the OS.
44
45    function Default_DLL_Address return String;
46    --  default address for non relocatable DLL
47
48    function Dynamic_Option return String;
49    --  gcc option to create a dynamic library
50
51    function Base_Option return String;
52
53    function Libgnat return String;
54    --  System dependent static GNAT library
55
56    function Archive_Ext return  String;
57    --  System dependent static library extension
58
59    function Object_Ext return String;
60    --  System dependent object extension
61
62    function DLL_Ext return String;
63    --  System dependent dynamic library extension
64
65    function PIC_Option return String;
66    --  Position independent code option
67
68    function Is_Object_Ext (Ext : String) return Boolean;
69    --  Returns True iff Ext is an object file extension
70
71    function Is_C_Ext (Ext : String) return Boolean;
72    --  Returns True iff Ext is a C file extension.
73
74    function Is_Archive_Ext (Ext : String) return Boolean;
75    --  Returns True iff Ext is an extension for a library
76
77    procedure Copy_ALI_Files
78      (From : Name_Id;
79       To   : Name_Id);
80    --  Copy all ALI files from directory From to directory To
81
82    function Linker_Library_Path_Option
83      (Directory : String)
84       return      String_Access;
85    --  Linker option to specify the library directory path
86
87    procedure Build_Dynamic_Library
88      (Ofiles       : Argument_List;
89       Foreign      : Argument_List;
90       Afiles       : Argument_List;
91       Options      : Argument_List;
92       Lib_Filename : String;
93       Lib_Dir      : String;
94       Lib_Address  : String  := "";
95       Lib_Version  : String  := "";
96       Relocatable  : Boolean := False);
97    --  Build a dynamic/relocatable library
98
99 end MLib.Tgt;