-
Notifications
You must be signed in to change notification settings - Fork 1
/
libnadacurses.gpr
77 lines (55 loc) · 1.93 KB
/
libnadacurses.gpr
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
library project libnadacurses is
Version := "1";
OS_Def := "-D__NADACURSES_HOST_OS_";
Distro_Def := "";
Wide_Def := "";
Source_Base := "./src";
type Config_Option is ("YES", "NO");
type OS_Type is ("Linux", "FreeBSD", "Solaris");
type Linux_Distro is ("Ubuntu");
Wide_Support: Config_Option := external ("WIDE_SUPPORT","NO");
Host_OS : OS_Type := external ("HOST_OS");
Distro : Linux_Distro := external ("DISTRO","Ubuntu");
for Languages use ("Ada", "C");
for Object_Dir use "./obj";
case Host_OS is
when "Linux" =>
OS_Def := OS_Def & "LINUX";
Distro_Def := "-D__NADACURSES_DISTRO_";
case Distro is
when "Ubuntu" =>
Distro_Def := Distro_Def & "UBUNTU";
end case;
when "FreeBSD" =>
OS_Def := OS_Def & "FREE_BSD";
when "Solaris" =>
OS_Def := OS_Def & "SOLARIS";
end case;
case Wide_Support is
when "YES" =>
for Source_Dirs use (Source_Base, Source_Base & "/Wide_Support");
Wide_Def := "-D__NADACURSES_WIDE_SUPPORT";
when "NO" =>
for Source_Dirs use (Source_Base, Source_Base & "/No_Wide_Support",
"./Tests/Debug_Harness");
end case;
-- Under construction
for Excluded_Source_Files use
("curses-managed.ads",
"curses-managed.adb",
"curses-ui-home_screen.ads");
for Library_Name use "nadacurses";
for Library_Dir use "./lib";
for Library_Kind use "dynamic";
for Library_Version use "libnadacurses.so." & Version;
case Wide_Support is
when "YES" =>
for Library_Options use ("-lncursesw");
when "NO" =>
for Library_Options use ("-lncurses");
end case;
package Compiler is
for Default_Switches ("Ada") use ("-O2");
for Default_Switches ("C") use ("-O2", OS_Def, Distro_Def, Wide_Def);
end Compiler;
end libnadacurses;