From a2b3c3f482bde72670aae662ae50d74934faa25a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 9 Dec 2006 19:47:24 +0100 Subject: [PATCH] Added CONFIG_UCW_THREADS. Finally decided that we need threading support in too many libucw modules, so the only sane thing is to link all programs with -lpthread. On the other hand, I would like to keep the possibility of building non-threaded libucw, so I've introduced a new config switch, which is always set for Sherlock. --- lib/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index d26b9c25..2b380b5e 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -29,8 +29,7 @@ LIBUCW_MODS= \ sync \ qache \ string \ - bbuf \ - workqueue asio + bbuf LIBUCW_INCLUDES= \ lib.h config.h math.h \ @@ -53,8 +52,14 @@ LIBUCW_INCLUDES= \ lizard.h \ md5.h \ base64.h base224.h \ - qache.h \ - workqueue.h asio.h + qache.h + +ifdef CONFIG_UCW_THREADS +# Some modules require threading +LIBS+=-lpthread +LIBUCW_MODS+=workqueue asio +LIBUCW_INCLUDES+=workqueue.h asio.h +endif ifdef CONFIG_OWN_REGEX include $(s)/lib/regex/Makefile @@ -83,9 +88,6 @@ $(o)/lib/lizard-test: $(o)/lib/lizard-test.o $(LIBUCW) $(o)/lib/kmp-test: $(o)/lib/kmp-test.o $(LIBUCW) $(LIBCHARSET) $(o)/lib/ipaccess-test: $(o)/lib/ipaccess-test.o $(LIBUCW) -$(o)/lib/workqueue-t: LIBS+=-lpthread # FIXME -$(o)/lib/asio-t: LIBS+=-lpthread # FIXME - TESTS+=$(addprefix $(o)/lib/,regex.test unicode-utf8.test hash-test.test mempool.test stkstring.test slists.test kmp-test.test bbuf.test asio.test) $(o)/lib/regex.test: $(o)/lib/regex-t $(o)/lib/unicode-utf8.test: $(o)/lib/unicode-utf8-t -- 2.39.2