From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: GNAT Project Files?
Date: Sun, 26 Jun 2005 15:24:27 +0200
Date: 2005-06-26T15:24:27+02:00 [thread overview]
Message-ID: <87d5q9b69g.fsf@insalien.org> (raw)
In-Reply-To: uslz5y2ez.fsf@obry.net
Pascal Obry writes:
> Jacob Sparre Andersen writes:
>
>> -----
>> with "/usr/share/ada/adainclude/xmlada.gpr";
>> project AWS is
>> for Source_Dirs use ("/usr/share/ada/adainclude/aws");
>> for Object_Dir use "/usr/lib/ada/adalib/aws";
>> Ada_Switches := "-laws";
>> package Linker is
>> for Default_Switches ("Ada") use (Ada_Switches);
>> end Linker;
>> end AWS;
>> -----
>
> This project is not a library project and not a project file coming
> from the AWS project. So with this project you need to pass the
> library option to the linker yourself. Please have a look at the
> Library Project file and how this is handled in AWS. AWS has also
> Library Project to support external libraries like the one for
> OpenSSL. Which such an achitecture you just need to add into your
> own project file:
>
> with "aws";
>
> And that's all. If you want SSL support you can use :
>
> with "aws_ssl";
>
> Pascal.
Pascal, you are correct. The project file that I supply as part of
libaws (2.0p) is not a library project file. The reason for this is
that GNAT 3.15p does not support library project files. Hence, Jacob
needs to specify a linker option in his project file, like so:
with "/usr/share/ada/adainclude/aws";
with "/usr/share/ada/adainclude/charles";
with "/home/sparre/Ada/Pakker/Strenge/string_arrays";
with "/home/sparre/Ada/Programmer/CGI/Ordlisten/get_random_words";
project Test_Word_Buffer is
for Object_Dir use ".";
for Exec_Dir use ".";
for Main use ("test_word_buffer");
package Linker is
for Default_Switches ("Ada") use
(AWS.Ada_Switches, Charles.Ada_Switches,
-- linker switches from String_Arrays and Get_Random_Words
);
end Linker;
end Test_Word_Buffer;
This is explained in the comments in aws.gpr, which Jacob mistakenly
omitted to read, it seems:
-- Ada Web Server project file for use with GNAT 3.15p
-- Copyright (c) 2004 Ludovic Brenta <ludovic.brenta@insalien.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- This project file is designed to help build applications that use
-- Ada Web Server. Here is an example of how to use this project file:
--
-- with "/usr/share/ada/adainclude/aws";
-- project Example is
-- for Object_Dir use "obj";
-- for Exec_Dir use ".";
-- for Main use ("example");
-- package Linker renames AWS.Linker;
-- -- Alternatively, if you need additional switches:
-- -- package Linker is
-- -- for Default_Switches ("Ada") use (AWS.Ada_Switches & ...)
-- -- end Linker;
-- end Example;
with "/usr/share/ada/adainclude/xmlada.gpr";
project AWS is
for Source_Dirs use ("/usr/share/ada/adainclude/aws");
for Object_Dir use "/usr/lib/ada/adalib/aws";
Ada_Switches := "-laws";
package Linker is
for Default_Switches ("Ada") use (Ada_Switches);
end Linker;
end AWS;
This is also explained in the Debian Policy for Ada:
http://www.ada-france.org/debian/debian-ada-policy.html
--
Ludovic Brenta.
next prev parent reply other threads:[~2005-06-26 13:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-25 16:11 GNAT Project Files? Jacob Sparre Andersen
2005-06-25 18:14 ` Stephen Leake
2005-06-25 18:53 ` Jacob Sparre Andersen
2005-06-25 20:53 ` Pascal Obry
2005-06-26 0:08 ` Stephen Leake
2005-06-26 7:55 ` Pascal Obry
2005-06-26 13:00 ` Stephen Leake
2005-06-26 0:22 ` Jacob Sparre Andersen
2005-06-26 7:59 ` Pascal Obry
2005-06-26 13:24 ` Ludovic Brenta [this message]
2005-06-26 19:40 ` Pascal Obry
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox