diff options
| author | Björn Persson <bjorn@rombobjörn.se> | 2013-02-13 23:17:52 +0100 | 
|---|---|---|
| committer | Björn Persson <bjorn@rombobjörn.se> | 2013-02-13 23:17:52 +0100 | 
| commit | 4766a7a7a2f23ee10560e1a2a177eec8931d974a (patch) | |
| tree | 5380090b964906e3317b930b43ce38bd60f5e0cf /build_milter_api.gpr.in | |
| parent | b5565b3dc55003122b0ffdc211d03446971ff12a (diff) | |
Added a convenient and flexible build system.
Diffstat (limited to 'build_milter_api.gpr.in')
| -rw-r--r-- | build_milter_api.gpr.in | 47 | 
1 files changed, 47 insertions, 0 deletions
| diff --git a/build_milter_api.gpr.in b/build_milter_api.gpr.in new file mode 100644 index 0000000..dfa8334 --- /dev/null +++ b/build_milter_api.gpr.in @@ -0,0 +1,47 @@ +-- project file to compile the Ada Milter API into a shared library +-- Copyright 2009 - 2013 B. Persson, Bjorn@Rombobeorn.se +-- +-- This project file is free software: you can redistribute it and/or modify it +-- under the terms of the GNU General Public License version 3, as published +-- by the Free Software Foundation. + + +with "comfignat.gpr"; +with "system_log.gpr"; + +library project Build_Milter_API is + +   Version := "1.2.1"; + +   for Library_Name      use "adamilter"; +   for Library_Kind      use "dynamic"; +   for Library_Version   use "libadamilter.so." & Version; +   for Languages         use ("Ada", "C"); +   for Library_Interface use ("Milter_API", "Berkeley_Exit_Codes"); +   for Object_Dir        use Comfignat.Objdir; +   for Library_Src_Dir   use Comfignat.Stage_Includedir & "/adamilter"; +   for Library_Dir       use Comfignat.Stage_Libdir; +   for Library_ALI_Dir   use Comfignat.Stage_Libdir & "/adamilter"; + +   package Compiler is +      for Default_Switches ("Ada") use ("-gnato"); +   end Compiler; + +   -- Ensure that the shared library will be initialized. GPRbuild 2010 doesn't +   -- pass -a automatically. (Fixed in GPRbuild 2012.) +   package Binder is +      for Default_Switches ("Ada") use ("-a"); +   end Binder; + +   -- libadamilter shall link to libmilter. +   for Library_Options use ("-lmilter"); + +   #if Wrap_Threads then +      package Linker is +         -- When the test milter links to libadamilter it shall link to +         -- libadamilter_thread_wrapper and libdl too. +         for Linker_Options use ("-ladamilter_thread_wrapper", "-ldl"); +      end Linker; +   #end if; + +end Build_Milter_API; |