Files
third_party_liburing/examples/Makefile
T
Dylan Yudaken 12d7e7cf8f add an example for a UDP server
Add an example showing off multishot recvmsg and provided buffer rings.
The application is a UDP echo server that responds to all packets with the
same packet.

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220726121502.1958288-6-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-26 10:22:45 -06:00

42 lines
725 B
Makefile

CPPFLAGS ?=
override CPPFLAGS += -D_GNU_SOURCE -I../src/include/
CFLAGS ?= -g -O2 -Wall
LDFLAGS ?=
override LDFLAGS += -L../src/ -luring
include ../Makefile.quiet
ifneq ($(MAKECMDGOALS),clean)
include ../config-host.mak
endif
example_srcs := \
io_uring-cp.c \
io_uring-test.c \
io_uring-udp.c \
link-cp.c \
poll-bench.c \
send-zerocopy.c
all_targets :=
ifdef CONFIG_HAVE_UCONTEXT
example_srcs += ucontext-cp.c
endif
all_targets += ucontext-cp
example_targets := $(patsubst %.c,%,$(patsubst %.cc,%,$(example_srcs)))
all_targets += $(example_targets)
all: $(example_targets)
%: %.c ../src/liburing.a
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS)
clean:
@rm -f $(all_targets)
.PHONY: all clean