Commit | Line | Data |
---|---|---|
4cc281d9 FB |
1 | # |
2 | # libavcodec Makefile | |
6d6d7970 | 3 | # (c) 2000-2005 Fabrice Bellard |
4cc281d9 | 4 | # |
980fc7b8 FB |
5 | include ../config.mak |
6 | ||
4cc281d9 FB |
7 | VPATH=$(SRC_PATH)/libavcodec |
8 | ||
ff4ec49e | 9 | # NOTE: -I.. is needed to include config.h |
c11c2bc2 | 10 | CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS) |
de6d9b64 | 11 | |
caa336b4 | 12 | OBJS= bitstream.o utils.o mem.o allcodecs.o \ |
1d0d55da | 13 | mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\ |
7b1fa7db | 14 | mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \ |
1d0d55da | 15 | motion_est.o imgconvert.o imgresample.o \ |
4f1bb8a9 | 16 | mpeg12.o mpegaudiodec.o pcm.o simple_idct.o \ |
8b975b7c MN |
17 | ratecontrol.o adpcm.o eval.o error_resilience.o \ |
18 | fft.o mdct.o raw.o golomb.o cabac.o\ | |
c11c2bc2 | 19 | dpcm.o adx.o faandct.o parser.o g726.o \ |
860a40c8 MN |
20 | vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o dvdsub.o dvbsub.o dvbsubdec.o\ |
21 | opt.o | |
240c1657 | 22 | |
8b975b7c MN |
23 | ifeq ($(CONFIG_AASC_DECODER),yes) |
24 | OBJS+= aasc.o | |
25 | endif | |
26 | ifeq ($(CONFIG_ALAC_DECODER),yes) | |
27 | OBJS+= alac.o | |
28 | endif | |
29 | ifneq ($(CONFIG_ASV1_DECODER)$(CONFIG_ASV1_ENCODER)$(CONFIG_ASV2_DECODER)$(CONFIG_ASV2_ENCODER),) | |
30 | OBJS+= asv1.o | |
31 | endif | |
32 | ifeq ($(CONFIG_CINEPAK_DECODER),yes) | |
33 | OBJS+= cinepak.o | |
34 | endif | |
35 | ifneq ($(CONFIG_CLJR_DECODER)$(CONFIG_CLJR_ENCODER),) | |
36 | OBJS+= cljr.o | |
37 | endif | |
38 | ifeq ($(CONFIG_CYUV_DECODER),yes) | |
39 | OBJS+= cyuv.o | |
40 | endif | |
41 | ifneq ($(CONFIG_DVVIDEO_DECODER)$(CONFIG_DVVIDEO_ENCODER),) | |
42 | OBJS+= dv.o | |
43 | endif | |
44 | ifeq ($(CONFIG_EIGHTBPS_DECODER),yes) | |
45 | OBJS+= 8bps.o | |
46 | endif | |
47 | ifneq ($(CONFIG_FFV1_DECODER)$(CONFIG_FFV1_ENCODER),) | |
48 | OBJS+= ffv1.o | |
49 | endif | |
50 | ifeq ($(CONFIG_FLAC_DECODER),yes) | |
51 | OBJS+= flac.o | |
52 | endif | |
53 | ifeq ($(CONFIG_FLIC_DECODER),yes) | |
54 | OBJS+= flicvideo.o | |
55 | endif | |
56 | ifeq ($(CONFIG_FOURXM_DECODER),yes) | |
57 | OBJS+= 4xm.o | |
58 | endif | |
b81f8949 MM |
59 | ifeq ($(CONFIG_FRAPS_DECODER),yes) |
60 | OBJS+= fraps.o | |
61 | endif | |
8b975b7c MN |
62 | ifneq ($(CONFIG_H261_DECODER)$(CONFIG_H261_ENCODER),) |
63 | OBJS+= h261.o | |
64 | endif | |
65 | ifneq ($(CONFIG_H264_DECODER)$(CONFIG_SVQ3_DECODER),) | |
66 | OBJS+= h264.o | |
67 | endif | |
68 | ifneq ($(CONFIG_HUFFYUV_DECODER)$(CONFIG_HUFFYUV_ENCODER)$(CONFIG_FFVHUFF_DECODER)$(CONFIG_FFVHUFF_ENCODER),) | |
69 | OBJS+= huffyuv.o | |
70 | endif | |
71 | ifeq ($(CONFIG_IDCIN_DECODER),yes) | |
72 | OBJS+= idcinvideo.o | |
73 | endif | |
74 | ifeq ($(CONFIG_INDEO2_DECODER),yes) | |
75 | OBJS+= indeo2.o | |
76 | endif | |
77 | ifeq ($(CONFIG_INDEO3_DECODER),yes) | |
78 | OBJS+= indeo3.o | |
79 | endif | |
80 | ifeq ($(CONFIG_INTERPLAY_VIDEO_DECODER),yes) | |
81 | OBJS+= interplayvideo.o | |
82 | endif | |
83 | ifneq ($(CONFIG_MSZH_DECODER)$(CONFIG_ZLIB_DECODER)$(CONFIG_ZLIB_ENCODER),) | |
84 | OBJS+= lcl.o | |
85 | endif | |
86 | ifeq ($(CONFIG_LOCO_DECODER),yes) | |
87 | OBJS+= loco.o | |
88 | endif | |
89 | ifneq ($(CONFIG_MACE3_DECODER)$(CONFIG_MACE6_DECODER),) | |
90 | OBJS+= mace.o | |
91 | endif | |
92 | ifeq ($(CONFIG_MSRLE_DECODER),yes) | |
93 | OBJS+= msrle.o | |
94 | endif | |
95 | ifeq ($(CONFIG_MSVIDEO1_DECODER),yes) | |
96 | OBJS+= msvideo1.o | |
97 | endif | |
98 | ifneq ($(CONFIG_PNG_DECODER)$(CONFIG_PNG_ENCODER),) | |
99 | OBJS+= png.o | |
100 | endif | |
101 | ifeq ($(CONFIG_QDRAW_DECODER),yes) | |
102 | OBJS+= qdrw.o | |
103 | endif | |
104 | ifeq ($(CONFIG_QPEG_DECODER),yes) | |
105 | OBJS+= qpeg.o | |
106 | endif | |
107 | ifeq ($(CONFIG_QTRLE_DECODER),yes) | |
108 | OBJS+= qtrle.o | |
109 | endif | |
110 | ifeq ($(CONFIG_RA_144_DECODER),yes) | |
111 | OBJS+= ra144.o | |
112 | endif | |
113 | ifeq ($(CONFIG_RA_288_DECODER),yes) | |
114 | OBJS+= ra288.o | |
115 | endif | |
116 | ifeq ($(CONFIG_ROQ_DECODER),yes) | |
117 | OBJS+= roqvideo.o | |
118 | endif | |
119 | ifeq ($(CONFIG_RPZA_DECODER),yes) | |
120 | OBJS+= rpza.o | |
121 | endif | |
122 | ifneq ($(CONFIG_RV10_DECODER)$(CONFIG_RV20_DECODER)$(CONFIG_RV10_ENCODER)$(CONFIG_RV20_ENCODER),) | |
123 | OBJS+= rv10.o | |
124 | endif | |
125 | ifeq ($(CONFIG_SHORTEN_DECODER),yes) | |
126 | OBJS+= shorten.o | |
127 | endif | |
128 | ifeq ($(CONFIG_SMC_DECODER),yes) | |
129 | OBJS+= smc.o | |
130 | endif | |
0de1318a | 131 | ifneq ($(CONFIG_SNOW_DECODER)$(CONFIG_SNOW_ENCODER),) |
8b975b7c MN |
132 | OBJS+= snow.o |
133 | endif | |
134 | ifneq ($(CONFIG_SONIC_DECODER)$(CONFIG_SONIC_ENCODER)$(CONFIG_SONIC_LS_ENCODER),) | |
135 | OBJS+= sonic.o | |
136 | endif | |
137 | ifneq ($(CONFIG_SVQ1_DECODER)$(CONFIG_SVQ1_ENCODER),) | |
138 | OBJS+= svq1.o | |
139 | endif | |
140 | ifeq ($(CONFIG_TRUEMOTION1_DECODER),yes) | |
141 | OBJS+= truemotion1.o | |
142 | endif | |
143 | ifeq ($(CONFIG_TSCC_DECODER),yes) | |
144 | OBJS+= tscc.o | |
145 | endif | |
146 | ifeq ($(CONFIG_ULTI_DECODER),yes) | |
147 | OBJS+= ulti.o | |
148 | endif | |
149 | ifneq ($(CONFIG_VC9_DECODER)$(CONFIG_WMV3_DECODER),) | |
150 | OBJS+= vc9.o | |
151 | endif | |
152 | ifneq ($(CONFIG_VCR1_DECODER)$(CONFIG_VCR1_ENCODER),) | |
153 | OBJS+= vcr1.o | |
154 | endif | |
155 | ifneq ($(CONFIG_VMDVIDEO_DECODER)$(CONFIG_VMDAUDIO_DECODER),) | |
156 | OBJS+= vmdav.o | |
157 | endif | |
0bde73d9 MN |
158 | ifeq ($(CONFIG_VORBIS_DECODER),yes) |
159 | OBJS+= vorbis.o | |
160 | endif | |
8b975b7c MN |
161 | ifneq ($(CONFIG_VP3_DECODER)$(CONFIG_THEORA_DECODER),) |
162 | OBJS+= vp3.o | |
163 | endif | |
164 | ifeq ($(CONFIG_VQA_DECODER),yes) | |
165 | OBJS+= vqavideo.o | |
166 | endif | |
167 | ifneq ($(CONFIG_WMAV1_DECODER)$(CONFIG_WMAV2_DECODER),) | |
168 | OBJS+= wmadec.o | |
169 | endif | |
170 | ifeq ($(CONFIG_WNV1_DECODER),yes) | |
171 | OBJS+= wnv1.o | |
172 | endif | |
173 | ifeq ($(CONFIG_WS_SND1_DECODER),yes) | |
174 | OBJS+= ws-snd1.o | |
175 | endif | |
176 | ifneq ($(CONFIG_XAN_WC3_DECODER)$(CONFIG_XAN_WC4_DECODER),) | |
177 | OBJS+= xan.o | |
178 | endif | |
179 | ifeq ($(CONFIG_XL_DECODER),yes) | |
180 | OBJS+= xl.o | |
181 | endif | |
182 | ||
183 | ||
4d4bb927 | 184 | AMROBJS= |
891f64b3 | 185 | ifeq ($(AMR_NB),yes) |
bc634f6f | 186 | ifeq ($(AMR_NB_FIXED),yes) |
4d4bb927 | 187 | AMROBJS= amr.o |
bc634f6f ZK |
188 | AMREXTRALIBS+= amr/*.o |
189 | AMRLIBS=amrlibs | |
190 | CLEANAMR=cleanamr | |
191 | else | |
4d4bb927 RT |
192 | AMROBJS= amr.o |
193 | OBJS+= amr_float/sp_dec.o amr_float/sp_enc.o amr_float/interf_dec.o amr_float/interf_enc.o | |
bc634f6f ZK |
194 | CLEANAMR=cleanamrfloat |
195 | endif | |
891f64b3 | 196 | endif |
197 | ||
9c3d33d6 MN |
198 | ifeq ($(HAVE_PTHREADS),yes) |
199 | OBJS+= pthread.o | |
200 | endif | |
201 | ||
16806499 MN |
202 | ifeq ($(HAVE_W32THREADS),yes) |
203 | OBJS+= w32thread.o | |
204 | endif | |
205 | ||
2450cff2 FR |
206 | ifeq ($(HAVE_BEOSTHREADS),yes) |
207 | OBJS+= beosthread.o | |
208 | endif | |
209 | ||
d663a1fd | 210 | ifeq ($(AMR_WB),yes) |
4d4bb927 RT |
211 | AMROBJS= amr.o |
212 | OBJS+= amrwb_float/dec_acelp.o amrwb_float/dec_dtx.o amrwb_float/dec_gain.o \ | |
d663a1fd MN |
213 | amrwb_float/dec_if.o amrwb_float/dec_lpc.o amrwb_float/dec_main.o \ |
214 | amrwb_float/dec_rom.o amrwb_float/dec_util.o amrwb_float/enc_acelp.o \ | |
215 | amrwb_float/enc_dtx.o amrwb_float/enc_gain.o amrwb_float/enc_if.o \ | |
216 | amrwb_float/enc_lpc.o amrwb_float/enc_main.o amrwb_float/enc_rom.o \ | |
217 | amrwb_float/enc_util.o amrwb_float/if_rom.o | |
218 | endif | |
4d4bb927 | 219 | OBJS+= $(AMROBJS) |
d663a1fd | 220 | CLEANAMRWB=cleanamrwbfloat |
980fc7b8 | 221 | ASM_OBJS= |
de6d9b64 | 222 | |
4f1bb8a9 IK |
223 | ifeq ($(HAVE_XVMC_ACCEL),yes) |
224 | OBJS+= xvmcvideo.o | |
225 | endif | |
226 | ||
57514323 | 227 | # currently using liba52 for ac3 decoding |
d771bcae | 228 | ifeq ($(CONFIG_AC3),yes) |
57514323 | 229 | OBJS+= a52dec.o |
57514323 ZK |
230 | |
231 | # using builtin liba52 or runtime linked liba52.so.0 | |
ff4ec49e | 232 | ifneq ($(CONFIG_A52BIN),yes) |
57514323 | 233 | OBJS+= liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o \ |
521221cf | 234 | liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o |
d771bcae | 235 | endif |
ff4ec49e | 236 | endif |
de6d9b64 | 237 | |
a71a1dfc | 238 | EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF) |
c11c2bc2 | 239 | |
23c99253 MN |
240 | # currently using libdts for dts decoding |
241 | ifeq ($(CONFIG_DTS),yes) | |
242 | OBJS+= dtsdec.o | |
c5c97a8d MN |
243 | CFLAGS += $(DTS_INC) |
244 | EXTRALIBS += -ldts | |
23c99253 MN |
245 | endif |
246 | ||
280bd7b7 ZK |
247 | ifeq ($(CONFIG_FAAD),yes) |
248 | OBJS+= faad.o | |
445ad18d ZK |
249 | ifeq ($(CONFIG_FAADBIN),yes) |
250 | # no libs needed | |
251 | else | |
252 | EXTRALIBS += -lfaad | |
253 | endif | |
280bd7b7 ZK |
254 | endif |
255 | ||
29d48296 MN |
256 | ifeq ($(CONFIG_FAAC),yes) |
257 | OBJS+= faac.o | |
258 | EXTRALIBS += -lfaac | |
259 | endif | |
260 | ||
1ddadfa9 AT |
261 | ifeq ($(CONFIG_XVID),yes) |
262 | OBJS+= xvidff.o | |
263 | EXTRALIBS += -lxvidcore | |
264 | endif | |
265 | ||
6662ec29 MN |
266 | ifeq ($(CONFIG_X264),yes) |
267 | OBJS+= x264.o | |
7c653cc9 | 268 | EXTRALIBS += -lx264 |
6662ec29 MN |
269 | endif |
270 | ||
bba9b16c MN |
271 | ifeq ($(CONFIG_PP),yes) |
272 | ifeq ($(SHARED_PP),yes) | |
7919d97e | 273 | EXTRALIBS += -Llibpostproc -lpostproc$(BUILDSUF) |
bba9b16c MN |
274 | else |
275 | # LIBS += libpostproc/libpostproc.a ... should be fixed | |
276 | OBJS += libpostproc/postprocess.o | |
277 | endif | |
278 | endif | |
279 | ||
5798368b J |
280 | ifeq ($(CONFIG_MP3LAME),yes) |
281 | OBJS += mp3lameaudio.o | |
2a2a98c0 | 282 | EXTRALIBS += -lmp3lame |
5798368b J |
283 | endif |
284 | ||
5c5dea3f | 285 | ifeq ($(CONFIG_LIBOGG),yes) |
5c5dea3f | 286 | ifeq ($(CONFIG_LIBVORBIS),yes) |
81e0d0b4 | 287 | OBJS += oggvorbis.o |
078a8dd6 | 288 | EXTRALIBS += -lvorbisenc -lvorbis |
81e0d0b4 | 289 | endif |
5c5dea3f NB |
290 | ifeq ($(CONFIG_LIBTHEORA), yes) |
291 | OBJS += oggtheora.o | |
292 | EXTRALIBS += -ltheora | |
293 | endif | |
078a8dd6 | 294 | EXTRALIBS += -logg |
5c5dea3f | 295 | endif |
81e0d0b4 | 296 | |
bb4c2140 MN |
297 | ifeq ($(CONFIG_LIBGSM),yes) |
298 | OBJS += libgsm.o | |
299 | EXTRALIBS += -lgsm | |
300 | endif | |
301 | ||
43f1708f J |
302 | ifeq ($(TARGET_GPROF),yes) |
303 | CFLAGS+=-p | |
304 | LDFLAGS+=-p | |
305 | endif | |
306 | ||
de6d9b64 | 307 | # i386 mmx specific stuff |
980fc7b8 | 308 | ifeq ($(TARGET_MMX),yes) |
4300403e | 309 | OBJS += i386/fdct_mmx.o i386/cputest.o \ |
de1ee36a | 310 | i386/dsputil_mmx.o i386/mpegvideo_mmx.o \ |
57514323 | 311 | i386/idct_mmx.o i386/motion_est_mmx.o \ |
38acbc3c MM |
312 | i386/simple_idct_mmx.o i386/fft_sse.o i386/vp3dsp_mmx.o \ |
313 | i386/vp3dsp_sse2.o | |
84740d59 MN |
314 | ifeq ($(CONFIG_GPL),yes) |
315 | OBJS += i386/idct_mmx_xvid.o | |
316 | endif | |
a968e365 FB |
317 | ifdef TARGET_BUILTIN_VECTOR |
318 | i386/fft_sse.o: CFLAGS+= -msse | |
148beec7 | 319 | depend: CFLAGS+= -msse |
a968e365 | 320 | endif |
de6d9b64 FB |
321 | endif |
322 | ||
3d03c0a2 FB |
323 | # armv4l specific stuff |
324 | ifeq ($(TARGET_ARCH_ARMV4L),yes) | |
6ad1fa5a | 325 | ASM_OBJS += armv4l/jrevdct_arm.o armv4l/simple_idct_arm.o armv4l/dsputil_arm_s.o |
676e200c | 326 | OBJS += armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o |
6ad1fa5a BR |
327 | ifeq ($(TARGET_IWMMXT),yes) |
328 | OBJS += armv4l/dsputil_iwmmxt.o armv4l/mpegvideo_iwmmxt.o | |
329 | endif | |
3d03c0a2 FB |
330 | endif |
331 | ||
c34270f5 FB |
332 | # sun mediaLib specific stuff |
333 | # currently only works when libavcodec is used in mplayer | |
334 | ifeq ($(HAVE_MLIB),yes) | |
335 | OBJS += mlib/dsputil_mlib.o | |
336 | CFLAGS += $(MLIB_INC) | |
337 | endif | |
338 | ||
6ad1fa5a BR |
339 | # Intel IPP specific stuff |
340 | # currently only works when libavcodec is used in mplayer | |
341 | ifeq ($(HAVE_IPP),yes) | |
342 | CFLAGS += $(IPP_INC) | |
343 | endif | |
344 | ||
1e98dffb NK |
345 | # alpha specific stuff |
346 | ifeq ($(TARGET_ARCH_ALPHA),yes) | |
8b313a47 FH |
347 | OBJS += alpha/dsputil_alpha.o alpha/mpegvideo_alpha.o \ |
348 | alpha/simple_idct_alpha.o alpha/motion_est_alpha.o | |
f9bb4bdf | 349 | ASM_OBJS += alpha/dsputil_alpha_asm.o alpha/motion_est_mvi_asm.o |
647b610c | 350 | CFLAGS += -fforce-addr |
1e98dffb NK |
351 | endif |
352 | ||
59925ef2 | 353 | ifeq ($(TARGET_ARCH_POWERPC),yes) |
05c4072b | 354 | OBJS += ppc/dsputil_ppc.o ppc/mpegvideo_ppc.o |
ab6c65f6 BF |
355 | endif |
356 | ||
d46aba26 | 357 | ifeq ($(TARGET_MMI),yes) |
5917d17c | 358 | OBJS += ps2/dsputil_mmi.o ps2/idct_mmi.o ps2/mpegvideo_mmi.o |
d46aba26 LS |
359 | endif |
360 | ||
ab6c65f6 | 361 | ifeq ($(TARGET_ALTIVEC),yes) |
8d268a7d | 362 | OBJS += ppc/dsputil_altivec.o ppc/mpegvideo_altivec.o ppc/idct_altivec.o \ |
a6a12a8a RD |
363 | ppc/fft_altivec.o ppc/gmc_altivec.o ppc/fdct_altivec.o \ |
364 | ppc/dsputil_h264_altivec.o | |
59925ef2 BF |
365 | endif |
366 | ||
0c6bd2ea B |
367 | ifeq ($(TARGET_ARCH_SH4),yes) |
368 | OBJS+= sh4/idct_sh4.o sh4/dsputil_sh4.o sh4/dsputil_align.o | |
369 | endif | |
370 | ||
bb476ff3 | 371 | ifeq ($(TARGET_ARCH_SPARC),yes) |
44f54ceb | 372 | OBJS+=sparc/dsputil_vis.o |
bb476ff3 JM |
373 | sparc/%.o: sparc/%.c |
374 | $(CC) -mcpu=ultrasparc -mtune=ultrasparc $(CFLAGS) -c -o $@ $< | |
375 | endif | |
376 | ifeq ($(TARGET_ARCH_SPARC64),yes) | |
44f54ceb MN |
377 | CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc |
378 | endif | |
379 | ||
bb7d4939 | 380 | SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) |
ff4ec49e | 381 | OBJS := $(OBJS) $(ASM_OBJS) |
980fc7b8 | 382 | |
f3ec2d46 | 383 | LIB= $(LIBPREF)avcodec$(LIBSUF) |
c11c2bc2 | 384 | LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF) |
0fd94442 | 385 | ifeq ($(BUILD_SHARED),yes) |
f3ec2d46 | 386 | SLIB= $(SLIBPREF)avcodec$(SLIBSUF) |
0fd94442 | 387 | endif |
6d2abd6b | 388 | TESTS= imgresample-test dct-test motion-test fft-test |
de6d9b64 | 389 | |
0fd94442 | 390 | all: $(LIB) $(SLIB) |
ff4ec49e | 391 | |
bc634f6f ZK |
392 | amrlibs: |
393 | $(MAKE) -C amr spclib fipoplib | |
394 | ||
c10e9f70 | 395 | tests: apiexample cpuid_test $(TESTS) |
de6d9b64 | 396 | |
bc634f6f | 397 | $(LIB): $(OBJS) $(AMRLIBS) |
de6d9b64 | 398 | rm -f $@ |
bc634f6f | 399 | $(AR) rc $@ $(OBJS) $(AMREXTRALIBS) |
be7109c1 | 400 | $(RANLIB) $@ |
ff4ec49e | 401 | |
811b32ed | 402 | $(SLIB): $(OBJS) |
91378af4 | 403 | ifeq ($(CONFIG_PP),yes) |
8b8e1c55 | 404 | $(MAKE) -C libpostproc |
91378af4 | 405 | endif |
cf7412b5 FB |
406 | ifeq ($(CONFIG_WIN32),yes) |
407 | $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) | |
408 | -lib /machine:i386 /def:$(@:.dll=.def) | |
409 | else | |
1b8b121f | 410 | $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS) |
cf7412b5 | 411 | endif |
de6d9b64 FB |
412 | |
413 | dsputil.o: dsputil.c dsputil.h | |
414 | ||
bba9b16c MN |
415 | libpostproc/libpostproc.a: |
416 | $(MAKE) -C libpostproc | |
417 | ||
de6d9b64 | 418 | %.o: %.c |
80581e98 | 419 | $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
de6d9b64 | 420 | |
3d03c0a2 | 421 | %.o: %.S |
80581e98 | 422 | $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< |
3d03c0a2 | 423 | |
811b32ed | 424 | depend: $(SRCS) |
a968e365 | 425 | $(CC) -MM $(CFLAGS) $^ 1>.depend |
e51d4def | 426 | |
980fc7b8 FB |
427 | dep: depend |
428 | ||
bc634f6f | 429 | clean: $(CLEANAMR) |
77b71ddc | 430 | rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \ |
3d03c0a2 | 431 | armv4l/*.o armv4l/*~ \ |
c34270f5 | 432 | mlib/*.o mlib/*~ \ |
1e98dffb | 433 | alpha/*.o alpha/*~ \ |
59925ef2 | 434 | ppc/*.o ppc/*~ \ |
d46aba26 | 435 | ps2/*.o ps2/*~ \ |
0c6bd2ea | 436 | sh4/*.o sh4/*~ \ |
bb476ff3 | 437 | sparc/*.o sparc/*~ \ |
57514323 ZK |
438 | liba52/*.o liba52/*~ \ |
439 | apiexample $(TESTS) | |
64094f37 | 440 | $(MAKE) -C libpostproc clean |
de6d9b64 | 441 | |
800d7ceb | 442 | distclean: clean |
980fc7b8 FB |
443 | rm -f Makefile.bak .depend |
444 | ||
bc634f6f ZK |
445 | cleanamr: |
446 | $(MAKE) -C amr clean | |
447 | ||
448 | cleanamrfloat: | |
449 | rm -f amr_float/*.o | |
450 | ||
d663a1fd MN |
451 | cleanamrwbfloat: |
452 | $(MAKE) -C amrwb_float -f makefile.gcc clean | |
453 | ||
de6d9b64 FB |
454 | # api example program |
455 | apiexample: apiexample.c $(LIB) | |
c11c2bc2 | 456 | $(CC) $(CFLAGS) -o $@ $< $(LIB) $(LIBAVUTIL) $(EXTRALIBS) -lm |
de6d9b64 | 457 | |
c10e9f70 NK |
458 | # cpuid test |
459 | cpuid_test: i386/cputest.c | |
460 | $(CC) $(CFLAGS) -D__TEST__ -o $@ $< | |
461 | ||
de6d9b64 FB |
462 | # testing progs |
463 | ||
464 | imgresample-test: imgresample.c | |
6acce86b | 465 | $(CC) $(CFLAGS) -DTEST -o $@ $^ -lm |
de6d9b64 | 466 | |
9ebc63a9 | 467 | dct-test: dct-test.o fdctref.o $(LIB) |
434df899 | 468 | $(CC) -o $@ $^ -lm $(LIBAVUTIL) |
d771bcae | 469 | |
4300403e | 470 | motion-test: motion_test.o $(LIB) |
6acce86b | 471 | $(CC) -o $@ $^ -lm |
4300403e | 472 | |
923ceff8 | 473 | fft-test: fft-test.o $(LIB) |
c11c2bc2 | 474 | $(CC) -o $@ $^ $(LIBAVUTIL) -lm |
6d2abd6b | 475 | |
0fd94442 | 476 | ifeq ($(BUILD_SHARED),yes) |
cb728d79 FB |
477 | install: all install-headers |
478 | ifeq ($(CONFIG_WIN32),yes) | |
65d1bea2 | 479 | install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)" |
cb728d79 | 480 | else |
cc973ecb LB |
481 | install -d $(libdir) |
482 | install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavcodec-$(VERSION).so | |
483 | ln -sf libavcodec-$(VERSION).so $(libdir)/libavcodec.so | |
f39e56a8 | 484 | $(LDCONFIG) || true |
cb728d79 | 485 | endif |
91378af4 | 486 | ifeq ($(CONFIG_PP),yes) |
8b8e1c55 | 487 | $(MAKE) -C libpostproc $@ |
91378af4 | 488 | endif |
cb728d79 FB |
489 | else |
490 | install: | |
0fd94442 | 491 | endif |
773cefc6 | 492 | |
cb728d79 | 493 | installlib: all install-headers |
cc973ecb | 494 | install -m 644 $(LIB) "$(libdir)" |
cb728d79 FB |
495 | |
496 | install-headers: | |
497 | mkdir -p "$(prefix)/include/ffmpeg" | |
07bd15c3 | 498 | install -m 644 $(SRC_PATH)/libavcodec/avcodec.h \ |
cb728d79 | 499 | "$(prefix)/include/ffmpeg" |
def4272a AJ |
500 | install -d $(libdir)/pkgconfig |
501 | install -m 644 ../libavcodec.pc $(libdir)/pkgconfig | |
773cefc6 | 502 | |
d771bcae FB |
503 | # |
504 | # include dependency files if they exist | |
505 | # | |
506 | ifneq ($(wildcard .depend),) | |
507 | include .depend | |
508 | endif |