Skip to content

Commit 8b0cdf5

Browse files
committed
Update README.md
1 parent 7515a01 commit 8b0cdf5

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,18 @@ All functions return a deferred-length, allocatable character scalar (``characte
3030

3131
Admittedly, my knowledge of automake, autotools, etc is not strong at this time. The makefile is preconfigured to compile with GNU Fortran (gfortran) ``$FC`` and its appropriate compiler options ``$FFLAGS``. The default install path is set to ``/usr/local`` via ``$PREFIX``. To change these make variables, simply edit the makefile or set these variables on the command line prior to the make commands.
3232

33-
### Build
34-
35-
``> [FC=... FFLAGS="..." PREFIX="..."] make``
36-
37-
### Test
38-
39-
Prior to ``make install ``, though optional, it is good practice to test the build with via
40-
41-
``> make test``
42-
43-
### Install
44-
45-
``> [sudo] [FC=... FFLAGS="..." PREFIX="..."] make install`` **(sudo access required to install to system area)**
33+
```bash
34+
[FC=... FFLAGS="..." PREFIX="..."] make # Build
35+
make test # Test
36+
[sudo] [FC=... FFLAGS="..." PREFIX="..."] make install # Install (sudo access required if install to system area)
37+
```
4638

4739
## Usage
4840

4941
This package provides a module file (**``<prefix>/include/strings.mod``**) and both a shared object library (**``<prefix>/lib/libfstrings.so``**) and a static library (**``<prefix>/lib/libfstrings.a``**). To use this ``fortran-strings`` in your Fortran program, you must use the ``USE`` statement in your main program or procedure source and during compile, you must specify the library of your choice to the compiler/linker.
5042

5143
Example code:
44+
5245
```fortran
5346
program test
5447
use strings
@@ -65,13 +58,15 @@ end program test
6558
```
6659

6760
Example compile and link to ***static*** library using gfortran:
61+
6862
```bash
6963
gfortran -I<prefix>/include -o test.x test.f90 <prefix>/lib/libfstrings.a
7064
```
7165

7266
Note that this does not make the executable 100% static.
7367

7468
Example compile and link to ***shared object*** library using gfortran:
69+
7570
```bash
7671
gfortran -I<prefix>/include -o test.x test.f90 -L<prefix>/lib -lfstrings
7772
```

0 commit comments

Comments
 (0)