Skip to content

Commit

Permalink
build liburing if USE_IO_URING is true
Browse files Browse the repository at this point in the history
  • Loading branch information
lipzhu committed Mar 20, 2024
1 parent 0f52884 commit 4395c7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ distclean:
-(cd linenoise && $(MAKE) clean) > /dev/null || true
-(cd lua && $(MAKE) clean) > /dev/null || true
-(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true
-(cd liburing && [ -f Makefile ] && $(MAKE) clean) > /dev/null || true
-(cd hdr_histogram && $(MAKE) clean) > /dev/null || true
-(cd fpconv && $(MAKE) clean) > /dev/null || true
-(rm -f .make-*)
Expand Down Expand Up @@ -116,3 +117,11 @@ jemalloc: .make-prerequisites
cd jemalloc && $(MAKE) lib/libjemalloc.a

.PHONY: jemalloc

liburing: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd liburing && ./configure --cc=gcc --cxx=g++
cd liburing && $(MAKE)


.PHONY: liburing
5 changes: 3 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,9 @@ ifeq ($(uname_S),Linux)
endif

ifeq ($(USE_IO_URING),yes)
FINAL_CFLAGS+= -DUSE_IO_URING
FINAL_LIBS+= -luring
DEPENDENCY_TARGETS+= liburing
FINAL_CFLAGS+= -DUSE_IO_URING -I../deps/liburing/include
FINAL_LIBS := ../deps/liburing/src/liburing.a $(FINAL_LIBS)
endif

# LIBSSL & LIBCRYPTO
Expand Down

0 comments on commit 4395c7e

Please sign in to comment.