]> rtime.felk.cvut.cz Git - jailhouse.git/blob - scripts/include.mk
jailhouse: inmates: bench: Add -R option -- repeats count.
[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 MAKEFLAGS += --no-print-directory
21
22 prefix      ?= /usr/local
23 exec_prefix ?= $(prefix)
24 sbindir     ?= $(exec_prefix)/sbin
25 libexecdir  ?= $(exec_prefix)/libexec
26 datarootdir ?= $(prefix)/share
27 datadir     ?= $(datarootdir)
28 firmwaredir ?= /lib/firmware
29
30 # all directories listed here will be created using a generic rule below
31 INSTALL_DIRECTORIES := $(prefix)        \
32                        $(exec_prefix)   \
33                        $(sbindir)       \
34                        $(libexecdir)    \
35                        $(datarootdir)   \
36                        $(datadir)       \
37                        $(firmwaredir)
38
39 INSTALL         ?= install
40 INSTALL_PROGRAM ?= $(INSTALL)
41 INSTALL_DATA    ?= $(INSTALL) -m 644
42 INSTALL_DIR     ?= $(INSTALL) -d -m 755
43
44 # creates a rule for each dir in $(INSTALL_DIRECTORIES) under the current
45 # $(DESTDIR) and additionally to that for each of these dirs a subdir named
46 # `jailhouse`. These can be used as prerequirement for install-rules and will
47 # thus be created on demand (or not at all if not used in that way).
48 $(sort $(INSTALL_DIRECTORIES:%=$(DESTDIR)%) \
49         $(INSTALL_DIRECTORIES:%=$(DESTDIR)%/jailhouse)):
50         $(INSTALL_DIR) $@
51
52 ARCH ?= $(shell uname -m)
53 ifeq ($(ARCH),x86_64)
54         ARCH = x86
55 endif