summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-23 09:17:02 -0700
committerJens Axboe <axboe@kernel.dk>2021-02-23 09:17:02 -0700
commitf00657f8d313b8d7ee137cdab10ab1e357eaf44c (patch)
treed4a67e46aa6988ee4216a79bd70dd25eed9211de
parentdbc834a965b22e5871abe1580c032d2eecaba657 (diff)
downloadliburing-f00657f8d313b8d7ee137cdab10ab1e357eaf44c.tar.gz
liburing-f00657f8d313b8d7ee137cdab10ab1e357eaf44c.tar.bz2
test/Makefile: ensure dependencies and build of helpers.[ch] is sane
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/Makefile b/test/Makefile
index 6c5c970..69de572 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,8 +1,6 @@
prefix ?= /usr
datadir ?= $(prefix)/share
-helpers = helpers.c
-
INSTALL=install
CPPFLAGS ?=
@@ -134,15 +132,21 @@ test_targets += sq-full-cpp
endif
all_targets += sq-full-cpp
-all: $(test_targets) helpers.o
+helpers = helpers.o
+
+all: ${helpers} $(test_targets)
+
+helpers.o: helpers.c helpers.c
+ $(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
-%: %.c
+%: %.c ${helpers} helpers.h
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -luring $(XCFLAGS) ${helpers}
-%: %.cc
+%: %.cc ${helpers} helpers.h
$(QUIET_CXX)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< -luring $(XCFLAGS) ${helpers}
test_srcs := \
+ helpers.c \
232c93d07b74-test.c \
35fa71a030ca-test.c \
500f9fbadef8-test.c \