From c31c7ec4bcd7bb0d7b28897d730431c02b9d4ea1 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 24 Jul 2019 09:24:50 +0100 Subject: src/Makefile: keep private headers in It is not possible to install barrier.h and compat.h into the top-level /usr/include directly since they are likely to conflict with other software. io_uring.h could be confused with the system's kernel header file. Put liburing headers into so there is no chance of conflicts or confusion. Existing applications continue to build successfully since the location of is unchanged. In-tree examples and tests require modification because src/liburing.h is moved to src/include/liburing.h. Signed-off-by: Stefan Hajnoczi Signed-off-by: Jens Axboe --- src/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index aa93199..cbd3fda 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ includedir ?= $(prefix)/include libdir ?= $(prefix)/lib CFLAGS ?= -g -fomit-frame-pointer -O2 -override CFLAGS += -Wall -I. +override CFLAGS += -Wall -Iinclude/ SO_CFLAGS=-shared -fPIC $(CFLAGS) L_CFLAGS=$(CFLAGS) LINK_FLAGS= @@ -27,7 +27,7 @@ liburing_srcs := setup.c queue.c syscall.c register.c liburing_objs := $(patsubst %.c,%.ol,$(liburing_srcs)) liburing_sobjs := $(patsubst %.c,%.os,$(liburing_srcs)) -$(liburing_objs) $(liburing_sobjs): io_uring.h +$(liburing_objs) $(liburing_sobjs): include/liburing/io_uring.h %.os: %.c $(CC) $(SO_CFLAGS) -c -o $@ $< @@ -46,10 +46,10 @@ $(libname): $(liburing_sobjs) liburing.map $(CC) $(SO_CFLAGS) -Wl,--version-script=liburing.map -Wl,-soname=$(soname) -o $@ $(liburing_sobjs) $(LINK_FLAGS) 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 include/liburing/io_uring.h $(includedir)/liburing/io_uring.h + install -D -m 644 include/liburing.h $(includedir)/liburing.h + install -D -m 644 include/liburing/compat.h $(includedir)/liburing/compat.h + install -D -m 644 include/liburing/barrier.h $(includedir)/liburing/barrier.h install -D -m 644 liburing.a $(libdir)/liburing.a ifeq ($(ENABLE_SHARED),1) install -D -m 755 $(libname) $(libdir)/$(libname) @@ -57,7 +57,7 @@ ifeq ($(ENABLE_SHARED),1) ln -sf $(libname) $(libdir)/liburing.so endif -$(liburing_objs): liburing.h +$(liburing_objs): include/liburing.h clean: rm -f $(all_targets) $(liburing_objs) $(liburing_sobjs) $(soname).new -- cgit