File: common.gpr

package info (click to toggle)
asis 2010-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,964 kB
  • sloc: ada: 103,084; makefile: 313; xml: 19
file content (53 lines) | stat: -rw-r--r-- 1,654 bytes parent folder | download
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
project Common is

   for Source_Dirs use ();
   type Bld_Type is ("prod", "debug", "prod_strict", "prod_no_checks");
   Bld : Bld_Type := external ("BLD", "prod");

   type OS_Type is ("default_Unix", "powerpc_aix", "pa_hpux");
   OS : OS_Type := external ("OPSYS", "default_Unix");

   Ada_Strict_Switches  := ("-gnatf", "-gnatwae", "-gnatw.g",  "-gnatyg", "-gnatyS");
   Ada_Relaxed_Switches := ("-gnatf", "-gnatws");

   Processors := External ("PROCESSORS", "1");

   package Builder is

      case bld is
         when "prod" =>
            for Default_Switches ("ada") use Ada_Relaxed_Switches & ("-O2");
         when "prod_strict" =>
            for Default_Switches ("ada") use Ada_Strict_Switches & ("-O2");
         when "debug" =>
            for Default_Switches ("ada")
              use Ada_Strict_Switches & ("-g", "-gnata");
         when "prod_no_checks" =>
            for Default_Switches ("ada")
              use Ada_Strict_Switches & ("-O2", "-gnatp");
      end case;

      case OS is
         when "powerpc_aix" =>
            for Default_Switches ("ada") use
              Builder'Default_Switches ("ada") & ("-mminimal-toc");
         when "pa_hpux" =>
            for Default_Switches ("ada") use
              Builder'Default_Switches ("ada") & ("-mdisable-indexing");
         when others =>
            null;
      end case;

      for Default_Switches ("ada") use
        Builder'Default_Switches ("ada") & ("-m", "-j" & Processors);
   end Builder;

   package Binder is
      for Default_Switches ("ada") use ("-static");
   end Binder;

   package Ide is
      for Vcs_Kind use "Subversion";
   end Ide;

end Common;