criu/Makefile.install
Kir Kolyshkin 2a9d9c6615 lib Makefiles: integrate
Our whole system of Makefiles are integrated from top to bottom,
meaning:

 1. The paths in sub-makefiles are relative to the top source dir.
 2. Sub-makefiles are executed via make $(build)=<SUBDIR> <TARGET>

For some reason, makefiles under lib/ are the exclusion. Let's fix it.

Side effect: you can now build any individual target under lib/,
for example, "make lib/c/libcriu.so" works.

[v2: use the .FORCE, thanks to dsafonov@]

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-06 20:44:07 +03:00

47 lines
1.1 KiB
Text

#
# Installation paths.
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
SBINDIR := $(PREFIX)/sbin
MANDIR := $(PREFIX)/share/man
LIBDIR := $(PREFIX)/lib
INCLUDEDIR := $(PREFIX)/include
LIBEXECDIR := $(PREFIX)/libexec
#
# For recent Debian/Ubuntu with multiarch support.
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
ifneq "$(DEB_HOST_MULTIARCH)" ""
LIBDIR := $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
else
#
# For most other systems
ifeq "$(shell uname -m)" "x86_64"
LIBDIR := $(PREFIX)/lib64
endif
endif
export PREFIX BINDIR SBINDIR MANDIR
export LIBDIR INCLUDEDIR LIBEXECDIR
install-man:
$(Q) $(MAKE) -C Documentation install
.PHONY: install-man
install-lib: lib
$(Q) $(MAKE) $(build)=lib install
.PHONY: install-lib
install-criu: criu
$(Q) $(MAKE) $(build)=criu install
.PHONY: install-criu
install: install-man install-lib install-criu
@true
.PHONY: install
uninstall:
$(Q) $(MAKE) -C Documentation $@
$(Q) $(MAKE) $(build)=lib $@
$(Q) $(MAKE) -C criu $@
.PHONY: uninstall