update readme

multi
Avril 4 years ago
parent 74ebc7e74c
commit 16b3b1cea1
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,6 @@
# fcmp - compare file identity # fcmp - compare file identity
A shell utils that compares files for identity with `mmap()` and `memcmp()`. A small shell util that compares files for identity with `mmap()` and `memcmp()`.
# Usage # Usage
`fcmp` produces no output, but success is indicated by its return code. `fcmp` produces no output, but success is indicated by its return code.
@ -16,7 +16,7 @@ $ fcmp file1 file2 && echo "Equal!"
| 2 | The files have unequal lengths, and therefor must be unequal | | 2 | The files have unequal lengths, and therefor must be unequal |
| -1 | There was an error | | -1 | There was an error |
Therefor you can use this in shell scripts easily: You can use this in shell scripts easily:
``` shell ``` shell
# Example # Example
@ -28,5 +28,21 @@ else
fi fi
``` ```
# Building
To build normally, run `make`.
## Release target
Build with default optimisations using `make release`, it will output a stripped binary at `fcmp-release`.
### Notes
* The Makefile uses variables `RELEASE_CFLAGS` and `RELEASE_LDFLAGS` to apply optimisations (and `DEBUG_CFLAGS` + `DEBUG_LDFLAGS` for extra compiler flags with the debug target). If needed you can set these yourself to prevent the defaults.
* The default `RELEASE_CFLAGS` specify `-march=native` which may be undesireable for you. Set the variable or modify the Makefile if you need to remove this.
## Debug target
Build with debugging information and no optimisations using `make debug`, it will output a binary at `fcmp-debug`.
## Note
Before switching between `release` and `debug` targets, make sure to run `make clean`.
# License # License
GPL'd with <3 GPL'd with <3

Loading…
Cancel
Save