File: polyorb_common.gpr

package info (click to toggle)
polyorb 2.11~20140418-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,012 kB
  • ctags: 465
  • sloc: ada: 273,015; sh: 4,507; makefile: 4,265; python: 1,332; cpp: 1,213; java: 507; ansic: 274; xml: 30; perl: 23; exp: 6
file content (101 lines) | stat: -rw-r--r-- 4,639 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
------------------------------------------------------------------------------
--                                                                          --
--                           POLYORB COMPONENTS                             --
--                                                                          --
--                       P O L Y O R B _ C O M M O N                        --
--                                                                          --
--                                 P r o j                                  --
--                                                                          --
--         Copyright (C) 2007-2011, Free Software Foundation, Inc.          --
--                                                                          --
-- PolyORB is free software; you  can  redistribute  it and/or modify it    --
-- under terms of the  GNU General Public License as published by the  Free --
-- Software Foundation;  either version 2,  or (at your option)  any  later --
-- version. PolyORB is distributed  in the hope that it will be  useful,    --
-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
-- TABILITY 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 PolyORB; see file COPYING. If    --
-- not, write to the Free Software Foundation, 51 Franklin Street, Fifth    --
-- Floor, Boston, MA 02111-1301, USA.                                       --
--                                                                          --
--                                                                          --
--                  PolyORB is maintained by AdaCore                        --
--                     (email: sales@adacore.com)                           --
--                                                                          --
------------------------------------------------------------------------------

with "polyorb_config";
project PolyORB_Common is

   --  This project is imported by all the polyorb project files.

   type Build_Type is ("PRODUCTION", "DEBUG");
   Build : Build_Type := external ("Build", "PRODUCTION");

   type Library_Type_Type is ("relocatable", "static");
   Library_Type : Library_Type_Type := external ("LIBRARY_TYPE", "static");
   --  adding hardening options
   Ldlibs := External_As_List ("LDLIBS", " ");
   case Library_Type is
      when "relocatable" =>
         For Library_Options use External_As_List ("LDFLAGS", " ") & Ldlibs;
      when "static" =>
         null;
   end case;

   Libversion := external ("Libversion", "3");

   Warnings_Mode := external ("Warnings_Mode", "e");
   --  Possible values:
   --    e: treat warnings as errors, default
   --    n: normal warnings processing
   --    s: suppress all warnings

   for Source_Files use ();

   Build_Dir := PolyORB_Config.Top_Build_Dir & "/" & Library_Type & "/";
   --  Used to set source, object, and ALI dirs of importing projects

   Source_Dir := PolyORB_Config.Top_Source_Dir;
   --  Used to set source dir of importing projects

   Cfg_Pragmas_Switch := "-gnatec=" & Build_Dir & "src/config.adc";

   package Compiler is

      Base_Ada_Compiler_Switches :=
        ("-gnat05",           --  Ada 2005 mode
         "-gnati1",           --  Full ISO 8859-1 character set allowed in
                              --  source code (for generated CORBA stubs)
         "-gnatf",            --  Full compiler error messages
         Cfg_Pragmas_Switch,  --  Configuration pragmas from configure
         "-gnatwal" & Warnings_Mode)
                              --  Enable all warnings, also enable elaboration
                              --  warnings, and treat all warnings as errors
                              --  if Warnings_Mode is set to "e".
         & PolyORB_Config.Style_Switches;

      case Build is
         when "PRODUCTION" =>
            for Default_Switches ("Ada") use
               Base_Ada_Compiler_Switches &
                 ("-gnatp",  --  Suppress all checks
                  "-gnatn"); --  Enable inlining

         when "DEBUG" =>
            for Default_Switches ("Ada") use
               Base_Ada_Compiler_Switches &
                 ("-gnato",         --  Overflow checks
                  "-gnata",         --  Enable assertions
                  "-fstack-check"); --  Stack overflow checking

      end case;

   end Compiler;

   package Linker is
      for Default_Switches ("Ada") use ("-Wl,--as-needed");
   end Linker;

end PolyORB_Common;