]> mj.ucw.cz Git - libucw.git/blob - lib/Makefile
dcd7e6fff6a57a743db523bdc57bca42d79b4a94
[libucw.git] / lib / Makefile
1 # Makefile for the Sherlock Library (c) 1997--2004 Martin Mares <mj@ucw.cz>
2
3 DIRS+=lib
4 PROGS+=obj/lib/db-tool obj/lib/buckettool
5
6 LIBSH_MODS= \
7         alloc alloc_str realloc mempool mempool-str \
8         mmap pagecache partmap hashfunc \
9         lists sorter bitsig \
10         log log-file proctitle \
11         conf ipaccess \
12         profile \
13         fastbuf ff-printf ff-utf8 \
14         fb-file carefulio fb-mem fb-temp fb-mmap fb-limfd fb-buffer \
15         str_ctype str_upper str_lower unicode-utf8 \
16         wildmatch wordsplit ctmatch patimatch patmatch regex \
17         bucket object buck2obj obj2buck \
18         prime random timer log2 randomkey \
19         db \
20         url urlkey finger \
21         mainloop exitstatus runcmd sighandler \
22         lizard lizard-safe lizard-fb adler32 \
23         md5 md5hex \
24         base64 base224 \
25         sync
26
27 ifdef CONFIG_OWN_REGEX
28 include lib/regex/Makefile
29 endif
30
31 LIBSH_MOD_PATHS=$(addprefix obj/lib/,$(LIBSH_MODS)) $(CUSTOM_LIB_MODULES)
32
33 obj/lib/libsh.a: $(addsuffix .o,$(LIBSH_MOD_PATHS))
34 obj/lib/libsh.so: $(addsuffix .oo,$(LIBSH_MOD_PATHS))
35
36 obj/lib/hashfunc.o obj/lib/hashfunc.oo: CFLAGS += -funroll-loops
37 obj/lib/lizard.o: CFLAGS += -O6 -funroll-loops
38
39 obj/lib/db-test: obj/lib/db-test.o $(LIBSH)
40 obj/lib/db-tool: obj/lib/db-tool.o $(LIBSH)
41 obj/lib/buckettool: obj/lib/buckettool.o $(LIBSH)
42 obj/lib/conf-test: obj/lib/conf-test.o $(LIBSH)
43 obj/lib/sort-test: obj/lib/sort-test.o $(LIBSH)
44 obj/lib/lfs-test: obj/lib/lfs-test.o $(LIBSH)
45 obj/lib/hash-test: obj/lib/hash-test.o $(LIBSH)
46 obj/lib/str-test: obj/lib/str-test.o $(LIBSH)
47 obj/lib/asort-test: obj/lib/asort-test.o $(LIBSH)
48 obj/lib/redblack-test: obj/lib/redblack-test.o $(LIBSH)
49 obj/lib/binheap-test: obj/lib/binheap-test.o $(LIBSH)
50 obj/lib/lizard-test: obj/lib/lizard-test.o $(LIBSH)
51
52 TESTS+=$(addprefix obj/lib/,regex.test unicode-utf8.test hash-test.test)
53 obj/lib/regex.test: obj/lib/regex-t
54 obj/lib/unicode-utf8.test: obj/lib/unicode-utf8-t
55 obj/lib/hash-test.test: obj/lib/hash-test
56
57 include lib/perl/Makefile
58 include lib/shell/Makefile