1 # Makefile for the Image Library (c) 2006 Pavel Charvat <pchar@ucw.cz>
5 PROGS+=$(o)/images/image-tool $(o)/images/color-tool
7 LIBIMAGES_MODS=math config context image scale color io-main
8 LIBIMAGES_INCLUDES=images.h error.h color.h math.h
12 LIBIMAGES_MODS+=object
13 LIBIMAGES_DEPS=$(LIBSH)
15 LIBIMAGES_DEPS=$(LIBUCW)
18 ifdef CONFIG_IMAGES_DUP
19 PROGS+=$(o)/images/image-dup-test
20 LIBIMAGES_MODS+=dup-init dup-cmp
21 LIBIMAGES_INCLUDES+=duplicates.h
23 ifdef CONFIG_IMAGES_SIM
24 PROGS+=$(o)/images/image-sim-test
25 LIBIMAGES_MODS+=sig-cmp
27 ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),)
28 LIBIMAGES_MODS+=sig-dump sig-init sig-seg sig-txt
29 LIBIMAGES_INCLUDES+=signature.h
32 ifdef CONFIG_IMAGES_LIBJPEG
33 LIBIMAGES_MODS+=io-libjpeg
34 LIBIMAGES_LIBS+=-ljpeg
37 ifdef CONFIG_IMAGES_LIBPNG
38 LIBIMAGES_MODS+=io-libpng
42 ifdef CONFIG_IMAGES_LIBUNGIF
43 LIBIMAGES_MODS+=io-libungif
44 LIBIMAGES_LIBS+=-lungif
46 ifdef CONFIG_IMAGES_LIBGIF
47 LIBIMAGES_MODS+=io-libungif
52 ifdef CONFIG_IMAGES_LIBMAGICK
53 LIBIMAGES_MODS+=io-libmagick
54 MAGICK_LIBS:=$(shell GraphicsMagick-config --libs)
55 MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags)
56 LIBIMAGES_LIBS+=$(MAGICK_LIBS)
57 $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS)
60 $(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
61 $(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
62 $(o)/images/libimages.pc: $(LIBIMAGES_DEPS)
64 $(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES)
65 $(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES)
66 $(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES)
67 $(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES)
69 TESTS+=$(o)/images/image-test.test
70 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES)
71 $(o)/images/image-test.test: $(o)/images/image-test
73 TESTS+=$(o)/images/color.test
74 $(o)/images/color-t: $(LIBIMAGES)
75 $(o)/images/color.test: $(o)/images/color-t
78 API_INCLUDES+=$(o)/images/.include-stamp
79 $(o)/images/.include-stamp: $(addprefix $(s)/images/,$(LIBIMAGES_INCLUDES))
80 $(o)/images/.include-stamp: IDST=images
81 run/lib/pkgconfig/libimages.pc: $(o)/images/libimages.pc