]> mj.ucw.cz Git - libucw.git/blob - images/Makefile
safe signatures aligning
[libucw.git] / images / Makefile
1 # Testing dir... code will be moved somewhere else... maybe to trash :-)
2
3 DIRS+=images
4
5 PROGS+=$(o)/images/image-tool
6 CONFIGS+=images
7 LIBIMAGES_MODS=math config 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/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) $(LIBUCW)
58 $(o)/images/image-dup-test: LIBS+=$(LIBIMAGES_LIBS)
59
60 $(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) $(LIBUCW)
61 $(o)/images/image-sim-test: LIBS+=$(LIBIMAGES_LIBS)
62
63 TESTS+=$(o)/images/image-test.test
64 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW)
65 $(o)/images/image-test: LIBS+=$(LIBIMAGES_LIBS)
66 $(o)/images/image-test.test: $(o)/images/image-test
67
68 TESTS+=$(o)/images/hilbert-test.test
69 $(o)/images/hilbert-test: LIBS+=-lm $(LIBSH)
70 $(o)/images/hilbert-test.test: $(o)/images/hilbert-test
71
72 TESTS+=$(o)/images/color.test
73 $(o)/images/color-t: LIBS+=-lm
74 $(o)/images/color.test: $(o)/images/color-t