summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Vigor <kvigor@gmail.com>2019-05-06 15:41:29 -0600
committerJens Axboe <axboe@kernel.dk>2019-05-06 15:44:58 -0600
commit54cc960db0bb8fe1d6b2dde1d79d4a24e726ad36 (patch)
treeb23d4a05ab1dad850c63c691b4a44ca8325acd78
parent7b989f34191302011b5b49bf5b26b36862d54056 (diff)
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>
-rw-r--r--Makefile2
-rw-r--r--src/Makefile5
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cbc3504..37ee081 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ TAG = $(NAME)-$(VERSION)
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
INSTALL=install
-prefix=/usr
+prefix ?= /usr
includedir=$(prefix)/include
libdir=$(prefix)/lib
mandir=$(prefix)/man
diff --git a/src/Makefile b/src/Makefile
index 3899680..10965dd 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,4 @@
-prefix=/usr
+prefix ?= /usr
includedir=$(prefix)/include
libdir=$(prefix)/lib
@@ -47,6 +47,9 @@ $(libname): $(liburing_sobjs) liburing.map
install: $(all_targets)
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
ifeq ($(ENABLE_SHARED),1)
install -D -m 755 $(libname) $(libdir)/$(libname)