diff --git a/Makefile b/Makefile index b03d94f..23f9b5b 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,17 @@ else # GNU/Linux, at least (Windows should probably use cmake) endif # installation directories (for 'make install') -prefix=/usr/local -libdir=$(prefix)/lib -includedir=$(prefix)/include +DESTDIR ?= +# directory variables : GNU conventions prefer lowercase +# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html +# support both lower and uppercase (BSD), use uppercase in script +prefix ?= /usr/local +PREFIX ?= $(prefix) +exec_prefix ?= $(PREFIX) +libdir ?= $(exec_prefix)/lib +LIBDIR ?= $(libdir) +includedir ?= $(PREFIX)/include +INCLUDEDIR ?= $(includedir) # meta targets diff --git a/README.md b/README.md index 247c7b1..219cef2 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,21 @@ data governed by the similarly permissive [Unicode data license](http://www.unicode.org/copyright.html#Exhibit1)); please see the included `LICENSE.md` file for more detailed information. -## Quick Start +## Installation -For compilation of the C library run `make`. +``` +make # compilation of the C library +make install # this command may require root access +``` + +utf8proc's `Makefile` supports standard [Makefile conventions], +including [staged installs], [redirection], or [command redefinition]. +It is compatible with parallel builds (`-j#`). + +[Makefile conventions]: https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html +[staged installs]: https://www.gnu.org/prep/standards/html_node/DESTDIR.html +[redirection]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html +[command redefinition]: https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html ## General Information