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