-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbitcoin_script.gpr
More file actions
97 lines (86 loc) · 3.81 KB
/
bitcoin_script.gpr
File metadata and controls
97 lines (86 loc) · 3.81 KB
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
project Bitcoin_Script is
-----------
-- Types --
-----------
type Word_Size_Option is ("32", "64");
type System_Option is ("posix", "windows");
type Boolean_Option is ("Yes", "No");
-------------
-- Options --
-------------
Word_Size : Word_Size_Option := external ("Word_Size", "64");
System : System_Option := external ("System", "windows");
Debug : Boolean_Option := external ("Debug", "No");
---------------
-- Variables --
---------------
Library_Directory := "binaries/" & System & "/" & Word_Size;
Name := "bitcoin_script";
--------------
-- Settings --
--------------
for Languages use ("Ada");
for Library_Name use Name;
for Library_Dir use Library_Directory;
for Source_Dirs use ("code");
for Object_Dir use "objects";
for Library_ALI_Dir use "objects/ali";
for Library_Kind use "dynamic";
for Library_Standalone use "encapsulated";
for Library_Interface use (
"Bitcoin",
"Bitcoin.Data",
"Bitcoin.Data.Stacks",
"Bitcoin.Api",
"Bitcoin.Api.OpenSSL",
"Bitcoin.Crypto",
"Bitcoin.Crypto.Ripemd160",
"Bitcoin.Encoding",
"Bitcoin.Encoding.Generic_Encoder",
"Bitcoin.Encoding.Base58_Characters",
"Bitcoin.Encoding.Base58",
"Bitcoin.Encoding.Base64",
"Bitcoin.Script");
case System is
when "posix" => for Library_Options use ( "-lgcov", "-lcrypto");
when "windows" =>
case Word_Size is
when "32" => for Library_Options use ("-lgcov", "../" & Library_Directory & "/libcrypto-1_1.dll");
when "64" => for Library_Options use ("-lgcov", "../" & Library_Directory & "/libcrypto-1_1-x64.dll");
end case;
end case;
-------------
-- Builder --
-------------
package Builder is
Switch_Builder := (); -- Store traceback in exceptions
case Word_Size is
when "32" => null;
when "64" => Switch_Builder := Switch_Builder & ("-m64"); -- Pass onto gcc ld.exe produce only 64 bit code
end case;
for Default_Switches ("Ada") use Switch_Builder;
end Builder;
--------------
-- Compiler --
--------------
package Compiler is
Default_Switch_Compiler := ("-gnatW8", -- Wide character encoding method (?=h/u/s/e/8/b)
"-gnat2012"); -- Ada 2012 mode (default)
Switch_Compiler := ();
case Debug is
when "No" => Default_Switch_Compiler := Default_Switch_Compiler & ("-O3", -- Maximum Optimization
"-gnatp"); -- Surpress all checks
when "Yes" => Default_Switch_Compiler := Default_Switch_Compiler & ("-O0", -- Minimize Optimization
"-g", -- Generate debugging information
"-gnata", -- Assertions enabled. Pragma Assert/Debug to be activated
"-E", -- Store traceback in exceptions
"-gnatE", -- Generate extra information in exception messages
"-gnatf", -- Full errors. Verbose details, all undefined references
"-gnato"); -- Enable overflow checking for numerics
Switch_Compiler := Switch_Compiler & ("-ftest-coverage", -- generate gcov notes files
"-fprofile-arcs"); -- cover branching
end case;
for Default_Switches ("Ada") use Default_Switch_Compiler;
for Switches ("Ada") use Switch_Compiler;
end Compiler;
end Bitcoin_Script;