-LIBSH_MODS=alloc alloc_str ctmatch db fastbuf fb-file fb-mem lists \
- log log2 md5 md5hex mmap pagecache patimatch patmatch pool \
- prime random realloc regex timer url wildmatch \
- wordsplit str_ctype str_upper str_lower bucket conf object sorter \
- finger proctitle ipaccess profile bitsig randomkey \
- hashfunc base64 base224 fb-temp fb-mmap fb-printf urlkey \
- partmap fb-limfd fb-buffer mainloop exitstatus runcmd carefulio
+ifdef CONFIG_UCW_DBTOOL
+PROGS+=$(o)/lib/db-tool
+endif
+
+LIBUCW_MODS= \
+ threads \
+ alloc alloc_str realloc mempool mempool-str mempool-fmt \
+ mmap pagecache partmap hashfunc \
+ lists slists simple-lists sorter bitsig \
+ log log-file proctitle \
+ conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \
+ ipaccess \
+ profile \
+ fastbuf ff-binary ff-string ff-printf ff-utf8 \
+ fb-file carefulio fb-mem fb-temp fb-mmap fb-limfd fb-buffer fb-grow fb-atomic \
+ str_ctype str_upper str_lower unicode-utf8 stkstring \
+ wildmatch wordsplit ctmatch patimatch patmatch regex \
+ prime primetable random timer randomkey \
+ bit-ffs bit-fls \
+ db \
+ url \
+ mainloop exitstatus runcmd sighandler \
+ lizard lizard-safe adler32 \
+ md5 md5hex \
+ base64 base224 \
+ sync \
+ qache \
+ string \
+ bbuf
+
+LIBUCW_INCLUDES= \
+ lib.h config.h threads.h math.h \
+ mempool.h pagecache.h \
+ sorter.h arraysort.h \
+ lists.h clists.h \
+ unaligned.h prefetch.h \
+ bbuf.h gbuf.h bitarray.h bitsig.h \
+ hashfunc.h hashtable.h \
+ heap.h binheap.h binheap-node.h \
+ redblack.h \
+ conf.h getopt.h ipaccess.h \
+ profile.h \
+ fastbuf.h lfs.h ff-utf8.h \
+ chartype.h unicode.h stkstring.h \
+ wildmatch.h patmatch.h \
+ db.h \
+ url.h \
+ mainloop.h \
+ lizard.h \
+ md5.h \
+ base64.h base224.h \
+ qache.h
+
+ifdef CONFIG_UCW_THREADS
+# Some modules require threading
+LIBS+=-lpthread
+LIBUCW_MODS+=threads-conf workqueue
+LIBUCW_INCLUDES+=workqueue.h
+endif