diff options
author | James Rouzier <rouzier@gmail.com> | 2019-09-21 17:10:07 -0400 |
---|---|---|
committer | James Rouzier <rouzier@gmail.com> | 2019-09-21 17:16:50 -0400 |
commit | e88b74ae6d9a63e3e3b6661777b37a68f24e96e8 (patch) | |
tree | d49bc8f8e25d5efc0156ef0c908c4d9dbee374cc /examples | |
parent | 3ea33cb36070dd6e02f06694b86cb5c889cc7ca9 (diff) | |
download | liburing-e88b74ae6d9a63e3e3b6661777b37a68f24e96e8.tar.gz liburing-e88b74ae6d9a63e3e3b6661777b37a68f24e96e8.tar.bz2 |
Generalize Makefiles for examples and test.
Signed-off-by: James Rouzier <rouzier@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/Makefile b/examples/Makefile index 7b9a605..62f97cc 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,4 +1,5 @@ CFLAGS ?= -g -O2 +XCFLAGS = override CFLAGS += -Wall -D_GNU_SOURCE -L../src/ -I../src/include/ all_targets += io_uring-test io_uring-cp link-cp ucontext-cp @@ -9,14 +10,8 @@ test_srcs := io_uring-test.c io_uring-cp.c link-cp.c test_objs := $(patsubst %.c,%.ol,$(test_srcs)) -io_uring-test: io_uring-test.c - $(CC) $(CFLAGS) -o $@ io_uring-test.c -luring -io_uring-cp: io_uring-cp.c - $(CC) $(CFLAGS) -o $@ io_uring-cp.c -luring -link-cp: link-cp.c - $(CC) $(CFLAGS) -o $@ link-cp.c -luring -ucontext-cp: ucontext-cp.c - $(CC) $(CFLAGS) -o $@ ucontext-cp.c -luring +%: %.c + $(CC) $(CFLAGS) -o $@ $< -luring $(XCFLAGS) clean: rm -f $(all_targets) $(test_objs) |