Skip to content

Commit 56afb4e

Browse files
committed
Add non_alire.gpr and update README
1 parent 788954e commit 56afb4e

File tree

2 files changed

+87
-4
lines changed

2 files changed

+87
-4
lines changed

README.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,33 @@ It's a great use for one of those old smartphones or tablets you have lying in t
2626

2727
## Build and Install
2828

29-
A binary (.deb) version for 64-bit Debian-based systems *may* be available as part of a release.
29+
A binary (.deb) version for modern 64-bit Debian-based systems *may* be available as part of a release.
3030

31-
### Build from Source
32-
Keypadder is [hosted on GitHub](https://github.com/SMerrony/keypadder).
33-
It is written entirely in GNU Ada (GNAT) and built using the [Alire](https://alire.ada.dev/) build system.
31+
The Keypadder source is [hosted on GitHub](https://github.com/SMerrony/keypadder).
32+
33+
It is written entirely in GNU Ada (GNAT). You may build it using either the [Alire](https://alire.ada.dev/) build system or plain old `gprbuild`.
34+
Building via Alire is preferred where it is possible as all necessary dependencies will be obtained for you automatically.
35+
36+
### Alire Build
3437

3538
Until the Alire crate is available, you should download (or clone) the source from Github
3639
and run `alr build` in the top-level directory.
3740

3841
***TODO - Add more detail here once Alire crate is available***
3942

43+
### Gprbuild Build
44+
45+
#### Prerequisites
46+
You should the development version of `libaws` via your package manager.
47+
You will also need `ada-toml` from https://github.com/pmderodat/ada-toml - follow the instructions there to install it.
48+
49+
Then...
50+
51+
```
52+
mkdir obj
53+
gprbuild -Pnon_alire
54+
```
55+
4056
## Running Keypadder
4157

4258
You need to start Keypadder on your desktop machine,

non_alire.gpr

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
-- Copyright ©2023 Steve Merrony
2+
--
3+
-- Keypadder is free software: you can redistribute it and/or modify
4+
-- it under the terms of the GNU General Public License as published by
5+
-- the Free Software Foundation, either version 3 of the License, or
6+
-- (at your option) any later version.
7+
--
8+
-- Keypadder is distributed in the hope that it will be useful,
9+
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
-- GNU General Public License for more details.
12+
--
13+
-- You should have received a copy of the GNU General Public License
14+
-- along with Keypadder. If not, see <https://www.gnu.org/licenses/>.
15+
16+
with "ada_toml.gpr"; -- installed locally
17+
with "aws"; -- installed via system package manager
18+
19+
project Keypadder is
20+
type Mode_Type is ("debug", "release"); -- all possible values
21+
Mode : Mode_Type := external ("mode", "debug"); -- default
22+
23+
for Languages use ("Ada");
24+
for Main use ("keypadder.adb");
25+
for Source_Dirs use ("src");
26+
for Object_Dir use "obj";
27+
for Exec_Dir use "./";
28+
29+
package Compiler is
30+
case Mode is
31+
when "debug" =>
32+
for Switches ("Ada") use ( "-fstack-check",
33+
"-g",
34+
"-gnata",
35+
"-gnateE",
36+
"-gnatwa",
37+
"-O0"
38+
);
39+
40+
when "release" =>
41+
for Switches ("Ada") use ("-flto", "-O3");
42+
end case;
43+
end Compiler;
44+
45+
package Binder is
46+
case Mode is
47+
when "debug" =>
48+
for Switches ("Ada") use ("-Es");
49+
when "release" =>
50+
for Switches ("Ada") use ("-Es");
51+
end case;
52+
end Binder;
53+
54+
-- package Builder is
55+
-- for Global_Configuration_Pragmas use "gnat.adc";
56+
-- end Builder;
57+
58+
package Linker is
59+
case Mode is
60+
when "debug" =>
61+
for Switches ("Ada") use ("-g");
62+
when "release" =>
63+
for Switches ("Ada") use ("-flto", "-O3");
64+
end case;
65+
end Linker;
66+
67+
end Keypadder;

0 commit comments

Comments
 (0)