Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestions inspired by Debian packaging #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions lib/gnat/aunit.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ project AUnit is
for Library_Dir use AUnit_Shared.Library_Dir;

Obj_Dir := external ("AUNIT_OBJDIR", "../aunit-obj/"
& AUnit_Shared.Target & "-" & AUnit_Shared.Runtime);
& AUnit_Shared.Target & "-" & AUnit_Shared.Runtime
& "-" & AUnit_Shared.Library_Kind);
for Object_Dir use Obj_Dir;

for Library_Name use "aunit";
for Library_Kind use "static";
for Library_Kind use AUnit_Shared.Library_Kind;
for Library_Version use
external ("AUNIT_LIBRARY_VERSION", "libaunit.so.0.0");

case AUnit_Shared.Library_Kind is
when "dynamic" | "relocatable" =>
-- Put options like --as-needed before the libraries.
for Leading_Library_Options use external_As_List ("LDFLAGS", " ");
when others =>
end case;

--------------
-- Compiler --
Expand All @@ -40,6 +50,10 @@ project AUnit is
("-O2", "-gnatp", "-gnatn", "-gnatwa.X");
end case;

-- Allow user flags to override default flags.
for Default_Switches ("ada") use
Compiler'Default_Switches ("ada") & external_As_List ("ADAFLAGS", " ");

for Switches ("aunit.adb") use
Compiler'Default_Switches ("ada") & ("-fno-strict-aliasing");
end Compiler;
Expand Down
4 changes: 3 additions & 1 deletion lib/gnat/aunit_shared.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ project AUnit_Shared is

Runtime : Runtime_Type := external ("AUNIT_RUNTIME", "full");

Library_Dir := external ("AUNIT_LIBDIR", "../aunit/" & Target & "-" & Runtime);
Library_Kind := external ("AUNIT_LIBRARY_KIND", "static");
Library_Dir := external ("AUNIT_LIBDIR", "../aunit/" & Target & "-" & Runtime
& "-" & Library_Kind);

for Source_Dirs use ();

Expand Down