]> mj.ucw.cz Git - libucw.git/blob - lib/Makefile
main_get_timer() made public.
[libucw.git] / lib / Makefile
1 # Makefile for the UCW Library (c) 1997--2005 Martin Mares <mj@ucw.cz>
2
3 DIRS+=lib
4
5 ifdef CONFIG_UCW_DBTOOL
6 PROGS+=$(o)/lib/db-tool
7 endif
8
9 LIBUCW_MODS= \
10         alloc alloc_str realloc mempool mempool-str mempool-fmt \
11         mmap pagecache partmap hashfunc \
12         lists slists sorter bitsig kmp \
13         log log-file proctitle \
14         conf ipaccess \
15         profile \
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 primetable random timer randomkey \
21         bit-ffs bit-fls \
22         db \
23         url \
24         mainloop exitstatus runcmd sighandler \
25         lizard lizard-safe adler32 \
26         md5 md5hex \
27         base64 base224 \
28         sync \
29         qache
30
31 LIBUCW_INCLUDES= \
32         lib.h config.h math.h \
33         mempool.h pagecache.h \
34         sorter.h arraysort.h \
35         lists.h clists.h \
36         unaligned.h prefetch.h \
37         bbuf.h gbuf.h bitarray.h bitsig.h \
38         hashfunc.h hashtable.h \
39         heap.h binheap.h binheap-node.h \
40         redblack.h \
41         conf.h ipaccess.h \
42         profile.h \
43         fastbuf.h lfs.h ff-utf8.h \
44         chartype.h unicode.h stkstring.h \
45         wildmatch.h patmatch.h \
46         db.h \
47         url.h \
48         mainloop.h \
49         lizard.h \
50         md5.h \
51         base64.h base224.h \
52         qache.h
53
54 ifdef CONFIG_OWN_REGEX
55 include $(s)/lib/regex/Makefile
56 endif
57
58 LIBUCW=$(o)/lib/libucw.$(LS)
59 LIBUCW_MOD_PATHS=$(addprefix $(o)/lib/,$(LIBUCW_MODS))
60
61 $(o)/lib/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
62 $(o)/lib/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS))
63
64 $(o)/lib/hashfunc.o $(o)/lib/hashfunc.oo: CFLAGS += -funroll-loops
65 $(o)/lib/lizard.o: CFLAGS += $(COPT2) -funroll-loops
66
67 $(o)/lib/db-test: $(o)/lib/db-test.o $(LIBUCW)
68 $(o)/lib/db-tool: $(o)/lib/db-tool.o $(LIBUCW)
69 $(o)/lib/conf-test: $(o)/lib/conf-test.o $(LIBUCW)
70 $(o)/lib/sort-test: $(o)/lib/sort-test.o $(LIBUCW)
71 $(o)/lib/lfs-test: $(o)/lib/lfs-test.o $(LIBUCW)
72 $(o)/lib/hash-test: $(o)/lib/hash-test.o $(LIBUCW)
73 $(o)/lib/str-test: $(o)/lib/str-test.o $(LIBUCW)
74 $(o)/lib/asort-test: $(o)/lib/asort-test.o $(LIBUCW)
75 $(o)/lib/redblack-test: $(o)/lib/redblack-test.o $(LIBUCW)
76 $(o)/lib/binheap-test: $(o)/lib/binheap-test.o $(LIBUCW)
77 $(o)/lib/lizard-test: $(o)/lib/lizard-test.o $(LIBUCW)
78
79 TESTS+=$(addprefix $(o)/lib/,regex.test unicode-utf8.test hash-test.test mempool.test stkstring.test slists.test)
80 $(o)/lib/regex.test: $(o)/lib/regex-t
81 $(o)/lib/unicode-utf8.test: $(o)/lib/unicode-utf8-t
82 $(o)/lib/hash-test.test: $(o)/lib/hash-test
83 $(o)/lib/mempool.test: $(o)/lib/mempool-fmt-t $(o)/lib/mempool-str-t
84 $(o)/lib/stkstring.test: $(o)/lib/stkstring-t
85 $(o)/lib/bitops.test: $(o)/lib/bit-ffs-t $(o)/lib/bit-fls-t
86 $(o)/lib/slists.test: $(o)/lib/slists-t
87
88 INCLUDES+=$(o)/lib/.include-stamp
89 $(o)/lib/.include-stamp: $(addprefix $(s)/lib/,$(LIBUCW_INCLUDES))
90         $(s)/build/install-includes $(s)/lib run/include/lib $(?F)
91         touch $(o)/lib/.include-stamp
92
93 ifdef CONFIG_UCW_PERL
94 include $(s)/lib/perl/Makefile
95 endif
96
97 ifdef CONFIG_UCW_SHELL_UTILS
98 include $(s)/lib/shell/Makefile
99 endif