Skip to content

Commit

Permalink
Dateien für Alire angepasst.
Browse files Browse the repository at this point in the history
  • Loading branch information
HonkiTonk committed Dec 8, 2022
1 parent 8667e03 commit b52d8bb
Show file tree
Hide file tree
Showing 5 changed files with 344 additions and 0 deletions.
43 changes: 43 additions & 0 deletions HonkiTonksZivilisationen.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
with "asfml.gpr";

project HonkiTonksZivilisationen is

for Source_Dirs use ("src/**");
for Object_Dir use "obj";
for Create_Missing_Dirs use "True";
for Exec_Dir use "Honki Tonk´s Zivilisationen";
for Main use ("Start.adb");

package Naming is
for Casing use "MixedCase";
end Naming;

package Compiler is
for Switches ("ada") use ("-gnatW8", "-gnatf", "-gnat2020", "-g", "-gnata", "-fstack-check", "-gnato", "-gnatVacdefimoprst",
"-gnatw.a.b.c.d.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.v.w.x.zcdghiklmopqrtuvwxyz_c_re.u_pajf", "-gnatyACOSadefhiklnprsxM222L7");
for Local_Configuration_Pragmas use "Lokale Pragmas";
end Compiler;

package Builder is
for Switches ("ada") use ("-k", "-s", "-C", "-gnatW8", "-j4");
end Builder;

package Binder is
for Default_Switches ("ada") use ("-static", "-d_C", "-W8");
end Binder;

package Pretty_Printer is
for Default_Switches ("ada") use ("-W8");
end Pretty_Printer;

package Prove is
for Proof_Switches ("ada") use ("-j4", "--proof-warnings", "--codepeer=on");
end Prove;

package Linker is
for Switches ("ada") use ("-s", "-Wl,--gc-sections");
for Linker_Options use ("-static");
end Linker;

end HonkiTonksZivilisationen;

42 changes: 42 additions & 0 deletions HonkiTonksZivilisationen_Dynamic.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
with "asfml.gpr";

project HonkiTonksZivilisationen_Dynamic is

for Source_Dirs use ("src/**");
for Object_Dir use "obj_dynamic";
for Create_Missing_Dirs use "True";
for Exec_Dir use "Honki Tonk´s Zivilisationen";
for Main use ("Start.adb");

package Naming is
for Casing use "MixedCase";
end Naming;

package Compiler is
for Switches ("ada") use ("-gnatW8", "-gnatf", "-gnat2020", "-O3", "-gnatn", "-funroll-loops", "-fPIC", "-gnatVacdefimoprst",
"-gnatw.a.b.c.d.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.v.w.x.zcdghiklmopqrtuvwxyz_c_re.u_pajf", "-gnatyACOSadefhiklnprsxM222L8");
for Local_Configuration_Pragmas use "Lokale Pragmas";
end Compiler;

package Builder is
for Switches ("ada") use ("-k", "-s", "-C", "-gnatW8", "-j4");
end Builder;

package Binder is
for Default_Switches ("ada") use ("-d_C", "-W8");
end Binder;

package Pretty_Printer is
for Default_Switches ("ada") use ("-W8");
end Pretty_Printer;

package Prove is
for Proof_Switches ("ada") use ("-j4", "--proof-warnings", "--codepeer=on");
end Prove;

package Linker is
for Switches ("ada") use ("-s", "-Wl,--gc-sections");
end Linker;

end HonkiTonksZivilisationen_Dynamic;

41 changes: 41 additions & 0 deletions HonkiTonksZivilisationen_Windows.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
with "asfml_Windows.gpr";

project HonkiTonksZivilisationen_Windows is

for Source_Dirs use ("src/**");
for Object_Dir use "obj_windows";
for Create_Missing_Dirs use "True";
for Exec_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/Zivilisationen Win/Honki Tonks Zivilisationen";
for Main use ("Start.adb");

package Naming is
for Casing use "MixedCase";
end Naming;

package Compiler is
for Switches ("ada") use ("-gnatW8", "-gnatf", "-gnat2020", "-O3", "-funroll-loops", "-fPIC", "-gnatn", "-gnatVacdefimoprst",
"-gnatw.a.b.c.d.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.v.w.x.zcdghiklmopqrtuvwxyz_c_re.u_pajf", "-gnatyACOSadefhiklnprsxM222L8");
for Local_Configuration_Pragmas use "Lokale Pragmas";
end Compiler;

package Builder is
for Switches ("ada") use ("-k", "-s", "-C", "-gnatW8", "-j4");
end Builder;

package Binder is
for Default_Switches ("ada") use ("-static", "-W8");
end Binder;

package Pretty_Printer is
for Default_Switches ("ada") use ("-W8");
end Pretty_Printer;

package Prove is
end Prove;

package Linker is
for Switches ("ada") use ("-s", "-Wl,--gc-sections");
end Linker;

end HonkiTonksZivilisationen_Windows;

112 changes: 112 additions & 0 deletions asfml.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
library project ASFML is

type T_OS is ("Windows_NT", "Linux");
V_OS : T_OS := external ("OS", "Linux");

for Languages use ("Ada");

for Create_Missing_Dirs use "True";

for Source_Dirs use ("/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFML/include");
for Object_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFML/obj";

for Library_Name use "asfml";

for Library_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFML/lib";
for Library_ALI_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFML/lib";
for Library_Kind use "static";


type Enabled_Kind is ("enabled", "disabled");
Compile_Checks : Enabled_Kind := External ("ASFML_COMPILE_CHECKS", "enabled");
Runtime_Checks : Enabled_Kind := External ("ASFML_RUNTIME_CHECKS", "enabled");
Style_Checks : Enabled_Kind := External ("ASFML_STYLE_CHECKS", "enabled");
Contracts_Checks : Enabled_Kind := External ("ASFML_CONTRACTS", "enabled");

type Build_Kind is ("debug", "optimize");
Build_Mode : Build_Kind := External ("ASFML_BUILD_MODE", "optimize");

Compile_Checks_Switches := ();
case Compile_Checks is
when "enabled" =>
Compile_Checks_Switches :=
("-gnatwa"); -- All warnings
when others => null;
end case;

Runtime_Checks_Switches := ();
case Runtime_Checks is
when "enabled" => null;
when others =>
Runtime_Checks_Switches :=
("-gnatp"); -- Supress checks
end case;

Style_Checks_Switches := ();
case Style_Checks is
when "enabled" =>
Style_Checks_Switches :=
("-gnatyg", -- GNAT Style checks
"-gnatyd", -- No DOS line terminators
"-gnatyM80", -- Maximum line length
"-gnatyO"); -- Overriding subprograms explicitly marked as such
when others => null;
end case;

Contracts_Switches := ();
case Contracts_Checks is
when "enabled" =>
Contracts_Switches :=
("-gnata"); -- Enable assertions and contracts
when others => null;
end case;

Build_Switches := ();
case Build_Mode is
when "optimize" =>
Build_Switches := ("-O3", -- Optimization
"-gnatn"); -- Enable inlining
when "debug" =>
Build_Switches := ("-g", -- Debug info
"-Og", -- No optimization
"-gnatVa"); -- All validity checks
end case;

package Compiler is
for Default_Switches ("Ada") use
Compile_Checks_Switches &
Build_Switches &
Runtime_Checks_Switches &
Contracts_Switches &
("-gnatQ"); -- Don't quit. Generate ALI and tree files even if illegalities
end Compiler;

package Binder is
for Switches ("Ada") use ("-Es"); -- Symbolic traceback
for Default_Switches ("ada") use ("-static");
end Binder;

package Linker is
for Linker_Options use
(
"-lcsfml-audio", "-lcsfml-graphics", "-lcsfml-window", "-lcsfml-system", "-lcsfml-network",
"-lsfml-audio", "-lsfml-graphics", "-lsfml-window", "-lsfml-system", "-lsfml-network",
"-lopenal", "-logg", "-lvorbis", "-lvorbisenc", "-lvorbisfile", "-lFLAC", "-lfreetype",
"-lOpenGL", "-lGLX", "-ludev", "-lXrandr", "-lX11", "-lstdc++", "-lm",
-- Wird aktuell nicht benötigt, aber vielleicht in der Zukunft? Mal ausgeklammert drin lassen.
-- "-lGLU", "-lpthread",
"-lasfml");
end Linker;


package Documentation is
for Documentation_Dir use "doc";
for Doc_Pattern use "^/ |^/< ";
-- This considers comments beginning with "--/ " to be documentation
for Custom_Tags_Definition use "tools/sfml-doc-tags.py";
-- GNATdoc loads provided file on startup to process custom tags
for Image_Dir use "images";
for HTML_Custom_Dir use "tools/gnatdoc_html";
end Documentation;

end ASFML;
106 changes: 106 additions & 0 deletions asfml_Windows.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
library project asfml_Windows is

type T_OS is ("Windows_NT", "Linux");
V_OS : T_OS := external ("OS", "Linux");

for Languages use ("Ada");

for Create_Missing_Dirs use "True";

for Source_Dirs use ("Z:\mnt\7db030dd-f557-47fa-b854-251d5b7172b9\Ada\ASFMLWin\include");
for Object_Dir use "Z:\mnt\7db030dd-f557-47fa-b854-251d5b7172b9\Ada\ASFMLWin\obj";

for Library_Name use "asfml";

for Library_Dir use "Z:\mnt\7db030dd-f557-47fa-b854-251d5b7172b9\Ada\ASFMLWin\lib";
for Library_ALI_Dir use "Z:\mnt\7db030dd-f557-47fa-b854-251d5b7172b9\Ada\ASFMLWin\lib";
for Library_Kind use "static";


type Enabled_Kind is ("enabled", "disabled");
Compile_Checks : Enabled_Kind := External ("ASFML_COMPILE_CHECKS", "enabled");
Runtime_Checks : Enabled_Kind := External ("ASFML_RUNTIME_CHECKS", "enabled");
Style_Checks : Enabled_Kind := External ("ASFML_STYLE_CHECKS", "enabled");
Contracts_Checks : Enabled_Kind := External ("ASFML_CONTRACTS", "enabled");

type Build_Kind is ("debug", "optimize");
Build_Mode : Build_Kind := External ("ASFML_BUILD_MODE", "optimize");

Compile_Checks_Switches := ();
case Compile_Checks is
when "enabled" =>
Compile_Checks_Switches :=
("-gnatwa"); -- All warnings
when others => null;
end case;

Runtime_Checks_Switches := ();
case Runtime_Checks is
when "enabled" => null;
when others =>
Runtime_Checks_Switches :=
("-gnatp"); -- Supress checks
end case;

Style_Checks_Switches := ();
case Style_Checks is
when "enabled" =>
Style_Checks_Switches :=
("-gnatyg", -- GNAT Style checks
"-gnatyd", -- No DOS line terminators
"-gnatyM80", -- Maximum line length
"-gnatyO"); -- Overriding subprograms explicitly marked as such
when others => null;
end case;

Contracts_Switches := ();
case Contracts_Checks is
when "enabled" =>
Contracts_Switches :=
("-gnata"); -- Enable assertions and contracts
when others => null;
end case;

Build_Switches := ();
case Build_Mode is
when "optimize" =>
Build_Switches := ("-O3", -- Optimization
"-gnatn"); -- Enable inlining
when "debug" =>
Build_Switches := ("-g", -- Debug info
"-Og", -- No optimization
"-gnatVa"); -- All validity checks
end case;

package Compiler is
for Default_Switches ("Ada") use
Compile_Checks_Switches &
Build_Switches &
Runtime_Checks_Switches &
Contracts_Switches &
("-gnatQ"); -- Don't quit. Generate ALI and tree files even if illegalities
end Compiler;

package Binder is
for Switches ("Ada") use ("-Es"); -- Symbolic traceback
end Binder;

package Linker is
for Linker_Options use
(
"-lcsfml-audio", "-lcsfml-graphics", "-lcsfml-window", "-lcsfml-system", "-lcsfml-network",
"-lasfml");
end Linker;


package Documentation is
for Documentation_Dir use "doc";
for Doc_Pattern use "^/ |^/< ";
-- This considers comments beginning with "--/ " to be documentation
for Custom_Tags_Definition use "tools/sfml-doc-tags.py";
-- GNATdoc loads provided file on startup to process custom tags
for Image_Dir use "images";
for HTML_Custom_Dir use "tools/gnatdoc_html";
end Documentation;

end asfml_Windows;

0 comments on commit b52d8bb

Please sign in to comment.