X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=images%2FMakefile;h=2a43373e99bc0accdeb4767091044391e45aed9d;hb=27279fcb63d805cc21d3c5cfa318d629ee02575a;hp=8b7efbdd5c8842da108cb3cc3aa7be29b14ffad0;hpb=c08e5b6cf16ac7fdf810a142bf2f1f48951ba3fc;p=libucw.git diff --git a/images/Makefile b/images/Makefile index 8b7efbdd..2a43373e 100644 --- a/images/Makefile +++ b/images/Makefile @@ -1,25 +1,41 @@ -# Testing dir... code will be moved somewhere else... maybe to trash :-) +# Makefile for the Image Library (c) 2006 Pavel Charvat DIRS+=images -PROGS+=$(o)/images/image-tool -CONFIGS+=images -LIBIMAGES_MODS=math config image scale color alpha io-main object +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= + +ifdef CONFIG_SHERLOCK +LIBIMAGES_MODS+=object +LIBIMAGES_DEPS=$(LIBSH) +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),) LIBIMAGES_MODS+=sig-dump sig-init sig-seg sig-txt +LIBIMAGES_INCLUDES+=signature.h endif -LIBIMAGES_LIBS=-lm -lpthread - ifdef CONFIG_IMAGES_LIBJPEG LIBIMAGES_MODS+=io-libjpeg LIBIMAGES_LIBS+=-ljpeg @@ -48,27 +64,52 @@ 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/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) $(LIBUCW) -$(o)/images/image-tool: LIBS+=$(LIBIMAGES_LIBS) +PROGS+=$(LIBIMAGES_PROGS) +CONFIGS+=$(LIBIMAGES_CONFIGS) -$(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) $(LIBUCW) -$(o)/images/image-dup-test: LIBS+=$(LIBIMAGES_LIBS) +$(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/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) $(LIBUCW) -$(o)/images/image-sim-test: LIBS+=$(LIBIMAGES_LIBS) +$(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) $(LIBUCW) -$(o)/images/image-test: LIBS+=$(LIBIMAGES_LIBS) +$(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(o)/images/image-test.test: $(o)/images/image-test -TESTS+=$(o)/images/hilbert-test.test -$(o)/images/hilbert-test: LIBS+=-lm $(LIBSH) -$(o)/images/hilbert-test.test: $(o)/images/hilbert-test - TESTS+=$(o)/images/color.test -$(o)/images/color-t: LIBS+=-lm +$(o)/images/color-t: $(LIBIMAGES) $(o)/images/color.test: $(o)/images/color-t + +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