-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathada_py_bind.gpr
48 lines (39 loc) · 1.6 KB
/
ada_py_bind.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
with "gnatcoll_python";
with "gnatcoll";
library project Ada_Py_Bind is
type Build_Mode_Type is ("dev", "prod");
Build_Mode : Build_Mode_Type := external ("BUILD_MODE", "dev");
for Create_Missing_Dirs use "True";
type BUILD_KIND is ("static", "static-pic", "relocatable");
BUILD : BUILD_KIND := external("LIBRARY_TYPE", "static");
case BUILD is
when "relocatable" =>
for Source_Dirs use ("../../include/gnatcoll_python/");
for Library_Dir use "../../lib/gnatcoll_python.relocatable";
for Library_Kind use "relocatable";
when "static-pic" =>
for Source_Dirs use ("../../include/gnatcoll_python/");
for Library_Dir use "../../lib/gnatcoll_python.static-pic";
for Library_Kind use "static-pic";
when "static" =>
for Source_Dirs use ("../../include/gnatcoll_python/");
for Library_Dir use "../../lib/gnatcoll_python.static";
for Library_Kind use "static";
end case;
for Library_Name use "ada_py_bind";
for Library_Dir use "lib";
for Source_Dirs use ("src");
for Object_Dir use "obj";
package Compiler is
case Build_Mode is
when "dev" =>
for Default_Switches ("Ada") use ("-g", "-O0", "-gnatyg",
"-gnatwa");
when "prod" =>
-- Debug information is useful even with optimization for
-- profiling, for instance.
for Default_Switches ("Ada") use ("-g", "-Ofast", "-gnatp");
end case;
end Compiler;
Py_Bind_Lib_Options := ("-Wl,-z,origin,-rpath,$ORIGIN");
end Ada_Py_Bind;