diff --git a/README.md b/README.md index 8da3345..84cc2b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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 `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 | | -1 | There was an error | -Therefor you can use this in shell scripts easily: +You can use this in shell scripts easily: ``` shell # Example @@ -28,5 +28,21 @@ else 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 GPL'd with <3