From: Loup Vaillant Date: Tue, 2 Apr 2019 20:59:56 +0000 (+0200) Subject: Clarified installation instructions X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=0bfb12b4e1e89026d019b00a694b4d6ed2125f32;p=Monocypher.git Clarified installation instructions Related to #120 Made the 3 options (from source, from lib, system wide installation) clearer, and stated the ability to change compilation flags explicitly. (Those flags are all standards, but not everyone may know them). --- diff --git a/README.md b/README.md index 3cdda5c..a7f8f81 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,26 @@ script. This requires mandoc. Installation ------------ +### Option 1: grab the sources + The easiest way to use Monocypher is to include `src/monocypher.h` and `src/monocypher.c` directly into your project. They compile as C99, C11, C++98, C++11, C++14, and C++17. -Alternatively, you can run `make`, then grab `lib/libmonocypher.a` or -`lib/libmonocypher.so`. If you're running a UNIX system, you can even -install Monocypher (you need to be root): + +### Option 2: grab the library + +Alternatively, you can run `make`, then grab the `src/monocypher.h` +header and the `lib/libmonocypher.a` or `lib/libmonocypher.so` library. +The default compiler is `gcc -std=gnu99`, and the default flags are +`-pedantic -Wall -Wextra -O3 -march=native`. If they don't work on your +platform, you can change them like this: + + $ make CC="clang -std=c99" CFLAGS="-O2" + +### Option 3 install it on your system + +The following should work on most UNIX systems: $ make install