CAVS decoder by (Stefan Gehrer stefan.gehrer gmx.de)
[libav.git] / libavcodec / Makefile
CommitLineData
4cc281d9
FB
1#
2# libavcodec Makefile
6d6d7970 3# (c) 2000-2005 Fabrice Bellard
4cc281d9 4#
980fc7b8
FB
5include ../config.mak
6
ff4ec49e 7# NOTE: -I.. is needed to include config.h
c11c2bc2 8CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS)
de6d9b64 9
caa336b4 10OBJS= bitstream.o utils.o mem.o allcodecs.o \
1d0d55da 11 mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
7b1fa7db 12 mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \
1d0d55da 13 motion_est.o imgconvert.o imgresample.o \
4f1bb8a9 14 mpeg12.o mpegaudiodec.o pcm.o simple_idct.o \
8b975b7c
MN
15 ratecontrol.o adpcm.o eval.o error_resilience.o \
16 fft.o mdct.o raw.o golomb.o cabac.o\
c11c2bc2 17 dpcm.o adx.o faandct.o parser.o g726.o \
689abe56 18 vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o \
348e52c9 19 opt.o
240c1657 20
d59518d4 21HEADERS = avcodec.h
8b2121e3 22
8b975b7c
MN
23ifeq ($(CONFIG_AASC_DECODER),yes)
24 OBJS+= aasc.o
25endif
26ifeq ($(CONFIG_ALAC_DECODER),yes)
27 OBJS+= alac.o
28endif
29ifneq ($(CONFIG_ASV1_DECODER)$(CONFIG_ASV1_ENCODER)$(CONFIG_ASV2_DECODER)$(CONFIG_ASV2_ENCODER),)
30 OBJS+= asv1.o
31endif
26376701
MM
32ifeq ($(CONFIG_AVS_DECODER),yes)
33 OBJS+= avs.o
34endif
b482e2d1
MN
35ifeq ($(CONFIG_CAVS_DECODER),yes)
36 OBJS+= cavs.o cavsdsp.o
37endif
8b975b7c
MN
38ifeq ($(CONFIG_CINEPAK_DECODER),yes)
39 OBJS+= cinepak.o
40endif
e0f7e329
BL
41ifeq ($(CONFIG_COOK_DECODER),yes)
42 OBJS+= cook.o
43endif
8b975b7c
MN
44ifneq ($(CONFIG_CLJR_DECODER)$(CONFIG_CLJR_ENCODER),)
45 OBJS+= cljr.o
46endif
47ifeq ($(CONFIG_CYUV_DECODER),yes)
48 OBJS+= cyuv.o
49endif
348e52c9
GP
50ifeq ($(CONFIG_DVBSUB_DECODER),yes)
51 OBJS+= dvbsubdec.o
52endif
53ifeq ($(CONFIG_DVBSUB_ENCODER),yes)
54 OBJS+= dvbsub.o
55endif
56ifeq ($(CONFIG_DVDSUB_DECODER),yes)
57 OBJS+= dvdsub.o
58endif
59ifeq ($(CONFIG_DVDSUB_ENCODER),yes)
60 OBJS+= dvdsubenc.o
61endif
8b975b7c
MN
62ifneq ($(CONFIG_DVVIDEO_DECODER)$(CONFIG_DVVIDEO_ENCODER),)
63 OBJS+= dv.o
64endif
65ifeq ($(CONFIG_EIGHTBPS_DECODER),yes)
66 OBJS+= 8bps.o
67endif
68ifneq ($(CONFIG_FFV1_DECODER)$(CONFIG_FFV1_ENCODER),)
69 OBJS+= ffv1.o
70endif
71ifeq ($(CONFIG_FLAC_DECODER),yes)
72 OBJS+= flac.o
73endif
9e96ab03
MN
74ifeq ($(CONFIG_FLAC_ENCODER),yes)
75 OBJS+= flacenc.o
76endif
8b975b7c
MN
77ifeq ($(CONFIG_FLIC_DECODER),yes)
78 OBJS+= flicvideo.o
79endif
80ifeq ($(CONFIG_FOURXM_DECODER),yes)
81 OBJS+= 4xm.o
82endif
b81f8949
MM
83ifeq ($(CONFIG_FRAPS_DECODER),yes)
84 OBJS+= fraps.o
85endif
8b975b7c
MN
86ifneq ($(CONFIG_H261_DECODER)$(CONFIG_H261_ENCODER),)
87 OBJS+= h261.o
88endif
89ifneq ($(CONFIG_H264_DECODER)$(CONFIG_SVQ3_DECODER),)
90 OBJS+= h264.o
91endif
92ifneq ($(CONFIG_HUFFYUV_DECODER)$(CONFIG_HUFFYUV_ENCODER)$(CONFIG_FFVHUFF_DECODER)$(CONFIG_FFVHUFF_ENCODER),)
93 OBJS+= huffyuv.o
94endif
95ifeq ($(CONFIG_IDCIN_DECODER),yes)
96 OBJS+= idcinvideo.o
97endif
98ifeq ($(CONFIG_INDEO2_DECODER),yes)
99 OBJS+= indeo2.o
100endif
101ifeq ($(CONFIG_INDEO3_DECODER),yes)
102 OBJS+= indeo3.o
103endif
104ifeq ($(CONFIG_INTERPLAY_VIDEO_DECODER),yes)
105 OBJS+= interplayvideo.o
106endif
fd7b1991
KS
107ifeq ($(CONFIG_KMVC_DECODER),yes)
108 OBJS+= kmvc.o
109endif
8b975b7c
MN
110ifneq ($(CONFIG_MSZH_DECODER)$(CONFIG_ZLIB_DECODER)$(CONFIG_ZLIB_ENCODER),)
111 OBJS+= lcl.o
112endif
113ifeq ($(CONFIG_LOCO_DECODER),yes)
114 OBJS+= loco.o
115endif
116ifneq ($(CONFIG_MACE3_DECODER)$(CONFIG_MACE6_DECODER),)
117 OBJS+= mace.o
118endif
119ifeq ($(CONFIG_MSRLE_DECODER),yes)
120 OBJS+= msrle.o
121endif
122ifeq ($(CONFIG_MSVIDEO1_DECODER),yes)
123 OBJS+= msvideo1.o
124endif
125ifneq ($(CONFIG_PNG_DECODER)$(CONFIG_PNG_ENCODER),)
126 OBJS+= png.o
127endif
c555392a
RT
128ifeq ($(CONFIG_QDM2_DECODER),yes)
129 OBJS+= qdm2.o
130endif
8b975b7c
MN
131ifeq ($(CONFIG_QDRAW_DECODER),yes)
132 OBJS+= qdrw.o
133endif
134ifeq ($(CONFIG_QPEG_DECODER),yes)
135 OBJS+= qpeg.o
136endif
137ifeq ($(CONFIG_QTRLE_DECODER),yes)
138 OBJS+= qtrle.o
139endif
140ifeq ($(CONFIG_RA_144_DECODER),yes)
141 OBJS+= ra144.o
142endif
143ifeq ($(CONFIG_RA_288_DECODER),yes)
144 OBJS+= ra288.o
145endif
146ifeq ($(CONFIG_ROQ_DECODER),yes)
147 OBJS+= roqvideo.o
148endif
149ifeq ($(CONFIG_RPZA_DECODER),yes)
150 OBJS+= rpza.o
151endif
152ifneq ($(CONFIG_RV10_DECODER)$(CONFIG_RV20_DECODER)$(CONFIG_RV10_ENCODER)$(CONFIG_RV20_ENCODER),)
153 OBJS+= rv10.o
154endif
155ifeq ($(CONFIG_SHORTEN_DECODER),yes)
156 OBJS+= shorten.o
157endif
348efc18
KS
158ifneq ($(CONFIG_SMACKER_DECODER)$(CONFIG_SMACKAUD_DECODER),)
159 OBJS+= smacker.o
160endif
8b975b7c
MN
161ifeq ($(CONFIG_SMC_DECODER),yes)
162 OBJS+= smc.o
163endif
0de1318a 164ifneq ($(CONFIG_SNOW_DECODER)$(CONFIG_SNOW_ENCODER),)
8b975b7c
MN
165 OBJS+= snow.o
166endif
167ifneq ($(CONFIG_SONIC_DECODER)$(CONFIG_SONIC_ENCODER)$(CONFIG_SONIC_LS_ENCODER),)
168 OBJS+= sonic.o
169endif
170ifneq ($(CONFIG_SVQ1_DECODER)$(CONFIG_SVQ1_ENCODER),)
171 OBJS+= svq1.o
172endif
173ifeq ($(CONFIG_TRUEMOTION1_DECODER),yes)
174 OBJS+= truemotion1.o
175endif
c555392a
RT
176ifeq ($(CONFIG_TRUEMOTION2_DECODER),yes)
177 OBJS+= truemotion2.o
178endif
bf3027c8
DB
179ifeq ($(CONFIG_TRUESPEECH_DECODER),yes)
180 OBJS+= truespeech.o
181endif
a24c4a2a
AB
182ifeq ($(CONFIG_TTA_DECODER),yes)
183 OBJS+= tta.o
184endif
8b975b7c
MN
185ifeq ($(CONFIG_TSCC_DECODER),yes)
186 OBJS+= tscc.o
187endif
e0f80bd7
RD
188ifeq ($(CONFIG_CSCD_DECODER),yes)
189 OBJS+= cscd.o
517840c6 190 OBJS+= lzo.o
e0f80bd7 191endif
dfca23e3
RD
192ifeq ($(CONFIG_NUV_DECODER),yes)
193 OBJS+= nuv.o
194 OBJS+= rtjpeg.o
195 OBJS+= lzo.o
196endif
8b975b7c
MN
197ifeq ($(CONFIG_ULTI_DECODER),yes)
198 OBJS+= ulti.o
199endif
10b9c374
KS
200ifneq ($(CONFIG_VC1_DECODER)$(CONFIG_WMV3_DECODER),)
201 OBJS+= vc1.o
8b975b7c
MN
202endif
203ifneq ($(CONFIG_VCR1_DECODER)$(CONFIG_VCR1_ENCODER),)
204 OBJS+= vcr1.o
205endif
206ifneq ($(CONFIG_VMDVIDEO_DECODER)$(CONFIG_VMDAUDIO_DECODER),)
207 OBJS+= vmdav.o
208endif
0bde73d9
MN
209ifeq ($(CONFIG_VORBIS_DECODER),yes)
210 OBJS+= vorbis.o
211endif
8b975b7c
MN
212ifneq ($(CONFIG_VP3_DECODER)$(CONFIG_THEORA_DECODER),)
213 OBJS+= vp3.o
214endif
215ifeq ($(CONFIG_VQA_DECODER),yes)
216 OBJS+= vqavideo.o
217endif
218ifneq ($(CONFIG_WMAV1_DECODER)$(CONFIG_WMAV2_DECODER),)
219 OBJS+= wmadec.o
220endif
221ifeq ($(CONFIG_WNV1_DECODER),yes)
222 OBJS+= wnv1.o
223endif
224ifeq ($(CONFIG_WS_SND1_DECODER),yes)
225 OBJS+= ws-snd1.o
226endif
227ifneq ($(CONFIG_XAN_WC3_DECODER)$(CONFIG_XAN_WC4_DECODER),)
228 OBJS+= xan.o
229endif
230ifeq ($(CONFIG_XL_DECODER),yes)
231 OBJS+= xl.o
232endif
9fa62f2a
MR
233ifeq ($(CONFIG_BMP_DECODER),yes)
234 OBJS+= bmp.o
235endif
4e114829
MM
236ifeq ($(CONFIG_MMVIDEO_DECODER),yes)
237 OBJS+= mmvideo.o
238endif
9c8d8e84
MM
239ifeq ($(CONFIG_ZMBV_DECODER),yes)
240 OBJS+= zmbv.o
241endif
0919e788
BL
242ifeq ($(CONFIG_FLASHSV_DECODER),yes)
243 OBJS+= flashsv.o
244endif
9fa62f2a 245
e0fb7e5b 246
60827a1a
DB
247ifeq ($(AMR),yes)
248OBJS+= amr.o
249endif
e0fb7e5b 250
891f64b3 251ifeq ($(AMR_NB),yes)
6eb07e73 252OBJS+= amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o
6eb07e73
DB
253endif
254
bc634f6f 255ifeq ($(AMR_NB_FIXED),yes)
3ed410a6
DB
256EXTRAOBJS += amr/*.o
257EXTRADEPS=amrlibs
891f64b3 258endif
259
e0fb7e5b 260ifeq ($(AMR_WB),yes)
e0fb7e5b
DB
261OBJS+= amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o \
262 amrwb_float/dec_if.o amrwb_float/dec_lpc.o amrwb_float/dec_main.o \
263 amrwb_float/dec_rom.o amrwb_float/dec_util.o amrwb_float/enc_acelp.o \
264 amrwb_float/enc_dtx.o amrwb_float/enc_gain.o amrwb_float/enc_if.o \
265 amrwb_float/enc_lpc.o amrwb_float/enc_main.o amrwb_float/enc_rom.o \
266 amrwb_float/enc_util.o amrwb_float/if_rom.o
e0fb7e5b
DB
267endif
268
e0fb7e5b 269
9c3d33d6
MN
270ifeq ($(HAVE_PTHREADS),yes)
271OBJS+= pthread.o
272endif
273
16806499
MN
274ifeq ($(HAVE_W32THREADS),yes)
275OBJS+= w32thread.o
276endif
277
e2a5fd20
MN
278ifeq ($(HAVE_OS2THREADS),yes)
279OBJS+= os2thread.o
280endif
281
282
2450cff2
FR
283ifeq ($(HAVE_BEOSTHREADS),yes)
284OBJS+= beosthread.o
285endif
286
980fc7b8 287ASM_OBJS=
de6d9b64 288
4f1bb8a9
IK
289ifeq ($(HAVE_XVMC_ACCEL),yes)
290OBJS+= xvmcvideo.o
291endif
292
57514323 293# currently using liba52 for ac3 decoding
d771bcae 294ifeq ($(CONFIG_AC3),yes)
57514323 295OBJS+= a52dec.o
57514323
ZK
296
297# using builtin liba52 or runtime linked liba52.so.0
ff4ec49e 298ifneq ($(CONFIG_A52BIN),yes)
57514323 299OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \
521221cf 300 liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o
d771bcae 301endif
ff4ec49e 302endif
de6d9b64 303
2cf30841 304EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
c11c2bc2 305
23c99253
MN
306# currently using libdts for dts decoding
307ifeq ($(CONFIG_DTS),yes)
308OBJS+= dtsdec.o
fe9a734c 309CFLAGS += $(DTS_INC)
23c99253
MN
310endif
311
280bd7b7
ZK
312ifeq ($(CONFIG_FAAD),yes)
313OBJS+= faad.o
314endif
315
29d48296
MN
316ifeq ($(CONFIG_FAAC),yes)
317OBJS+= faac.o
29d48296
MN
318endif
319
1ddadfa9
AT
320ifeq ($(CONFIG_XVID),yes)
321OBJS+= xvidff.o
64b7c5b6 322OBJS+= xvid_rc.o
1ddadfa9
AT
323endif
324
6662ec29
MN
325ifeq ($(CONFIG_X264),yes)
326OBJS+= x264.o
6662ec29
MN
327endif
328
5798368b
J
329ifeq ($(CONFIG_MP3LAME),yes)
330OBJS += mp3lameaudio.o
331endif
332
5c5dea3f 333ifeq ($(CONFIG_LIBOGG),yes)
5c5dea3f 334ifeq ($(CONFIG_LIBVORBIS),yes)
81e0d0b4 335OBJS += oggvorbis.o
81e0d0b4 336endif
5c5dea3f
NB
337ifeq ($(CONFIG_LIBTHEORA), yes)
338OBJS += oggtheora.o
5c5dea3f
NB
339endif
340endif
81e0d0b4 341
bb4c2140
MN
342ifeq ($(CONFIG_LIBGSM),yes)
343OBJS += libgsm.o
bb4c2140
MN
344endif
345
de6d9b64 346# i386 mmx specific stuff
980fc7b8 347ifeq ($(TARGET_MMX),yes)
4300403e 348OBJS += i386/fdct_mmx.o i386/cputest.o \
de1ee36a 349 i386/dsputil_mmx.o i386/mpegvideo_mmx.o \
57514323 350 i386/idct_mmx.o i386/motion_est_mmx.o \
38acbc3c 351 i386/simple_idct_mmx.o i386/fft_sse.o i386/vp3dsp_mmx.o \
4567b4bd 352 i386/vp3dsp_sse2.o i386/fft_3dn.o i386/fft_3dn2.o i386/snowdsp_mmx.o
84740d59
MN
353ifeq ($(CONFIG_GPL),yes)
354OBJS += i386/idct_mmx_xvid.o
355endif
87318d69 356ifeq ($(TARGET_BUILTIN_VECTOR),yes)
a968e365 357i386/fft_sse.o: CFLAGS+= -msse
148beec7 358depend: CFLAGS+= -msse
a968e365 359endif
87318d69 360ifeq ($(TARGET_BUILTIN_3DNOW),yes)
82eb4b0f 361i386/fft_3dn.o: CFLAGS+= -m3dnow
c2f69579
GP
362ifeq ($(TARGET_ARCH_X86),yes)
363i386/fft_3dn2.o: CFLAGS+= -march=athlon
364endif
365ifeq ($(TARGET_ARCH_X86_64),yes)
366i386/fft_3dn2.o: CFLAGS+= -march=k8
367endif
82eb4b0f 368endif
de6d9b64
FB
369endif
370
3d03c0a2
FB
371# armv4l specific stuff
372ifeq ($(TARGET_ARCH_ARMV4L),yes)
6ad1fa5a 373ASM_OBJS += armv4l/jrevdct_arm.o armv4l/simple_idct_arm.o armv4l/dsputil_arm_s.o
676e200c 374OBJS += armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o
6ad1fa5a
BR
375ifeq ($(TARGET_IWMMXT),yes)
376OBJS += armv4l/dsputil_iwmmxt.o armv4l/mpegvideo_iwmmxt.o
377endif
3d03c0a2
FB
378endif
379
c34270f5
FB
380# sun mediaLib specific stuff
381# currently only works when libavcodec is used in mplayer
382ifeq ($(HAVE_MLIB),yes)
383OBJS += mlib/dsputil_mlib.o
384CFLAGS += $(MLIB_INC)
385endif
386
6ad1fa5a
BR
387# Intel IPP specific stuff
388# currently only works when libavcodec is used in mplayer
389ifeq ($(HAVE_IPP),yes)
390CFLAGS += $(IPP_INC)
391endif
392
1e98dffb
NK
393# alpha specific stuff
394ifeq ($(TARGET_ARCH_ALPHA),yes)
8b313a47
FH
395OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o \
396 alpha/simple_idct_alpha.o alpha/motion_est_alpha.o
f9bb4bdf 397ASM_OBJS += alpha/dsputil_alpha_asm.o alpha/motion_est_mvi_asm.o
647b610c 398CFLAGS += -fforce-addr
1e98dffb
NK
399endif
400
59925ef2 401ifeq ($(TARGET_ARCH_POWERPC),yes)
05c4072b 402OBJS += ppc/dsputil_ppc.o ppc/mpegvideo_ppc.o
ab6c65f6
BF
403endif
404
d46aba26 405ifeq ($(TARGET_MMI),yes)
5917d17c 406OBJS += ps2/dsputil_mmi.o ps2/idct_mmi.o ps2/mpegvideo_mmi.o
d46aba26
LS
407endif
408
ab6c65f6 409ifeq ($(TARGET_ALTIVEC),yes)
8d268a7d 410OBJS += ppc/dsputil_altivec.o ppc/mpegvideo_altivec.o ppc/idct_altivec.o \
a6a12a8a 411 ppc/fft_altivec.o ppc/gmc_altivec.o ppc/fdct_altivec.o \
22b48b85 412 ppc/dsputil_h264_altivec.o ppc/dsputil_snow_altivec.o
59925ef2
BF
413endif
414
0c6bd2ea
B
415ifeq ($(TARGET_ARCH_SH4),yes)
416OBJS+= sh4/idct_sh4.o sh4/dsputil_sh4.o sh4/dsputil_align.o
417endif
418
bb476ff3 419ifeq ($(TARGET_ARCH_SPARC),yes)
44f54ceb 420OBJS+=sparc/dsputil_vis.o
bb476ff3 421sparc/%.o: sparc/%.c
115329f1 422 $(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) -c -o $@ $<
bb476ff3 423endif
980fc7b8 424
4bdd05e7 425NAME=avcodec
c11c2bc2 426LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
0fd94442 427ifeq ($(BUILD_SHARED),yes)
f3b60109
DB
428LIBVERSION=$(LAVCVERSION)
429LIBMAJOR=$(LAVCMAJOR)
0fd94442 430endif
6d2abd6b 431TESTS= imgresample-test dct-test motion-test fft-test
de6d9b64 432
8b2121e3
MR
433include $(SRC_PATH)/common.mak
434
bc634f6f
ZK
435amrlibs:
436 $(MAKE) -C amr spclib fipoplib
437
c10e9f70 438tests: apiexample cpuid_test $(TESTS)
de6d9b64 439
de6d9b64
FB
440dsputil.o: dsputil.c dsputil.h
441
c7f1a2f5 442clean::
8b2121e3 443 rm -f \
98013cc1 444 i386/*.o i386/*~ \
3d03c0a2 445 armv4l/*.o armv4l/*~ \
c34270f5 446 mlib/*.o mlib/*~ \
1e98dffb 447 alpha/*.o alpha/*~ \
59925ef2 448 ppc/*.o ppc/*~ \
d46aba26 449 ps2/*.o ps2/*~ \
0c6bd2ea 450 sh4/*.o sh4/*~ \
bb476ff3 451 sparc/*.o sparc/*~ \
57514323 452 liba52/*.o liba52/*~ \
c7f1a2f5 453 amr_float/*.o \
57514323 454 apiexample $(TESTS)
215e46e6
DB
455 -$(MAKE) -C amr clean
456 -$(MAKE) -C amrwb_float -f makefile.gcc clean
d663a1fd 457
de6d9b64
FB
458# api example program
459apiexample: apiexample.c $(LIB)
dc9cc5ed 460 $(CC) $(CFLAGS) -o $@ $< $(LIB) $(LIBAVUTIL) $(EXTRALIBS)
de6d9b64 461
c10e9f70
NK
462# cpuid test
463cpuid_test: i386/cputest.c
464 $(CC) $(CFLAGS) -D__TEST__ -o $@ $<
465
de6d9b64
FB
466# testing progs
467
468imgresample-test: imgresample.c
6acce86b 469 $(CC) $(CFLAGS) -DTEST -o $@ $^ -lm
de6d9b64 470
9ebc63a9 471dct-test: dct-test.o fdctref.o $(LIB)
434df899 472 $(CC) -o $@ $^ -lm $(LIBAVUTIL)
d771bcae 473
4300403e 474motion-test: motion_test.o $(LIB)
6acce86b 475 $(CC) -o $@ $^ -lm
4300403e 476
923ceff8 477fft-test: fft-test.o $(LIB)
c11c2bc2 478 $(CC) -o $@ $^ $(LIBAVUTIL) -lm