# * `STRIP` - Strip command for default output (stripped release) target (`make sink`). set `make STRIP=:` to prevent stripping entirely. (NOTE: When using `make install`, `STRIP=:` will not work, instead, paradoxically, set `STRIP=true`, they have the same effect for all targets)
# * `STRIP` - Strip command for default output (stripped release) target (`make sink`). set `make STRIP=:` to prevent stripping entirely. (NOTE: When using `make install`, `STRIP=:` will not work, instead, paradoxically, set `STRIP=true`, they have the same effect for all targets)
PROJECT=sink
PROJECT=sink
DESCRIPTION=sink all input and output of a program to /dev/null
DESCRIPTION=sink all input and output of a program to /dev/null
@ -19,11 +19,15 @@ Run `make && sudo make install` to build with full optimisations and install `si
To build for debugging, run `make debug`.
To build for debugging, run `make debug`.
### Compiler flags
### Feature flags
* `-DREPLACE_STDERR` - Add to `CFLAGS` when building a target to re-route the child program's `stderr` stream to the sink as well. By default, it is passed through as default.
* `-DNO_SEARCH_PATH` - Add to `CFLAGS` when building to prevent the program looking up its argument in the `PATH` environment variable.
Set the following to the environment variable `FEATURES` when invoking `make` to build with the speficied features' behaviour (e.g. `FEATURES=NO_SEARCH_PATH\ NO_ENV make`.)
* `-DNO_ENV` - Add to `CFLAGS` when building to prevent `envp` passthrough to the `execve()`'d program.
When a debug-mode splash screen is printed, the features the binary was compiled with are also printed.
* `-DDEBUG_IGNORE_SPLASH` - Do not print project and version info in debug builds on startup.
* `REPLACE_STDERR` - Re-route the child program's `stderr` stream to the sink as well. By default, it is passed through as default.
* `NO_SEARCH_PATH` - Prevent the program looking up its argument in the `PATH` environment variable.
* `NO_ENV` - Prevent `envp` passthrough to the `execve()`'d program.
* `DEBUG_IGNORE_SPLASH` - Do not print project and version info in debug builds on startup.
### Installation
### Installation
The program must have been built before installation, and installation and uninstallation must be done as root.
The program must have been built before installation, and installation and uninstallation must be done as root.