diff options
author | Jean Delvare <jdelvare@suse.de> | 2018-11-09 10:20:48 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2018-11-09 10:20:48 +0100 |
commit | 4b2857942f043eed1afade106c08bb74d639dca9 (patch) | |
tree | db18402ab35c3c0166110d681216c97fb4d953db | |
parent | 4700d21bb366a479ee67d1d734747b68dab85539 (diff) | |
download | i2c-tools-4b2857942f043eed1afade106c08bb74d639dca9.tar.gz |
Make PREFIX overridable
Allow the user to define the installation prefix as an alternative
to "/usr/local".
Suggested by Per Olav Kroka.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | README | 6 |
2 files changed, 9 insertions, 9 deletions
@@ -8,13 +8,13 @@ # (at your option) any later version. DESTDIR ?= -prefix = /usr/local -bindir = $(prefix)/bin -sbindir = $(prefix)/sbin -mandir = $(prefix)/share/man +PREFIX ?= /usr/local +bindir = $(PREFIX)/bin +sbindir = $(PREFIX)/sbin +mandir = $(PREFIX)/share/man man8dir = $(mandir)/man8 -incdir = $(prefix)/include -libdir = $(prefix)/lib +incdir = $(PREFIX)/include +libdir = $(PREFIX)/lib INSTALL := install INSTALL_DATA := $(INSTALL) -m 644 @@ -62,9 +62,9 @@ There's no configure script, so simply run "make" to build the library and tools, and "make install" to install them. You also can use "make uninstall" to remove all the files you installed. By default, files are installed in /usr/local but you can change the location by editing the Makefile file and -setting prefix to wherever you want. You may change the C compiler and the -compilation flags as well, and also decide which flavors of the library -will be built. +setting PREFIX to wherever you want (or setting its value on the make +command line). You may change the C compiler and the compilation flags as +well, and also decide which flavors of the library will be built. In cases where you need to compile only the static or dynamic variant of the library, you can use BUILD_STATIC_LIB and BUILD_DYNAMIC_LIB at compile |