- log log-file proctitle \
- conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \
+ log log-stream log-file log-syslog log-conf tbf \
+ conf-context conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section conf-getopt \
- mainloop exitstatus runcmd sighandler \
- lizard lizard-safe adler32 \
- md5 sha1 sha1-hmac \
+ mainloop main-block main-rec \
+ proctitle exitstatus runcmd \
+ lizard lizard-safe adler32 sighandler \
+ md5 sha1 sha1-hmac crc crc-tables \
- sync \
- qache \
- string str-esc str-split str-match str-imatch str-hex \
- bbuf \
- getopt
-
-LIBUCW_LOCAL_INCLUDES= \
- lib.h config.h threads.h \
+ io-careful io-sync io-mmap io-size \
+ string str-esc str-split str-match str-imatch str-hex str-fix \
+ bbuf gary \
+ getopt \
+ strtonum \
+ resource trans res-fd res-mem res-subpool res-mempool res-eltpool \
+ daemon daemon-ctrl \
+ signames
+
+LIBUCW_MAIN_INCLUDES= \
+ lib.h log.h threads.h time.h \
LIBUCW_MOD_PATHS=$(addprefix $(o)/ucw/,$(LIBUCW_MODS))
$(o)/ucw/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
LIBUCW_MOD_PATHS=$(addprefix $(o)/ucw/,$(LIBUCW_MODS))
$(o)/ucw/libucw.a: $(addsuffix .o,$(LIBUCW_MOD_PATHS))
$(o)/ucw/hashfunc.o $(o)/ucw/hashfunc.oo: CFLAGS += -funroll-loops
$(o)/ucw/lizard.o: CFLAGS += $(COPT2) -funroll-loops
$(o)/ucw/conf-test: $(o)/ucw/conf-test.o $(LIBUCW)
$(o)/ucw/hashfunc.o $(o)/ucw/hashfunc.oo: CFLAGS += -funroll-loops
$(o)/ucw/lizard.o: CFLAGS += $(COPT2) -funroll-loops
$(o)/ucw/conf-test: $(o)/ucw/conf-test.o $(LIBUCW)
$(o)/ucw/hash-test: $(o)/ucw/hash-test.o $(LIBUCW)
$(o)/ucw/hashfunc-test: $(o)/ucw/hashfunc-test.o $(LIBUCW)
$(o)/ucw/asort-test: $(o)/ucw/asort-test.o $(LIBUCW)
$(o)/ucw/redblack-test: $(o)/ucw/redblack-test.o $(LIBUCW)
$(o)/ucw/binheap-test: $(o)/ucw/binheap-test.o $(LIBUCW)
$(o)/ucw/lizard-test: $(o)/ucw/lizard-test.o $(LIBUCW)
$(o)/ucw/hash-test: $(o)/ucw/hash-test.o $(LIBUCW)
$(o)/ucw/hashfunc-test: $(o)/ucw/hashfunc-test.o $(LIBUCW)
$(o)/ucw/asort-test: $(o)/ucw/asort-test.o $(LIBUCW)
$(o)/ucw/redblack-test: $(o)/ucw/redblack-test.o $(LIBUCW)
$(o)/ucw/binheap-test: $(o)/ucw/binheap-test.o $(LIBUCW)
$(o)/ucw/lizard-test: $(o)/ucw/lizard-test.o $(LIBUCW)
-$(o)/ucw/kmp-test: $(o)/ucw/kmp-test.o $(LIBUCW) $(LIBCHARSET)
+$(o)/ucw/kmp-test: $(o)/ucw/kmp-test.o $(LIBUCW)
+$(o)/ucw/strtonum-test: $(o)/ucw/strtonum-test.o $(LIBUCW)
+ifdef CONFIG_CHARSET
+$(o)/ucw/kmp-test: $(LIBCHARSET)
+endif
$(o)/ucw/ipaccess-test: $(o)/ucw/ipaccess-test.o $(LIBUCW)
$(o)/ucw/trie-test: $(o)/ucw/trie-test.o $(LIBUCW)
TESTS+=$(addprefix $(o)/ucw/,regex.test unicode.test hash-test.test mempool.test stkstring.test \
$(o)/ucw/ipaccess-test: $(o)/ucw/ipaccess-test.o $(LIBUCW)
$(o)/ucw/trie-test: $(o)/ucw/trie-test.o $(LIBUCW)
TESTS+=$(addprefix $(o)/ucw/,regex.test unicode.test hash-test.test mempool.test stkstring.test \
fb-socket.test trie-test.test string.test sha1.test asort-test.test binheap-test.test \
redblack-test.test fb-file.test fb-grow.test fb-pool.test fb-atomic.test \
fb-socket.test trie-test.test string.test sha1.test asort-test.test binheap-test.test \
redblack-test.test fb-file.test fb-grow.test fb-pool.test fb-atomic.test \
$(o)/ucw/getopt.test: $(o)/ucw/getopt-t
$(o)/ucw/ff-unicode.test: $(o)/ucw/ff-unicode-t
$(o)/ucw/eltpool.test: $(o)/ucw/eltpool-t
$(o)/ucw/getopt.test: $(o)/ucw/getopt-t
$(o)/ucw/ff-unicode.test: $(o)/ucw/ff-unicode-t
$(o)/ucw/eltpool.test: $(o)/ucw/eltpool-t
$(o)/ucw/sha1.test: $(o)/ucw/sha1-t $(o)/ucw/sha1-hmac-t
$(o)/ucw/trie-test.test: $(o)/ucw/trie-test
$(o)/ucw/asort-test.test: $(o)/ucw/asort-test
$(o)/ucw/binheap-test.test: $(o)/ucw/binheap-test
$(o)/ucw/redblack-test.test: $(o)/ucw/redblack-test
$(o)/ucw/sha1.test: $(o)/ucw/sha1-t $(o)/ucw/sha1-hmac-t
$(o)/ucw/trie-test.test: $(o)/ucw/trie-test
$(o)/ucw/asort-test.test: $(o)/ucw/asort-test
$(o)/ucw/binheap-test.test: $(o)/ucw/binheap-test
$(o)/ucw/redblack-test.test: $(o)/ucw/redblack-test
$(addprefix $(o)/ucw/fb-,file.test grow.test pool.test socket.test atomic.test \
limfd.test temp.test mem.test buffer.test mmap.test): %.test: %-t
$(addprefix $(o)/ucw/fb-,file.test grow.test pool.test socket.test atomic.test \
limfd.test temp.test mem.test buffer.test mmap.test): %.test: %-t
ifdef CONFIG_UCW_THREADS
TESTS+=$(addprefix $(o)/ucw/,asio.test)
$(o)/ucw/asio.test: $(o)/ucw/asio-t
endif
ifdef CONFIG_UCW_THREADS
TESTS+=$(addprefix $(o)/ucw/,asio.test)
$(o)/ucw/asio.test: $(o)/ucw/asio-t
endif
+# The version of autoconf.h that is a part of the public API needs to have
+# the internal symbols filtered out, so we generate ucw/autoconf.h in the
+# configure script and let the public config.h refer to <ucw/autoconf.h>
+# instead of plain "autoconf.h".
+
-$(o)/ucw/.include-stamp: $(addprefix $(s)/ucw/,$(LIBUCW_INCLUDES)) obj/autoconf.h
- $(Q)$(s)/build/install-includes $(<D) run/include/ucw $(LIBUCW_INCLUDES)
- $(Q)$(s)/build/install-includes obj run/include/ucw autoconf.h
+$(o)/ucw/.include-stamp: $(addprefix $(s)/ucw/,$(LIBUCW_INCLUDES)) $(o)/ucw/autoconf.h
+ $(Q)$(BUILDSYS)/install-includes $(<D) run/include/ucw $(LIBUCW_INCLUDES)
+ $(Q)$(BUILDSYS)/install-includes $(o)/ucw run/include/ucw autoconf.h
+ $(Q)sed -e 's/^#include "autoconf\.h"/#include <ucw\/autoconf.h>/' <$(s)/ucw/config.h >run/include/ucw/config.h
- install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
- install -m 644 $(addprefix run/include/ucw/,$(LIBUCW_LOCAL_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/
- sed -e 's/^#include .autoconf\.h./#include <ucw\/autoconf.h>/' <run/include/ucw/config.h >$(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/config.h
+ install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/ $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) $(DESTDIR)$(INSTALL_CONFIG_DIR)
+ install -m 644 $(addprefix run/include/ucw/,$(LIBUCW_MAIN_INCLUDES) autoconf.h config.h) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/
- install -m 644 run/lib/$(LIBUCW_NAME) $(DESTDIR)$(INSTALL_LIB_DIR)
+ install -m 644 run/lib/libucw.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+ifdef CONFIG_STATIC_PIC
+ install -m 644 run/lib/libucw-pic.$(LS) $(DESTDIR)$(INSTALL_LIB_DIR)
+endif
+ install -m 644 run/$(CONFIG_DIR)/libucw $(DESTDIR)$(INSTALL_CONFIG_DIR)