aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2018-11-09 10:20:48 +0100
committerJean Delvare <jdelvare@suse.de>2018-11-09 10:20:48 +0100
commit4b2857942f043eed1afade106c08bb74d639dca9 (patch)
treedb18402ab35c3c0166110d681216c97fb4d953db
parent4700d21bb366a479ee67d1d734747b68dab85539 (diff)
downloadi2c-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--Makefile12
-rw-r--r--README6
2 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 37d9011..dc56383 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/README b/README
index 2aaf927..7556cf3 100644
--- a/README
+++ b/README
@@ -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