From: Michal Vaner Date: Sun, 5 Oct 2008 08:19:40 +0000 (+0200) Subject: Libimages installs X-Git-Tag: holmes-import~227^2~5^2~32 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=60845a95a7b99e52d5d8450fa8a9f1877eebd60c;p=libucw.git Libimages installs --- diff --git a/images/Makefile b/images/Makefile index 1b9111e4..cc571e62 100644 --- a/images/Makefile +++ b/images/Makefile @@ -2,8 +2,8 @@ DIRS+=images -PROGS+=$(o)/images/image-tool $(o)/images/color-tool -CONFIGS+=images +LIBIMAGES_PROGS=$(o)/images/image-tool $(o)/images/color-tool +LIBIMAGES_CONFIGS+=images LIBIMAGES_MODS=math config context image scale color io-main LIBIMAGES_INCLUDES=images.h error.h color.h math.h export LIBIMAGES_LIBS= @@ -16,12 +16,12 @@ LIBIMAGES_DEPS=$(LIBUCW) endif ifdef CONFIG_IMAGES_DUP -PROGS+=$(o)/images/image-dup-test +LIBIMAGES_PROGS+=$(o)/images/image-dup-test LIBIMAGES_MODS+=dup-init dup-cmp LIBIMAGES_INCLUDES+=duplicates.h endif ifdef CONFIG_IMAGES_SIM -PROGS+=$(o)/images/image-sim-test +LIBIMAGES_PROGS+=$(o)/images/image-sim-test LIBIMAGES_MODS+=sig-cmp endif ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),) @@ -57,6 +57,9 @@ LIBIMAGES_LIBS+=$(MAGICK_LIBS) $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS) endif +PROGS+=$(LIBIMAGES_PROGS) +CONFIGS+=$(LIBIMAGES_CONFIGS) + $(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) $(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) $(o)/images/libimages.pc: $(LIBIMAGES_DEPS) @@ -79,3 +82,20 @@ API_INCLUDES+=$(o)/images/.include-stamp $(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES)) $(o)/images/.include-stamp: IDST=images run/lib/pkgconfig/libimages.pc: $(o)/images/libimages.pc + +ifdef CONFIG_SHARED +LIBIMAGES_NAME=libimages.so +else +LIBIMAGES_NAME=libimages.a +endif + +INSTALL_TARGETS+=install-libimages +install-libimages: + install -d -m 755 $(addprefix $(DESTDIR),$(INSTALL_BIN_DIR) $(INSTALL_INCLUDE_DIR)/images $(INSTALL_LIB_DIR) $(INSTALL_PKGCONFIG_DIR) $(INSTALL_CONFIG_DIR)) + install -m 755 $(LIBIMAGES_PROGS) $(DESTDIR)$(INSTALL_BIN_DIR) + install -m 644 $(addprefix run/include/images/,$(LIBIMAGES_INCLUDES)) $(DESTDIR)$(INSTALL_INCLUDE_DIR)/images + install -m 644 run/lib/$(LIBIMAGES_NAME) $(DESTDIR)$(INSTALL_LIB_DIR) + install -m 644 run/lib/pkgconfig/libimages.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) + install -m 644 $(addprefix run/cf/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) + +.PHONY: install-libimages