]> mj.ucw.cz Git - libucw.git/commitdiff
Libimages installs
authorMichal Vaner <vorner@ucw.cz>
Sun, 5 Oct 2008 08:19:40 +0000 (10:19 +0200)
committerMichal Vaner <vorner@ucw.cz>
Wed, 8 Oct 2008 12:57:14 +0000 (14:57 +0200)
images/Makefile

index 1b9111e431d68b5003fdcf0f95c20f8397c4e1a8..cc571e623705f722a725ad14c40722dc6413d24e 100644 (file)
@@ -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