-- --
-- S p e c --
-- --
--- Copyright (C) 2001-2007, AdaCore --
+-- Copyright (C) 2001-2009, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
+-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
+-- Public License distributed with GNAT; see file COPYING3. If not, go to --
+-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
--- This package provides a set of target dependent routines to build
--- static, dynamic and shared libraries.
-
--- There are several versions for the body of this package
-
--- In the default version, libraries are not supported, so function
--- Support_For_Libraries return None.
+-- This package provides a set of target dependent routines to build static,
+-- dynamic and shared libraries. There are several packages providing
+-- the actual routines. This package calls them indirectly by means of
+-- access-to-subprogram values. Each target-dependent package initializes
+-- these values in its elaboration block.
with Prj; use Prj;
-- "libtoto.so" will be a symbolic link to "libtoto.so.2.1" which
-- will be the actual library file.
--
- -- Symbol_Data is used for some patforms, including VMS, to generate
+ -- Symbol_Data is used for some platforms, including VMS, to generate
-- the symbols to be exported by the library.
--
-- Note: Depending on the OS, some of the parameters may not be taken into
-- are ignored.
function Library_Exists_For
- (Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean;
+ (Project : Project_Id;
+ In_Tree : Project_Tree_Ref) return Boolean;
-- Return True if the library file for a library project already exists.
-- This function can only be called for library projects.
function Library_Major_Minor_Id_Supported return Boolean;
-- Indicates if major and minor ids are supported for libraries.
-- If they are supported, then a Library_Version such as libtoto.so.1.2
- -- will have a major id of 1 and a minor id of 2. Then litoto.so,
+ -- will have a major id of 1 and a minor id of 2. Then libtoto.so,
-- libtoto.so.1 and libtoto.so.1.2 will be created, all three designating
-- the same file.
type Is_Ext_Function is access function (Ext : String) return Boolean;
type String_List_Access_Function is access function
return String_List_Access;
+
type Build_Dynamic_Library_Function is access procedure
(Ofiles : Argument_List;
Options : Argument_List;
Driver_Name : Name_Id := No_Name;
Lib_Version : String := "";
Auto_Init : Boolean := False);
+
type Library_Exists_For_Function is access function
- (Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean;
+ (Project : Project_Id;
+ In_Tree : Project_Tree_Ref) return Boolean;
+
type Library_File_Name_For_Function is access function
(Project : Project_Id;
In_Tree : Project_Tree_Ref) return File_Name_Type;
+
type Boolean_Function is access function return Boolean;
type Library_Support_Function is access function return Library_Support;
Libgnat_Ptr : String_Function := Libgnat_Default'Access;
function Library_Exists_For_Default
- (Project : Project_Id; In_Tree : Project_Tree_Ref) return Boolean;
+ (Project : Project_Id;
+ In_Tree : Project_Tree_Ref) return Boolean;
Library_Exists_For_Ptr : Library_Exists_For_Function :=
Library_Exists_For_Default'Access;