From 70959ae3467fdf39fb4303adfebafcbd00e4f637 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Thu, 10 Apr 2014 12:29:11 +0200 Subject: build: add DESTDIR support This change implements support for specifying an alternative installation destination directory by setting DESTDIR when calling 'make install'. Example: make DESTDIR=/alternative-rootfs install It is particularly useful when cross-compiling and installing in a dedicated directory where for example the rootfs or a build sandbox for the target architecture is mounted. By using DESTDIR you can avoid to mess with PREFIX to include the alternative installation directory! Signed-off-by: Christian Wiese Signed-off-by: Daniel Borkmann --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5eba580..efb9fdc 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,10 @@ PREFIX ?= # Disable if you don't want it CCACHE ?= $(CONFIG_CCACHE) +# Location of an alternative destination directory for installation +# Useful when cross-compiling and installing in a dedicated target directory +DESTDIR= + # Location of installation paths. SBINDIR = $(PREFIX)/usr/sbin INCDIR = $(PREFIX)/usr/include -- cgit v1.2.3-54-g00ecf