diff options
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile index 34dd3b8e4..df2907ede 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -2,6 +2,7 @@ include $(__nmk_dir)/include.mk include $(__nmk_dir)/macro.mk CRIU_SO := libcriu.so +UAPI_HEADERS := c/criu.h ../images/rpc.proto # # C language bindings. @@ -28,6 +29,7 @@ clean: $(call msg-clean, lib-c) $(Q) $(MAKE) $(build)=c $@ $(Q) $(RM) c/$(CRIU_SO) + $(Q) $(RM) c/criu.pc $(call msg-clean, lib-py) $(Q) $(MAKE) -C pycriu/images $@ @@ -35,4 +37,20 @@ all: $(PHONY) @true PHONY += all +install: lib-c lib-py ../crit/crit c/criu.pc.in + $(E) " INSTALL " $(CRIU_SO) + $(Q) mkdir -p $(DESTDIR)$(LIBDIR) + $(Q) install -m 755 c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR) + $(Q) ln -fns $(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR) + $(Q) ln -fns $(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR) $(DESTDIR)$(LIBDIR)/$(CRIU_SO) + $(Q) mkdir -p $(DESTDIR)$(INCLUDEDIR) + $(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR) + $(E) " INSTALL " pkgconfig/criu.pc + $(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig + $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc + $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig + $(E) " INSTALL " crit + $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) +.PHONY: install + .PHONY: $(PHONY) clean |