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 alpha io-main object
9 ifdef CONFIG_IMAGES_DUP
10 PROGS+=$(o)/images/image-dup-test
11 LIBIMAGES_MODS+=dup-init dup-cmp
13 ifdef CONFIG_IMAGES_SIM
14 PROGS+=$(o)/images/image-sim-test
15 LIBIMAGES_MODS+=sig-cmp
17 ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),)
18 LIBIMAGES_MODS+=sig-dump sig-init sig-seg sig-txt
21 LIBIMAGES_LIBS=-lm -lpthread
23 ifdef CONFIG_IMAGES_LIBJPEG
24 LIBIMAGES_MODS+=io-libjpeg
25 LIBIMAGES_LIBS+=-ljpeg
28 ifdef CONFIG_IMAGES_LIBPNG
29 LIBIMAGES_MODS+=io-libpng
33 ifdef CONFIG_IMAGES_LIBUNGIF
34 LIBIMAGES_MODS+=io-libungif
35 LIBIMAGES_LIBS+=-lungif
37 ifdef CONFIG_IMAGES_LIBGIF
38 LIBIMAGES_MODS+=io-libungif
43 ifdef CONFIG_IMAGES_LIBMAGICK
44 LIBIMAGES_MODS+=io-libmagick
45 MAGICK_LIBS:=$(shell GraphicsMagick-config --libs)
46 MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags)
47 LIBIMAGES_LIBS+=$(MAGICK_LIBS)
48 $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS)
51 $(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
52 $(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
54 $(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) $(LIBUCW)
55 $(o)/images/image-tool: LIBS+=$(LIBIMAGES_LIBS)
57 $(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES) $(LIBUCW)
58 $(o)/images/color-tool: LIBS+=$(LIBIMAGES_LIBS)
60 $(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) $(LIBUCW)
61 $(o)/images/image-dup-test: LIBS+=$(LIBIMAGES_LIBS)
63 $(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) $(LIBUCW)
64 $(o)/images/image-sim-test: LIBS+=$(LIBIMAGES_LIBS)
66 TESTS+=$(o)/images/image-test.test
67 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW)
68 $(o)/images/image-test: LIBS+=$(LIBIMAGES_LIBS)
69 $(o)/images/image-test.test: $(o)/images/image-test
71 TESTS+=$(o)/images/hilbert-test.test
72 $(o)/images/hilbert-test: LIBS+=-lm $(LIBSH)
73 $(o)/images/hilbert-test.test: $(o)/images/hilbert-test
75 TESTS+=$(o)/images/color.test
76 $(o)/images/color-t: LIBS+=-lm
77 $(o)/images/color.test: $(o)/images/color-t