]> mj.ucw.cz Git - libucw.git/blob - images/Makefile
5953519acf77cf81d017d311690100a5386818fc
[libucw.git] / images / Makefile
1 # Makefile for the Image Library (c) 2006 Pavel Charvat <pchar@ucw.cz>
2
3 DIRS+=images
4
5 PROGS+=$(o)/images/image-tool $(o)/images/color-tool
6 CONFIGS+=images
7 LIBIMAGES_MODS=math config context image scale color alpha io-main object
8
9 ifdef CONFIG_IMAGES_DUP
10 PROGS+=$(o)/images/image-dup-test
11 LIBIMAGES_MODS+=dup-init dup-cmp
12 endif
13 ifdef CONFIG_IMAGES_SIM
14 PROGS+=$(o)/images/image-sim-test
15 LIBIMAGES_MODS+=sig-cmp
16 endif
17 ifneq ($(CONFIG_IMAGES_DUP)$(CONFIG_IMAGES_SIM),)
18 LIBIMAGES_MODS+=sig-dump sig-init sig-seg sig-txt
19 endif
20
21 LIBIMAGES_LIBS=-lm -lpthread
22
23 ifdef CONFIG_IMAGES_LIBJPEG
24 LIBIMAGES_MODS+=io-libjpeg
25 LIBIMAGES_LIBS+=-ljpeg
26 endif
27
28 ifdef CONFIG_IMAGES_LIBPNG
29 LIBIMAGES_MODS+=io-libpng
30 LIBIMAGES_LIBS+=-lpng
31 endif
32
33 ifdef CONFIG_IMAGES_LIBUNGIF
34 LIBIMAGES_MODS+=io-libungif
35 LIBIMAGES_LIBS+=-lungif
36 else
37 ifdef CONFIG_IMAGES_LIBGIF
38 LIBIMAGES_MODS+=io-libungif
39 LIBIMAGES_LIBS+=-lgif
40 endif
41 endif
42
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)
49 endif
50
51 $(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
52 $(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
53
54 $(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) $(LIBUCW)
55 $(o)/images/image-tool: LIBS+=$(LIBIMAGES_LIBS)
56
57 $(o)/images/color-tool: $(o)/images/color-tool.o $(LIBIMAGES) $(LIBUCW)
58 $(o)/images/color-tool: LIBS+=$(LIBIMAGES_LIBS)
59
60 $(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) $(LIBUCW)
61 $(o)/images/image-dup-test: LIBS+=$(LIBIMAGES_LIBS)
62
63 $(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) $(LIBUCW)
64 $(o)/images/image-sim-test: LIBS+=$(LIBIMAGES_LIBS)
65
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
70
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
74
75 TESTS+=$(o)/images/color.test
76 $(o)/images/color-t: LIBS+=-lm
77 $(o)/images/color.test: $(o)/images/color-t