From 263b7cc37f2a77c1e3b2d060190a2b175d3db560 Mon Sep 17 00:00:00 2001 From: HonkiTonk Date: Thu, 2 Feb 2023 20:27:57 +0100 Subject: [PATCH] =?UTF-8?q?Codeformatierung=20leicht=20=C3=BCberarbeitet.?= =?UTF-8?q?=20Neue=20Versionen=20f=C3=BCr=20GitHub=20erstellt.=20Neue=20Ve?= =?UTF-8?q?rsion=20bei=20Alire=20hinzugef=C3=BCgt.=20Kleinigkeiten=20korri?= =?UTF-8?q?giert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HonkiTonksZivilisationen.gpr | 43 ++++++++ HonkiTonksZivilisationen_Dynamic.gpr | 42 ++++++++ HonkiTonksZivilisationen_Static_Dynamic.gpr | 43 ++++++++ HonkiTonksZivilisationen_Windows.gpr | 41 +++++++ asfml.gpr | 112 ++++++++++++++++++++ asfml_Dynamic.gpr | 112 ++++++++++++++++++++ asfml_Windows.gpr | 106 ++++++++++++++++++ 7 files changed, 499 insertions(+) create mode 100644 HonkiTonksZivilisationen.gpr create mode 100644 HonkiTonksZivilisationen_Dynamic.gpr create mode 100644 HonkiTonksZivilisationen_Static_Dynamic.gpr create mode 100644 HonkiTonksZivilisationen_Windows.gpr create mode 100644 asfml.gpr create mode 100644 asfml_Dynamic.gpr create mode 100644 asfml_Windows.gpr diff --git a/HonkiTonksZivilisationen.gpr b/HonkiTonksZivilisationen.gpr new file mode 100644 index 000000000..a036f06c2 --- /dev/null +++ b/HonkiTonksZivilisationen.gpr @@ -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 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", "-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; + diff --git a/HonkiTonksZivilisationen_Dynamic.gpr b/HonkiTonksZivilisationen_Dynamic.gpr new file mode 100644 index 000000000..edfe7eb78 --- /dev/null +++ b/HonkiTonksZivilisationen_Dynamic.gpr @@ -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 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", "-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; + diff --git a/HonkiTonksZivilisationen_Static_Dynamic.gpr b/HonkiTonksZivilisationen_Static_Dynamic.gpr new file mode 100644 index 000000000..66fb3a770 --- /dev/null +++ b/HonkiTonksZivilisationen_Static_Dynamic.gpr @@ -0,0 +1,43 @@ +with "asfml_Dynamic.gpr"; + +project HonkiTonksZivilisationen_Static_Dynamic is + + for Source_Dirs use ("src/**"); + for Object_Dir use "obj_static_dynamic"; + for Create_Missing_Dirs use "True"; + for Exec_Dir use "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", "-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 ("-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_Static_Dynamic; + diff --git a/HonkiTonksZivilisationen_Windows.gpr b/HonkiTonksZivilisationen_Windows.gpr new file mode 100644 index 000000000..5ce7b19a3 --- /dev/null +++ b/HonkiTonksZivilisationen_Windows.gpr @@ -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; + diff --git a/asfml.gpr b/asfml.gpr new file mode 100644 index 000000000..c3085eeb5 --- /dev/null +++ b/asfml.gpr @@ -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; \ No newline at end of file diff --git a/asfml_Dynamic.gpr b/asfml_Dynamic.gpr new file mode 100644 index 000000000..93d8cb85f --- /dev/null +++ b/asfml_Dynamic.gpr @@ -0,0 +1,112 @@ +library project ASFML_Dynamic 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/ASFMLDynamic/include"); + for Object_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFMLDynamic/obj"; + + for Library_Name use "asfml"; + + for Library_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFMLDynamic/lib"; + for Library_ALI_Dir use "/mnt/7db030dd-f557-47fa-b854-251d5b7172b9/Ada/ASFMLDynamic/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_Dynamic; \ No newline at end of file diff --git a/asfml_Windows.gpr b/asfml_Windows.gpr new file mode 100644 index 000000000..7a33305c4 --- /dev/null +++ b/asfml_Windows.gpr @@ -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; \ No newline at end of file