Add a new libtheora_info example program.
[theora.git] / lib / Makefile.am
1 INCLUDES = -I$(top_srcdir)/include
2 AM_CFLAGS = $(OGG_CFLAGS) $(CAIRO_CFLAGS)
3
4 EXTRA_DIST = \
5         encoder_disabled.c \
6         arm/armcpu.c \
7         arm/armbits.h \
8         arm/armbits.s \
9         arm/armfrag.s \
10         arm/armidct.s \
11         arm/armint.h \
12         arm/armopts.s.in \
13         arm/arm2gnu.pl \
14         c64x/c64xint.h \
15         c64x/c64xdec.h \
16         x86/x86cpu.c \
17         x86/mmxencfrag.c \
18         x86/mmxfdct.c \
19         x86/sse2encfrag.c \
20         x86/sse2fdct.c \
21         x86/sse2trans.h \
22         x86/x86enc.c \
23         x86/x86enc.h \
24         x86/x86enquant.c \
25         x86/mmxfrag.c \
26         x86/mmxidct.c \
27         x86/mmxloop.h \
28         x86/mmxstate.c \
29         x86/sse2idct.c \
30         x86/x86int.h \
31         x86/x86state.c \
32         x86_vc
33
34 lib_LTLIBRARIES = libtheoradec.la libtheoraenc.la libtheora.la
35
36 if THEORA_DISABLE_ENCODE
37 encoder_uniq_sources = \
38         encoder_disabled.c
39
40 encoder_sources = \
41         $(encoder_uniq_sources)
42 else
43 encoder_uniq_x86_sources = \
44         x86/mmxencfrag.c \
45         x86/mmxfdct.c \
46         x86/sse2encfrag.c \
47         x86/x86enquant.c \
48         x86/x86enc.c
49
50 encoder_uniq_x86_64_sources = \
51         x86/sse2fdct.c
52
53 encoder_shared_x86_sources = \
54         x86/x86cpu.c \
55         x86/mmxfrag.c \
56         x86/mmxidct.c \
57         x86/mmxstate.c \
58         x86/sse2idct.c \
59         x86/x86state.c
60
61 encoder_shared_x86_64_sources =
62
63 encoder_uniq_arm_sources =
64
65 if CPU_arm
66 BUILT_SOURCES = \
67         armbits-gnu.S \
68         armfrag-gnu.S \
69         armidct-gnu.S \
70         armloop-gnu.S \
71         armopts-gnu.S
72 endif
73
74 encoder_shared_arm_sources = \
75         armbits-gnu.S \
76         armfrag-gnu.S \
77         armidct-gnu.S \
78         armloop-gnu.S \
79         armopts-gnu.S \
80         arm/armcpu.c \
81         arm/armstate.c
82
83 if CPU_x86_64
84 encoder_uniq_arch_sources = \
85  $(encoder_uniq_x86_sources) \
86  $(encoder_uniq_x86_64_sources)
87 encoder_shared_arch_sources = \
88  $(encoder_shared_x86_sources) \
89  $(encoder_shared_x86_64_sources)
90 else
91 if CPU_x86_32
92 encoder_uniq_arch_sources = $(encoder_uniq_x86_sources)
93 encoder_shared_arch_sources = $(encoder_shared_x86_sources)
94 else
95 if CPU_arm
96 encoder_uniq_arch_sources = $(encoder_uniq_arm_sources)
97 encoder_shared_arch_sources = $(encoder_shared_arm_sources)
98 else
99 encoder_uniq_arch_sources =
100 encoder_shared_arch_sources =
101 endif
102 endif
103 endif
104
105 encoder_uniq_sources = \
106         analyze.c \
107         fdct.c \
108         encfrag.c \
109         encapiwrapper.c \
110         encinfo.c \
111         encode.c \
112         enquant.c \
113         huffenc.c \
114         mathops.c \
115         mcenc.c \
116         rate.c \
117         tokenize.c \
118         $(encoder_uniq_arch_sources)
119
120 encoder_sources = \
121         apiwrapper.c \
122         bitpack.c \
123         dequant.c \
124         fragment.c \
125         idct.c \
126         internal.c \
127         state.c \
128         quant.c \
129         $(encoder_shared_arch_sources) \
130         $(encoder_uniq_sources)
131
132 endif
133
134 decoder_x86_sources = \
135         x86/x86cpu.c \
136         x86/mmxidct.c \
137         x86/mmxfrag.c \
138         x86/mmxstate.c \
139         x86/sse2idct.c \
140         x86/x86state.c
141
142 decoder_arm_sources = \
143         arm/armcpu.c \
144         arm/armstate.c
145
146 nodist_decoder_arm_sources = \
147         armbits-gnu.S \
148         armfrag-gnu.S \
149         armidct-gnu.S \
150         armloop-gnu.S \
151         armopts-gnu.S
152
153 decoder_c64x_sources = \
154         c64x/c64xdec.c \
155         c64x/c64xfrag.c \
156         c64x/c64xidct.c \
157         c64x/c64xstate.c
158
159 if CPU_x86_64
160 decoder_arch_sources = $(decoder_x86_sources)
161 nodist_decoder_arch_sources =
162 else
163 if CPU_x86_32
164 decoder_arch_sources = $(decoder_x86_sources)
165 nodist_decoder_arch_sources =
166 else
167 if CPU_arm
168 decoder_arch_sources = $(decoder_arm_sources)
169 nodist_decoder_arch_sources = $(nodist_decoder_arm_sources)
170 else
171 if CPU_c64x
172 decoder_arch_sources = $(decoder_c64x_sources)
173 nodist_decoder_arch_sources =
174 else
175 decoder_arch_sources =
176 nodist_decoder_arch_sources =
177 endif
178 endif
179 endif
180 endif
181
182 decoder_sources = \
183         apiwrapper.c \
184         bitpack.c \
185         decapiwrapper.c \
186         decinfo.c \
187         decode.c \
188         dequant.c \
189         fragment.c \
190         huffdec.c \
191         idct.c \
192         info.c \
193         internal.c \
194         quant.c \
195         state.c \
196         $(decoder_arch_sources)
197
198 noinst_HEADERS = \
199         apiwrapper.h \
200         bitpack.h \
201         dct.h \
202         decint.h \
203         dequant.h \
204         encint.h \
205         enquant.h \
206         huffdec.h \
207         huffenc.h \
208         huffman.h \
209         internal.h \
210         mathops.h \
211         modedec.h \
212         ocintrin.h \
213         quant.h \
214         state.h \
215         arm/armcpu.h \
216         c64x/c64xdec.h \
217         c64x/c64xint.h \
218         x86/x86cpu.h \
219         x86/mmxloop.h \
220         x86/sse2trans.h \
221         x86/x86enc.h \
222         x86/x86int.h
223
224 libtheoradec_la_SOURCES = \
225         $(decoder_sources) \
226         Version_script-dec theoradec.exp
227 nodist_libtheoradec_la_SOURCES = \
228         $(nodist_decoder_arch_sources)
229 libtheoradec_la_LDFLAGS = \
230   -version-info @THDEC_LIB_CURRENT@:@THDEC_LIB_REVISION@:@THDEC_LIB_AGE@ \
231   @THEORADEC_LDFLAGS@ @CAIRO_LIBS@ \
232   -no-undefined
233
234 libtheoraenc_la_SOURCES = \
235         $(encoder_sources) \
236         Version_script-enc theoraenc.exp
237 libtheoraenc_la_LDFLAGS = \
238   -version-info @THENC_LIB_CURRENT@:@THENC_LIB_REVISION@:@THENC_LIB_AGE@ \
239   @THEORAENC_LDFLAGS@ $(OGG_LIBS) \
240   -no-undefined
241 libtheoraenc_la_LIBADD = libtheoradec.la
242
243 libtheora_la_SOURCES = \
244         $(decoder_sources) \
245         $(encoder_uniq_sources) \
246         Version_script theora.exp
247 nodist_libtheora_la_SOURCES = \
248         $(nodist_decoder_arch_sources)
249 libtheora_la_LDFLAGS = \
250   -version-info @TH_LIB_CURRENT@:@TH_LIB_REVISION@:@TH_LIB_AGE@ \
251   @THEORA_LDFLAGS@ @CAIRO_LIBS@ $(OGG_LIBS) \
252   -no-undefined
253
254 debug:
255         $(MAKE) all CFLAGS="@DEBUG@" 
256
257 profile:
258         $(MAKE) all CFLAGS="@PROFILE@"
259
260 # contstruct various symbol export list files
261 .def.exp : defexp.awk
262         awk -f defexp.awk $< > $@
263
264 CLEANFILES = \
265         armbits-gnu.S \
266         armfrag-gnu.S \
267         armidct-gnu.S \
268         armloop-gnu.S \
269         armopts-gnu.S
270
271 # automake doesn't do dependency tracking for asm files, that I can tell
272 armfrag-gnu.S: armopts-gnu.S
273 armidct-gnu.S: armopts-gnu.S
274 armloop-gnu.S: armopts-gnu.S
275
276 # convert ARM asm to GNU as format
277 %-gnu.S: $(srcdir)/arm/%.s
278         $(srcdir)/arm/arm2gnu.pl < $< > $@
279 # Special case for armopts.s, because it is built by configure
280 armopts-gnu.S: arm/armopts.s
281         $(srcdir)/arm/arm2gnu.pl < $< > $@