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
10 LIBIMAGES_MODS+=object
11 LIBIMAGES_DEPS=$(LIBSH)
13 LIBIMAGES_DEPS=$(LIBUCW)
16 ifdef CONFIG_IMAGES_DUP
17 PROGS+=$(o)/images/image-dup-test
18 LIBIMAGES_MODS+=dup-init dup-cmp
20 ifdef CONFIG_IMAGES_SIM
21 PROGS+=$(o)/images/image-sim-test
22 LIBIMAGES_MODS+=sig-cmp
24 ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),)
25 LIBIMAGES_MODS+=sig-dump sig-init sig-seg sig-txt
28 LIBIMAGES_LIBS=-lm -lpthread
30 ifdef CONFIG_IMAGES_LIBJPEG
31 LIBIMAGES_MODS+=io-libjpeg
32 LIBIMAGES_LIBS+=-ljpeg
35 ifdef CONFIG_IMAGES_LIBPNG
36 LIBIMAGES_MODS+=io-libpng
40 ifdef CONFIG_IMAGES_LIBUNGIF
41 LIBIMAGES_MODS+=io-libungif
42 LIBIMAGES_LIBS+=-lungif
44 ifdef CONFIG_IMAGES_LIBGIF
45 LIBIMAGES_MODS+=io-libungif
50 ifdef CONFIG_IMAGES_LIBMAGICK
51 LIBIMAGES_MODS+=io-libmagick
52 MAGICK_LIBS:=$(shell GraphicsMagick-config --libs)
53 MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags)
54 LIBIMAGES_LIBS+=$(MAGICK_LIBS)
55 $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS)
58 $(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
59 $(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
61 $(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) $(LIBIMAGES_DEPS)
62 $(o)/images/image-tool: LIBS+=$(LIBIMAGES_LIBS)
64 $(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES) $(LIBIMAGES_DEPS)
65 $(o)/images/color-tool: LIBS+=$(LIBIMAGES_LIBS)
67 $(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) $(LIBIMAGES_DEPS)
68 $(o)/images/image-dup-test: LIBS+=$(LIBIMAGES_LIBS)
70 $(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) $(LIBIMAGES_DEPS)
71 $(o)/images/image-sim-test: LIBS+=$(LIBIMAGES_LIBS)
73 TESTS+=$(o)/images/image-test.test
74 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBIMAGES_DEPS)
75 $(o)/images/image-test: LIBS+=$(LIBIMAGES_LIBS)
76 $(o)/images/image-test.test: $(o)/images/image-test
78 TESTS+=$(o)/images/hilbert-test.test
79 $(o)/images/hilbert-test: $(LIBIMAGES_DEPS)
80 $(o)/images/hilbert-test: LIBS+=-lm
81 $(o)/images/hilbert-test.test: $(o)/images/hilbert-test
83 TESTS+=$(o)/images/color.test
84 $(o)/images/color-t: $(LIBIMAGES) $(LIBIMAGES_DEPS)
85 $(o)/images/color-t: LIBS+=$(LIBIMAGES_LIBS) $(LIBIMAGES_DEPS)
86 $(o)/images/color.test: $(o)/images/color-t