]> rtime.felk.cvut.cz Git - jailhouse.git/blob - scripts/include.mk
tooling: Silence recursive make calls
[jailhouse.git] / scripts / include.mk
1 #
2 # Jailhouse, a Linux-based partitioning hypervisor
3 #
4 # Copyright (c) Siemens AG, 2014
5 #
6 # Authors:
7 #  Jan Kiszka <jan.kiszka@siemens.com>
8 #  Benjamin Block <bebl@mageta.org>
9 #
10 # This work is licensed under the terms of the GNU GPL, version 2.  See
11 # the COPYING file in the top-level directory.
12 #
13
14 ifeq ($(V),1)
15         Q =
16 else
17         Q = @
18 endif
19
20 prefix      ?= /usr/local
21 exec_prefix ?= $(prefix)
22 sbindir     ?= $(exec_prefix)/sbin
23 libexecdir  ?= $(exec_prefix)/libexec
24 datarootdir ?= $(prefix)/share
25 datadir     ?= $(datarootdir)
26 firmwaredir ?= /lib/firmware
27
28 # all directories listed here will be created using a generic rule below
29 INSTALL_DIRECTORIES := $(prefix)        \
30                        $(exec_prefix)   \
31                        $(sbindir)       \
32                        $(libexecdir)    \
33                        $(datarootdir)   \
34                        $(datadir)       \
35                        $(firmwaredir)
36
37 INSTALL         ?= install
38 INSTALL_PROGRAM ?= $(INSTALL)
39 INSTALL_DATA    ?= $(INSTALL) -m 644
40 INSTALL_DIR     ?= $(INSTALL) -d -m 755
41
42 # creates a rule for each dir in $(INSTALL_DIRECTORIES) under the current
43 # $(DESTDIR) and additionally to that for each of these dirs a subdir named
44 # `jailhouse`. These can be used as prerequirement for install-rules and will
45 # thus be created on demand (or not at all if not used in that way).
46 $(sort $(INSTALL_DIRECTORIES:%=$(DESTDIR)%) \
47         $(INSTALL_DIRECTORIES:%=$(DESTDIR)%/jailhouse)):
48         $(INSTALL_DIR) $@