]> mj.ucw.cz Git - libucw.git/blob - images/Makefile
fixed bug in image allocation
[libucw.git] / images / Makefile
1 # Testing dir... code will be moved somewhere else... maybe to trash :-)
2
3 DIRS+=images
4
5 PROGS+=$(addprefix $(o)/images/,image-tool image-dup-test image-sim-test)
6
7 CONFIGS+=images
8
9 LIBIMAGES_MODS=math config image scale color alpha io-main dup-init dup-cmp sig-dump sig-init sig-seg sig-cmp object
10
11 LIBIMAGES_LIBS=-lm
12
13 ifdef CONFIG_IMAGES_LIBJPEG
14 LIBIMAGES_MODS+=io-libjpeg
15 LIBIMAGES_LIBS+=-ljpeg
16 endif
17
18 ifdef CONFIG_IMAGES_LIBPNG
19 LIBIMAGES_MODS+=io-libpng
20 LIBIMAGES_LIBS+=-lpng
21 endif
22
23 ifdef CONFIG_IMAGES_LIBUNGIF
24 LIBIMAGES_MODS+=io-libungif
25 LIBIMAGES_LIBS+=-lungif
26 else
27 ifdef CONFIG_IMAGES_LIBGIF
28 LIBIMAGES_MODS+=io-libungif
29 LIBIMAGES_LIBS+=-lgif
30 endif
31 endif
32
33 ifdef CONFIG_IMAGES_LIBMAGICK
34 LIBIMAGES_MODS+=io-libmagick
35 MAGICK_LIBS:=$(shell GraphicsMagick-config --libs)
36 MAGICK_CPPFLAGS:=$(shell GraphicsMagick-config --cppflags)
37 LIBIMAGES_LIBS+=$(MAGICK_LIBS)
38 $(o)/images/io-libmagick.o: CFLAGS+=$(MAGICK_CPPFLAGS)
39 endif
40
41 $(o)/images/libimages.a: $(addsuffix .o,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
42 $(o)/images/libimages.so: $(addsuffix .oo,$(addprefix $(o)/images/,$(LIBIMAGES_MODS)))
43
44 $(o)/images/image-tool: $(o)/images/image-tool.o $(LIBIMAGES) $(LIBUCW)
45 $(o)/images/image-tool: LIBS+=$(LIBIMAGES_LIBS)
46
47 $(o)/images/image-dup-test: $(o)/images/image-dup-test.o $(LIBIMAGES) $(LIBUCW)
48 $(o)/images/image-dup-test: LIBS+=$(LIBIMAGES_LIBS)
49
50 $(o)/images/image-sim-test: $(o)/images/image-sim-test.o $(LIBIMAGES) $(LIBUCW)
51 $(o)/images/image-sim-test: LIBS+=$(LIBIMAGES_LIBS)
52
53 TESTS+=$(o)/images/image-test.test
54 $(o)/images/image-test: $(o)/images/image-test.o $(LIBIMAGES) $(LIBUCW)
55 $(o)/images/image-test: LIBS+=$(LIBIMAGES_LIBS)
56 $(o)/images/image-test.test: $(o)/images/image-test
57
58 TESTS+=$(o)/images/hilbert-test.test
59 $(o)/images/hilbert-test: LIBS+=-lm $(LIBSH)
60 $(o)/images/hilbert-test.test: $(o)/images/hilbert-test
61
62 TESTS+=$(o)/images/color.test
63 $(o)/images/color-t: LIBS+=-lm
64 $(o)/images/color.test: $(o)/images/color-t
65
66 #$(o)/images/image-idx: $(o)/images/image-idx.o $(o)/images/image-obj.o $(o)/images/dup-cmp.o $(o)/indexer/iconfig.o $(o)/images/image-sig.o $(o)/images/kd-tree.o $(o)/images/color.o $(o)/images/image-io.o $(LIBSH) $(LIBLANG) $(LIBCHARSET)
67 #$(o)/images/image-idx: LIBS+=-lGraphicsMagick -ljpeg -lpng
68
69 # By :;DF
70 #PROGS+=$(addprefix $(o)/images/,decomp)
71 #
72 #$(o)/images/block_info.o $(o)/images/block_info.oo: CFLAGS+=-I/usr/include/GraphicsMagick
73 #$(o)/images/k_means.o $(o)/images/k_means.oo: CFLAGS+=-I/usr/include/GraphicsMagick
74 #$(o)/images/decomp.o $(o)/images/decomp.oo: CFLAGS+=-I/usr/include/GraphicsMagick
75
76 #$(o)/images/decomp: $(o)/images/decomp.o $(o)/images/block_info.o $(o)/images/k_means.o $(LIBSH) $(LIBLANG) $(LIBCHARSET)
77 #$(o)/images/decomp: LIBS+=-lGraphicsMagick -ljpeg -lm
78