Skip to content

Commit 39d13da

Browse files
committed
Update MkDocs: Add make install and uninstall
1 parent 26a7f45 commit 39d13da

2 files changed

Lines changed: 28 additions & 9 deletions

File tree

docs/build-system.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This project features a simple and reliable Make-based build system.
44

55
To use it, clone the [GitHub repository](https://github.com/aafulei/cpp-today),
6-
and use `make` to build, run, and test the program.
6+
and use `make` to build, run, test and install the program.
77

88
```shell
99
make # Build release version
@@ -12,6 +12,8 @@ make run # Build and run release version
1212
make run-debug # Build and run debug version
1313
make test # Build and test release version
1414
make test-debug # Build and test debug version
15+
make install # Build and install release version
16+
make uninstall # Remove installed program
1517
make clean # Remove build files
1618
```
1719

@@ -36,6 +38,8 @@ Targets:
3638
test - Build and test release version
3739
test-release - Build and test release version
3840
test-debug - Build and test debug version
41+
install - Build and install release version
42+
uninstall - Remove installed program
3943
clean - Remove release and debug build files
4044
clean-release - Remove release build files
4145
clean-debug - Remove debug build files
@@ -47,16 +51,20 @@ Targets:
4751
Variables:
4852
CXX - C++ compiler (default: c++).
4953
CXX_STANDARD - C++ standard (default: c++23).
54+
PREFIX - Installation prefix (default: /usr/local)
55+
INSTALL_DIR - Installation directory (default: $PREFIX/bin)
5056
5157
Examples:
52-
make # Build release version
53-
make all # Build release version
54-
make release # Build release version
55-
make debug # Build debug version
56-
make run-debug # Build and run debug version
57-
make test-debug # Build and test debug version
58-
make CXX=g++ # Build with g++ compiler
59-
make CXX_STANDARD=c++20 # Build with C++20 standard
58+
make # Build release version
59+
make all # Build release version
60+
make release # Build release version
61+
make debug # Build debug version
62+
make run-debug # Build and run debug version
63+
make test-debug # Build and test debug version
64+
make CXX=g++ # Build with g++ compiler
65+
make CXX_STANDARD=c++20 # Build with C++20 standard
66+
make PREFIX=/opt/local install # Install to /opt/local/bin
67+
make PREFIX=/opt/local uninstall # Remove program from /opt/local/bin
6068
```
6169

6270
---

docs/getting-started.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ You should see the current date printed out in the `YY/MM/DD = Www` format, e.g.
4141
25/05/14 = Wed
4242
```
4343

44+
## Install
45+
46+
Install the program with
47+
48+
```shell
49+
make install
50+
```
51+
52+
You might need `sudo`. Default install path is `/usr/local/bin`. See `make help`
53+
for customization. To uninstall the program, run `make uninstall`.
54+
4455
---
4556

4657
*For more details, see the

0 commit comments

Comments
 (0)