Rombobjörn

summaryrefslogtreecommitdiff
path: root/build_system_log.gpr
diff options
context:
space:
mode:
Diffstat (limited to 'build_system_log.gpr')
-rw-r--r--build_system_log.gpr28
1 files changed, 19 insertions, 9 deletions
diff --git a/build_system_log.gpr b/build_system_log.gpr
index b907fd5..ff2af50 100644
--- a/build_system_log.gpr
+++ b/build_system_log.gpr
@@ -10,19 +10,29 @@ with "comfignat.gpr";
library project Build_System_Log is
+ for Library_Name use "adasyslog";
+ for Library_Kind use Comfignat.Library_Type;
+ for Object_Dir use Comfignat.Objdir;
+ for Library_Src_Dir use Comfignat.Stage_Includedir & "/adasyslog";
+ for Library_Dir use Comfignat.Stage_Libdir;
+ for Library_ALI_Dir use Comfignat.Stage_Alidir & "/adasyslog";
+
+ -- When building a shared library we want Library_Interface to make the
+ -- library elaborate itself automatically. For a static library we need to
+ -- avoid Library_Interface so that GNAT will automatically make a using
+ -- program handle elaboration of the library.
+ -- Library_Version sets the soname, which only shared libraries have.
-- An attempt to use a two-part version number at the end of the soname
-- caused Gnatmake and GPRbuild to include only the major version number,
-- so for compatibility the soname is libadasyslog.so.1 until an ABI change
-- is made, if that ever happens.
-
- for Library_Name use "adasyslog";
- for Library_Kind use "dynamic";
- for Library_Version use "libadasyslog.so.1";
- for Library_Interface use ("System_Log");
- for Object_Dir use Comfignat.Objdir;
- for Library_Src_Dir use Comfignat.Stage_Includedir & "/adasyslog";
- for Library_Dir use Comfignat.Stage_Libdir;
- for Library_ALI_Dir use Comfignat.Stage_Alidir & "/adasyslog";
+ case Comfignat.Library_Type is
+ when "dynamic" | "relocatable" =>
+ for Library_Version use "libadasyslog.so.1";
+ for Library_Interface use ("System_Log");
+ when "static" =>
+ null;
+ end case;
package Compiler is
for Default_Switches ("Ada") use ("-gnato");