[Olsr-dev] [PATCH v3 1/1] linux: add support for common (autoconf) make variables (v3)
Ferry Huberts
(spam-protected)
Thu Jun 7 16:11:49 CEST 2012
From: Ferry Huberts <(spam-protected)>
Variables: prefix, libdir, sbindir, datarootdir
v1: by Hans-Christoph Steiner
v2: by Ferry Huberts
v3: add mandir
Signed-off-by: Ferry Huberts <(spam-protected)>
---
make/Makefile.linux | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/make/Makefile.linux b/make/Makefile.linux
index e73be7c..9953ce2 100644
--- a/make/Makefile.linux
+++ b/make/Makefile.linux
@@ -3,8 +3,21 @@
#
ARCH := $(shell uname -m)
-DESTDIR ?=
-LIBDIR = $(DESTDIR)/usr/lib
+DESTDIR ?=
+
+# define some common (autoconf) names
+prefix ?= /usr/local
+libdir ?= $(prefix)/lib
+sbindir ?= $(prefix)/sbin
+datarootdir ?= $(prefix)/share
+mandir ?= $(datarootdir)/man
+
+# override (some) target directories and names
+LIBDIR = $(DESTDIR)$(libdir)
+SBINDIR = $(DESTDIR)$(sbindir)
+SHAREDIR = $(DESTDIR)$(datarootdir)
+MANDIR = $(DESTDIR)$(mandir)
+
SRCS += $(wildcard src/linux/*.c src/unix/*.c)
HDRS += $(wildcard src/linux/*.h src/unix/*.h)
--
1.7.10.2
More information about the Olsr-dev
mailing list