You've already forked ada-py-bind
mirror of
https://github.com/AdaCore/ada-py-bind.git
synced 2026-02-12 13:05:06 -08:00
49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
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;
|