[Olsr-dev] [PATCH v3 1/1] linux: add support for common (autoconf) make variables (v3)

Ferry Huberts (spam-protected)
Sun Jun 10 12:49:49 CEST 2012


Guys,

What do you think?
Shall we commit this and get it over with?

On 07-06-12 16:11, Ferry Huberts wrote:
> 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)

-- 
Ferry Huberts




More information about the Olsr-dev mailing list