X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=images%2FMakefile;h=2a43373e99bc0accdeb4767091044391e45aed9d;hb=27279fcb63d805cc21d3c5cfa318d629ee02575a;hp=30392a75a4df5bcbc2414dc68a6cacdf7be566a4;hpb=580fd9c443c2a4faba5a703d49f366de5d3968c9;p=libucw.git diff --git a/images/Makefile b/images/Makefile index 30392a75..2a43373e 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/ucw-image-tool $(o)/images/ucw-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= @@ -15,13 +15,20 @@ else LIBIMAGES_DEPS=$(LIBUCW) endif +ifdef CONFIG_STATIC_PIC +LIBIMAGES_DEPS+=$(o)/images/libucw-images-pic.a +endif +ifdef CONFIG_INSTALL_API +$(o)/images/libucw-images.pc: $(addprefix $(o)/images/libucw-images,.a -pic.a .so) +endif + ifdef CONFIG_IMAGES_DUP -PROGS+=$(o)/images/image-dup-test +LIBIMAGES_PROGS+=$(o)/images/ucw-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/ucw-image-sim-test LIBIMAGES_MODS+=sig-cmp endif ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),) @@ -57,14 +64,19 @@ LIBIMAGES_LIBS+=$(MAGICK_LIBS) $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS) endif -$(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: $(LIBUCW) +PROGS+=$(LIBIMAGES_PROGS) +CONFIGS+=$(LIBIMAGES_CONFIGS) -$(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) -$(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES) -$(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) -$(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) +$(o)/images/libucw-images.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) +$(o)/images/libucw-images-pic.a: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) +$(o)/images/libucw-images.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS))) +$(o)/images/libucw-images.so: SONAME_SUFFIX=.$(UCW_ABI_MAJOR) +$(o)/images/libucw-images.pc: $(LIBIMAGES_DEPS) + +$(o)/images/ucw-image-tool: $(o)/images/ucw-image-tool.o $(LIBIMAGES) +$(o)/images/ucw-color-tool: $(o)/images/ucw-color-tool.o $(LIBIMAGES) +$(o)/images/ucw-image-dup-test: $(o)/images/ucw-image-dup-test.o $(LIBIMAGES) +$(o)/images/ucw-image-sim-test: $(o)/images/ucw-image-sim-test.o $(LIBIMAGES) TESTS+=$(o)/images/image-test.test $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) @@ -74,6 +86,30 @@ TESTS+=$(o)/images/color.test $(o)/images/color-t: $(LIBIMAGES) $(o)/images/color.test: $(o)/images/color-t -INCLUDES+=$(o)/images/.include-stamp +API_LIBS+=libucw-images +API_INCLUDES+=$(o)/images/.include-stamp $(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES)) $(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: + 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) + +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 + install -m 644 run/lib/pkgconfig/libucw-images.pc $(DESTDIR)$(INSTALL_PKGCONFIG_DIR) + 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) + #install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR) + #install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(LIBIMAGES_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR) + +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 install-libucw-images-api install-libucw-images-utils