Instead of overriding LDFLAGS one by one for tests that need pthread, append -lpthread to LDFLAGS for all tests. This makes the Makefile script simpler. It also saves some hassle when we add a new test that does use pthread. Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> --- test/Makefile | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/test/Makefile b/test/Makefile index 1526776..e43738f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -31,7 +31,7 @@ override CFLAGS += $(XCFLAGS) -DLIBURING_BUILD_TEST override CXXFLAGS += $(XCFLAGS) -std=c++11 -DLIBURING_BUILD_TEST LDFLAGS ?= -override LDFLAGS += -L../src/ -luring +override LDFLAGS += -L../src/ -luring -lpthread test_srcs := \ 232c93d07b74-test.c \ @@ -210,29 +210,6 @@ helpers.o: helpers.c %: %.cc $(helpers) helpers.h ../src/liburing.a $(QUIET_CXX)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(helpers) $(LDFLAGS) - -35fa71a030ca-test: override LDFLAGS += -lpthread -232c93d07b74-test: override LDFLAGS += -lpthread -send_recv: override LDFLAGS += -lpthread -send_recvmsg: override LDFLAGS += -lpthread -poll-link: override LDFLAGS += -lpthread -accept-link: override LDFLAGS += -lpthread -submit-reuse: override LDFLAGS += -lpthread -poll-v-poll: override LDFLAGS += -lpthread -across-fork: override LDFLAGS += -lpthread -ce593a6c480a-test: override LDFLAGS += -lpthread -wakeup-hang: override LDFLAGS += -lpthread -pipe-eof: override LDFLAGS += -lpthread -timeout-new: override LDFLAGS += -lpthread -thread-exit: override LDFLAGS += -lpthread -ring-leak2: override LDFLAGS += -lpthread -poll-mshot-update: override LDFLAGS += -lpthread -exit-no-cleanup: override LDFLAGS += -lpthread -pollfree: override LDFLAGS += -lpthread -msg-ring: override LDFLAGS += -lpthread -recv-msgall: override LDFLAGS += -lpthread -recv-msgall-stream: override LDFLAGS += -lpthread - install: $(test_targets) runtests.sh runtests-loop.sh $(INSTALL) -D -d -m 755 $(datadir)/liburing-test/ $(INSTALL) -D -m 755 $(test_targets) $(datadir)/liburing-test/ -- Ammar Faizi