passwdgen/README.md
Gregory Gauthier 5e7fbf1895
All checks were successful
CMake / build (push) Successful in 42s
build: add Makefile with standard targets
- Introduce Makefile supporting build, test, install, uninstall, clean
- Add variables for PREFIX and DESTDIR
- Update README.md with Makefile usage instructions
2026-03-06 17:01:00 +00:00

56 lines
825 B
Markdown

# passwdgen
### a rudimentary random string password generator
For demo purposes only
## Build
**Bare Bones**
```bash
mkdir build
g++ -o build/passwdgen ./passwdgen.cpp
```
**From CMAKE**
```bash
mkdir build
cd build
cmake ..
make
```
Then, just copy the compiled binary to somewhere on your $PATH
## Testing
To run the tests:
```bash
mkdir build
cd build
cmake ..
make
ctest
```
or directly:
```bash
./tests/passwdgen_test
```
## Makefile
Now supports standard targets via `Makefile`:
```bash
make # alias for build (Release)
make test # build + run tests
sudo make install # to /usr/local/bin, /lib, /include
make uninstall # remove installed files
make clean # rm -rf build/
```
Variables:
- `PREFIX=/opt/myprefix make install`
- `DESTDIR=/tmp/root PREFIX=/usr make install` (packaging)