liburing: improve 'make install'
'make install' did not install all the headers necessary to use the library; fix. Additionally allow specifying the install prefix, which was previously hardcoded to /usr. Signed-off-by: Kevin Vigor <kvigor@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
2
Makefile
2
Makefile
@@ -5,7 +5,7 @@ TAG = $(NAME)-$(VERSION)
|
|||||||
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
|
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
|
||||||
|
|
||||||
INSTALL=install
|
INSTALL=install
|
||||||
prefix=/usr
|
prefix ?= /usr
|
||||||
includedir=$(prefix)/include
|
includedir=$(prefix)/include
|
||||||
libdir=$(prefix)/lib
|
libdir=$(prefix)/lib
|
||||||
mandir=$(prefix)/man
|
mandir=$(prefix)/man
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
prefix=/usr
|
prefix ?= /usr
|
||||||
includedir=$(prefix)/include
|
includedir=$(prefix)/include
|
||||||
libdir=$(prefix)/lib
|
libdir=$(prefix)/lib
|
||||||
|
|
||||||
@@ -47,6 +47,9 @@ $(libname): $(liburing_sobjs) liburing.map
|
|||||||
|
|
||||||
install: $(all_targets)
|
install: $(all_targets)
|
||||||
install -D -m 644 io_uring.h $(includedir)/io_uring.h
|
install -D -m 644 io_uring.h $(includedir)/io_uring.h
|
||||||
|
install -D -m 644 liburing.h $(includedir)/liburing.h
|
||||||
|
install -D -m 644 compat.h $(includedir)/compat.h
|
||||||
|
install -D -m 644 barrier.h $(includedir)/barrier.h
|
||||||
install -D -m 644 liburing.a $(libdir)/liburing.a
|
install -D -m 644 liburing.a $(libdir)/liburing.a
|
||||||
ifeq ($(ENABLE_SHARED),1)
|
ifeq ($(ENABLE_SHARED),1)
|
||||||
install -D -m 755 $(libname) $(libdir)/$(libname)
|
install -D -m 755 $(libname) $(libdir)/$(libname)
|
||||||
|
|||||||
Reference in New Issue
Block a user