]> mj.ucw.cz Git - libucw.git/blob - lib/Makefile
Added overflow-safe string functions allocating everything on the stack.
[libucw.git] / lib / Makefile
1 # Makefile for the UCW Library (c) 1997--2004 Martin Mares <mj@ucw.cz>
2
3 DIRS+=lib
4
5 ifdef CONFIG_UCW_DBTOOL
6 PROGS+=obj/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 sorter bitsig \
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 random timer log2 randomkey \
21         db \
22         url \
23         mainloop exitstatus runcmd sighandler \
24         lizard lizard-safe adler32 \
25         md5 md5hex \
26         base64 base224 \
27         sync
28
29 ifdef CONFIG_OWN_REGEX
30 include lib/regex/Makefile
31 endif
32
33 LIBUCW=obj/lib/libucw.$(LS)
34 LIBUCW_MOD_PATHS=$(addprefix obj/lib/,$(LIBUCW_MODS)) $(CUSTOM_LIB_MODULES)
35
36 obj/lib/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
37 obj/lib/libucw.so: $(addsuffix .oo,$(LIBUCW_MOD_PATHS))
38
39 obj/lib/hashfunc.o obj/lib/hashfunc.oo: CFLAGS += -funroll-loops
40 obj/lib/lizard.o: CFLAGS += -O6 -funroll-loops
41
42 obj/lib/db-test: obj/lib/db-test.o $(LIBUCW)
43 obj/lib/db-tool: obj/lib/db-tool.o $(LIBUCW)
44 obj/lib/conf-test: obj/lib/conf-test.o $(LIBUCW)
45 obj/lib/sort-test: obj/lib/sort-test.o $(LIBUCW)
46 obj/lib/lfs-test: obj/lib/lfs-test.o $(LIBUCW)
47 obj/lib/hash-test: obj/lib/hash-test.o $(LIBUCW)
48 obj/lib/str-test: obj/lib/str-test.o $(LIBUCW)
49 obj/lib/asort-test: obj/lib/asort-test.o $(LIBUCW)
50 obj/lib/redblack-test: obj/lib/redblack-test.o $(LIBUCW)
51 obj/lib/binheap-test: obj/lib/binheap-test.o $(LIBUCW)
52 obj/lib/lizard-test: obj/lib/lizard-test.o $(LIBUCW)
53
54 TESTS+=$(addprefix obj/lib/,regex.test unicode-utf8.test hash-test.test mempool.test stkstring.test)
55 obj/lib/regex.test: obj/lib/regex-t
56 obj/lib/unicode-utf8.test: obj/lib/unicode-utf8-t
57 obj/lib/hash-test.test: obj/lib/hash-test
58 obj/lib/mempool.test: obj/lib/mempool-fmt-t obj/lib/mempool-str-t
59 obj/lib/stkstring.test: obj/lib/stkstring-t
60
61 ifdef CONFIG_UCW_PERL
62 include lib/perl/Makefile
63 endif
64
65 ifdef CONFIG_UCW_SHELL_UTILS
66 include lib/shell/Makefile
67 endif