]> mj.ucw.cz Git - libucw.git/blob - lib/Makefile
Split library functions to libsh and libucw.
[libucw.git] / lib / Makefile
1 # Makefile for the UCW Library (c) 1997--2004 Martin Mares <mj@ucw.cz>
2
3 DIRS+=lib
4 PROGS+=obj/lib/db-tool
5
6 LIBUCW_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         prime random timer log2 randomkey \
18         db \
19         url \
20         mainloop exitstatus runcmd sighandler \
21         lizard lizard-safe lizard-fb adler32 \
22         md5 md5hex \
23         base64 base224 \
24         sync
25
26 ifdef CONFIG_OWN_REGEX
27 include lib/regex/Makefile
28 endif
29
30 LIBUCW=obj/lib/libucw.$(LS)
31 LIBUCW_MOD_PATHS=$(addprefix obj/lib/,$(LIBUCW_MODS)) $(CUSTOM_LIB_MODULES)
32
33 obj/lib/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
34 obj/lib/libucw.so: $(addsuffix .oo,$(LIBUCW_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 $(LIBUCW)
40 obj/lib/db-tool: obj/lib/db-tool.o $(LIBUCW)
41 obj/lib/conf-test: obj/lib/conf-test.o $(LIBUCW)
42 obj/lib/sort-test: obj/lib/sort-test.o $(LIBUCW)
43 obj/lib/lfs-test: obj/lib/lfs-test.o $(LIBUCW)
44 obj/lib/hash-test: obj/lib/hash-test.o $(LIBUCW)
45 obj/lib/str-test: obj/lib/str-test.o $(LIBUCW)
46 obj/lib/asort-test: obj/lib/asort-test.o $(LIBUCW)
47 obj/lib/redblack-test: obj/lib/redblack-test.o $(LIBUCW)
48 obj/lib/binheap-test: obj/lib/binheap-test.o $(LIBUCW)
49 obj/lib/lizard-test: obj/lib/lizard-test.o $(LIBUCW)
50
51 TESTS+=$(addprefix obj/lib/,regex.test unicode-utf8.test hash-test.test)
52 obj/lib/regex.test: obj/lib/regex-t
53 obj/lib/unicode-utf8.test: obj/lib/unicode-utf8-t
54 obj/lib/hash-test.test: obj/lib/hash-test
55
56 include lib/perl/Makefile
57 include lib/shell/Makefile