diff --git a/README.md b/README.md index b329d2713..cbc6535cd 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,29 @@ python config/fypp_deployment.py --help git checkout stdlib-fpm fpm build --profile release ``` -#### Runing the examples + + +#### Installing with fpm + +Either option you chose for building the `stdlib`, you can install it with: +```sh +fpm install --profile release +``` +The command above will install the following files: +- `libstdlib.a` into `~/.local/lib/` (Unix) or `C:\Users\\AppData\Roaming\local\lib\` (Windows) +- all the `.[s]mod` files produced by the compiler into `~/.local/include/` (Unix) or `C:\Users\\AppData\Roaming\local\include\` (Windows) + +You can change the installation path by setting the prefix option to `fpm`: +```sh +fpm install --profile release --prefix /my/custom/installation/path/ +``` + +You can use the `stdlib` by adding the `-lstdlib` flag to your compiler. +If your prefix is a non standard path, add also: +- `-L/my/custom/installation/path/lib` +- `-I/my/custom/installation/path/include` + +#### Running the examples You can run the examples with `fpm` as: ```sh diff --git a/fpm.toml b/fpm.toml index bf8dfc530..e92871f98 100644 --- a/fpm.toml +++ b/fpm.toml @@ -3,7 +3,10 @@ version = "VERSION" license = "MIT" author = "stdlib contributors" maintainer = "@fortran-lang/stdlib" -copyright = "2019-2021 stdlib contributors" +copyright = "2019-2024 stdlib contributors" + +[install] +library = true [dev-dependencies] test-drive.git = "https://github.com/fortran-lang/test-drive"