1 # Makefile for the UCW Library (c) 1997--2004 Martin Mares <mj@ucw.cz>
5 ifdef CONFIG_UCW_DBTOOL
6 PROGS+=$(o)/lib/db-tool
10 alloc alloc_str realloc mempool mempool-str mempool-fmt \
11 mmap pagecache partmap hashfunc \
13 log log-file proctitle \
16 fastbuf ff-printf ff-utf8 \
17 fb-file carefulio fb-mem fb-temp fb-mmap fb-limfd fb-buffer \
18 str_ctype str_upper str_lower unicode-utf8 stkstring \
19 wildmatch wordsplit ctmatch patimatch patmatch regex \
20 prime random timer log2 randomkey \
23 mainloop exitstatus runcmd sighandler \
24 lizard lizard-safe adler32 \
31 lib.h config.h math.h \
32 mempool.h pagecache.h \
33 sorter.h arraysort.h \
35 unaligned.h prefetch.h \
36 bbuf.h gbuf.h bitarray.h bitsig.h \
37 hashfunc.h hashtable.h \
38 heap.h binheap.h binheap-node.h \
42 fastbuf.h lfs.h ff-utf8.h \
43 chartype.h unicode.h stkstring.h \
44 wildmatch.h patmatch.h \
53 ifdef CONFIG_OWN_REGEX
54 include $(s)/lib/regex/Makefile
57 LIBUCW=$(o)/lib/libucw.$(LS)
58 LIBUCW_MOD_PATHS=$(addprefix $(o)/lib/,$(LIBUCW_MODS))
60 $(o)/lib/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
61 $(o)/lib/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS))
63 $(o)/lib/hashfunc.o $(o)/lib/hashfunc.oo: CFLAGS += -funroll-loops
64 $(o)/lib/lizard.o: CFLAGS += -O6 -funroll-loops
66 $(o)/lib/db-test: $(o)/lib/db-test.o $(LIBUCW)
67 $(o)/lib/db-tool: $(o)/lib/db-tool.o $(LIBUCW)
68 $(o)/lib/conf-test: $(o)/lib/conf-test.o $(LIBUCW)
69 $(o)/lib/sort-test: $(o)/lib/sort-test.o $(LIBUCW)
70 $(o)/lib/lfs-test: $(o)/lib/lfs-test.o $(LIBUCW)
71 $(o)/lib/hash-test: $(o)/lib/hash-test.o $(LIBUCW)
72 $(o)/lib/str-test: $(o)/lib/str-test.o $(LIBUCW)
73 $(o)/lib/asort-test: $(o)/lib/asort-test.o $(LIBUCW)
74 $(o)/lib/redblack-test: $(o)/lib/redblack-test.o $(LIBUCW)
75 $(o)/lib/binheap-test: $(o)/lib/binheap-test.o $(LIBUCW)
76 $(o)/lib/lizard-test: $(o)/lib/lizard-test.o $(LIBUCW)
78 TESTS+=$(addprefix $(o)/lib/,regex.test unicode-utf8.test hash-test.test mempool.test stkstring.test)
79 $(o)/lib/regex.test: $(o)/lib/regex-t
80 $(o)/lib/unicode-utf8.test: $(o)/lib/unicode-utf8-t
81 $(o)/lib/hash-test.test: $(o)/lib/hash-test
82 $(o)/lib/mempool.test: $(o)/lib/mempool-fmt-t $(o)/lib/mempool-str-t
83 $(o)/lib/stkstring.test: $(o)/lib/stkstring-t
85 INCLUDES+=$(o)/lib/.include-stamp
86 $(o)/lib/.include-stamp: $(addprefix $(s)/lib/,$(LIBUCW_INCLUDES))
87 $(s)/build/install-includes $(s)/lib run/include/lib $(?F)
88 touch $(o)/lib/.include-stamp
91 include $(s)/lib/perl/Makefile
94 ifdef CONFIG_UCW_SHELL_UTILS
95 include $(s)/lib/shell/Makefile