include $(BUILDSYS)/Makebottom
ifndef CONFIG_LOCAL
-install: all $(INSTALL_TARGETS)
+install: all $(INSTALL_TARGETS) install-libs install-api install-configs install-utils
+
+install-libs: $(INSTALL_LIB_TARGETS)
+install-api: $(INSTALL_API_TARGETS)
/sbin/ldconfig -n $(DESTDIR)$(INSTALL_LIB_DIR)
+install-configs: $(INSTALL_CONFIG_TARGETS)
+install-utils: $(INSTALL_UTILS_TARGETS)
+.PHONY: install-libs install-api install-configs install-utils
else
install:
@echo "Nothing to install, this is a local build." && false
clean::
rm -f $(s)/charset/misc/u-*
-INSTALL_TARGETS+=install-libucw-charset install-libucw-charset-api install-libucw-charset-utils
-
-install-libucw-charset:
+INSTALL_LIB_TARGETS+=install-libucw-charset-lib
+install-libucw-charset-lib:
install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-charset.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so.$(UCW_ABI_VERSION)
+.PHONY: install-libucw-charset-lib
+INSTALL_API_TARGETS+=install-libucw-charset-api
install-libucw-charset-api:
install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
install -m 644 $(addprefix run/include/charset/,$(LIBCHARSET_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/charset
ln -sf libucw-charset.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-charset.so
install -m 644 run/lib/libucw-charset.a $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-charset-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
+.PHONY: install-libucw-charset-api
+INSTALL_UTILS_TARGETS+=install-libucw-charset-utils
install-libucw-charset-utils:
install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
install -m 755 $(LIBCHARSET_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
-
-.PHONY: install-libucw-charset install-libucw-charset-api install-libucw-charset-utils
+.PHONY: install-libucw-charset-utils
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: LibUCW library
+Description: LibUCW libraries
Package: libucw-dev
Section: libdevel
dh_testroot
dh_clean -k
dh_installdirs
- $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-$(UCW_ABI_MAJOR) $(addprefix install-,libucw libucw-charset libucw-xml libucw-images)
- $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-dev $(addprefix install-,$(addsuffix -api,libucw libucw-charset libucw-xml libucw-images))
- $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-ucw-utils install-ucw-shell install-libucw-charset-utils install-libucw-images-utils
+ $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-$(UCW_ABI_MAJOR) install-libs
+ $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-dev install-api
+ $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-utils
$(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-libucw-docs
- $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-libucw-config install-libucw-images-config
+ $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-configs
install -d -m 755 $(CURDIR)/debian/libucw-doc/usr/share/doc/libucw/examples
cp -r examples/external $(CURDIR)/debian/libucw-doc/usr/share/doc/libucw/examples/program
$(o)/images/.include-stamp: IDST=images
run/lib/pkgconfig/libucw-images.pc: $(o)/images/libucw-images.pc
-INSTALL_TARGETS+=install-libucw-images install-libucw-images-api install-libucw-images-utils install-libucw-images-config
-
-install-libucw-images:
+INSTALL_LIB_TARGETS+=install-libucw-images-lib
+install-libucw-images-lib:
install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-images.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so.$(UCW_ABI_VERSION)
+.PHONY: install-libucw-images-lib
+INSTALL_API_TARGETS+=install-libucw-images-api
install-libucw-images-api:
install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR))
install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images
ln -sf libucw-images.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-images.so
install -m 644 run/lib/libucw-images.a $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-images-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
+.PHONY: install-libucw-images-api
+INSTALL_UTILS_TARGETS+=install-libucw-images-utils
install-libucw-images-utils:
install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
+.PHONY: install-libucw-images-utils
+INSTALL_CONFIG_TARGETS+=install-libucw-images-config
install-libucw-images-config:
install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR)
install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR)
-
-.PHONY: install-libucw-images install-libucw-images-api install-libucw-images-utils install-libucw-images-config
+.PHONY: install-libucw-images-config
strtonum.h \
resource.h trans.h \
daemon.h \
- signames.h
+ signames.h \
+ sighandler.h
ifdef CONFIG_UCW_THREADS
# Some modules require threading
CONFIGS+=libucw
-INSTALL_TARGETS+=install-libucw install-libucw-api install-libucw-config
-
-install-libucw:
+INSTALL_LIB_TARGETS+=install-libucw-lib
+install-libucw-lib:
install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw.so.$(UCW_ABI_VERSION)
+.PHONY: install-libucw-lib
+INSTALL_API_TARGETS+=install-libucw-api
install-libucw-api:
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_MAIN_INCLUDES) autoconf.h config.h) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/
ln -sf libucw.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw.so
install -m 644 run/lib/libucw.a $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
+.PHONY: install-libucw-api
+INSTALL_CONFIG_TARGETS+=install-libucw-config
install-libucw-config:
install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR)
install -m 644 run/$(CONFIG_DIR)/libucw $(DESTDIR)$(INSTALL_CONFIG_DIR)
-
-.PHONY: install-libucw install-libucw-api install-libucw-config
+.PHONY: install-libucw-config
$(o)/ucw/shell/config.test: $(o)/ucw/shell/ucw-config
-INSTALL_TARGETS+=install-ucw-shell
+INSTALL_UTILS_TARGETS+=install-ucw-shell
install-ucw-shell:
install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
install -m 755 $(UCW_SHELL_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR)
-
.PHONY: install-ucw-shell
$(o)/ucw/sorter/sort-test.test: $(o)/ucw/sorter/sort-test
$(o)/ucw/sorter/sort-test: $(o)/ucw/sorter/sort-test.o $(LIBUCW)
-INSTALL_TARGETS+=install-ucw-sorter
-install-ucw-sorter:
+INSTALL_API_TARGETS+=install-ucw-sorter-api
+install-ucw-sorter-api:
install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/sorter
install -m 644 $(addprefix run/include/ucw/,$(LIBUCW_SORTER_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/ucw/sorter/
-
-.PHONY: install-ucw-sorter
+.PHONY: install-ucw-sorter-api
TESTS+=$(o)/ucw/utils/basecode.test
$(o)/ucw/utils/basecode.test: $(o)/ucw/utils/ucw-basecode
-INSTALL_TARGETS+=install-ucw-utils
+INSTALL_UTILS_TARGETS+=install-ucw-utils
install-ucw-utils:
install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
install -m 755 $(UCW_UTILS) $(DESTDIR)$(INSTALL_BIN_DIR)
-
.PHONY: install-ucw-utils
$(o)/xml/.include-stamp: IDST=xml
run/lib/pkgconfig/libucw-xml.pc: $(o)/xml/libucw-xml.pc
-INSTALL_TARGETS+=install-libucw-xml install-libucw-xml-api
-
-install-libucw-xml:
+INSTALL_LIB_TARGETS+=install-libucw-xml-lib
+install-libucw-xml-lib:
install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-xml.so.$(UCW_ABI_MAJOR) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so.$(UCW_ABI_VERSION)
+.PHONY: install-libucw-xml-lib
+INSTALL_API_TARGETS+=install-libucw-xml-api
install-libucw-xml-api:
install -d -m 755 $(DESTDIR)$(INSTALL_INCLUDE_DIR)/xml $(DESTDIR)$(INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
install -m 644 run/lib/pkgconfig/libucw-xml.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR)
ln -sf libucw-xml.so.$(UCW_ABI_VERSION) $(DESTDIR)$(INSTALL_LIB_DIR)/libucw-xml.so
install -m 644 run/lib/libucw-xml.a $(DESTDIR)$(INSTALL_LIB_DIR)
install -m 644 run/lib/libucw-xml-pic.a $(DESTDIR)$(INSTALL_LIB_DIR)
-
-.PHONY: install-libucw-xml install-libucw-xml-api
+.PHONY: install-libucw-xml-api