af_volnorm: fix output range with float input
[mplayer.git] / Makefile
blobd649847000bf3641e6f8edc35f6b4f7cdb7b7995
1 # MPlayer Makefile
3 # copyright (c) 2008 Diego Biurrun
4 # Rewritten entirely from a set of Makefiles written by Arpi and many others.
6 # This file is part of MPlayer.
8 # MPlayer is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # MPlayer is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with MPlayer; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 include config.mak
24 ###### variable declarations #######
26 SRCS_AUDIO_INPUT-$(ALSA) += stream/ai_alsa1x.c
27 SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
28 SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes)
29 SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \
30 stream/cdinfo.c
31 SRCS_COMMON-$(CDDB) += stream/stream_cddb.c
32 SRCS_COMMON-$(DVBIN) += stream/dvb_tune.c \
33 stream/stream_dvb.c
34 SRCS_COMMON-$(DVDNAV) += stream/stream_dvdnav.c
35 SRCS_COMMON-$(DVDNAV_INTERNAL) += libdvdnav/dvdnav.c \
36 libdvdnav/highlight.c \
37 libdvdnav/navigation.c \
38 libdvdnav/read_cache.c \
39 libdvdnav/remap.c \
40 libdvdnav/searching.c \
41 libdvdnav/settings.c \
42 libdvdnav/vm/decoder.c \
43 libdvdnav/vm/vm.c \
44 libdvdnav/vm/vmcmd.c \
46 SRCS_COMMON-$(DVDREAD) += stream/stream_dvd.c \
47 stream/stream_dvd_common.c
48 SRCS_COMMON-$(DVDREAD_INTERNAL) += libdvdread4/bitreader.c \
49 libdvdread4/dvd_input.c \
50 libdvdread4/dvd_reader.c \
51 libdvdread4/dvd_udf.c \
52 libdvdread4/ifo_print.c \
53 libdvdread4/ifo_read.c \
54 libdvdread4/md5.c \
55 libdvdread4/nav_print.c \
56 libdvdread4/nav_read.c \
58 SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c
59 SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c
61 # These filters use private headers and do not work with shared libavcodec.
62 SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_mcdeint.c \
63 libmpcodecs/vf_spp.c \
65 SRCS_COMMON-$(FTP) += stream/stream_ftp.c
66 SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c
67 SRCS_COMMON-$(HAVE_POSIX_SELECT) += libmpcodecs/vf_bmovl.c
68 SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c
69 SRCS_COMMON-$(JPEG) += libmpcodecs/vd_ijpg.c
70 SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c
71 SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_liba52.c
72 SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \
73 sub/ass_mp.c \
74 sub/osd_libass.c \
75 sub/sd_ass.c \
77 # compiled if libass is NOT enabled
78 SRCS_COMMON-NEGATED-$(LIBASS) += sub/osd_dummy.c
80 SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c
81 SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c
82 SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
83 SRCS_COMMON-$(LIBDV) += libmpcodecs/ad_libdv.c \
84 libmpcodecs/vd_libdv.c \
85 libmpdemux/demux_rawdv.c
86 SRCS_COMMON-$(LIBDVDCSS_INTERNAL) += libdvdcss/css.c \
87 libdvdcss/device.c \
88 libdvdcss/error.c \
89 libdvdcss/ioctl.c \
90 libdvdcss/libdvdcss.c \
92 SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
94 SRCS_COMMON-$(LIBNUT) += libmpdemux/demux_nut.c
95 SRCS_COMMON-$(LIBPOSTPROC) += libmpcodecs/vf_pp.c
96 SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
98 SRCS_COMMON-$(LIBTHEORA) += libmpcodecs/vd_theora.c
99 SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.m
100 SRCS_COMMON-$(COCOA) += libvo/osx_common.c \
101 libvo/cocoa_common.m \
102 osdep/cocoa_events.m
103 SRCS_COMMON-$(MNG) += libmpdemux/demux_mng.c
104 SRCS_COMMON-$(MPG123) += libmpcodecs/ad_mpg123.c
106 SRCS_COMMON-$(MUSEPACK) += libmpcodecs/ad_mpc.c \
107 libmpdemux/demux_mpc.c
109 SRCS_COMMON-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c
110 SRCS_COMMON-$(NEED_GLOB) += osdep/glob-win.c
111 SRCS_COMMON-$(NEED_SETENV) += osdep/setenv.c
112 SRCS_COMMON-$(NEED_SHMEM) += osdep/shmem.c
113 SRCS_COMMON-$(NEED_STRSEP) += osdep/strsep.c
114 SRCS_COMMON-$(NEED_SWAB) += osdep/swab.c
115 SRCS_COMMON-$(NEED_VSSCANF) += osdep/vsscanf.c
116 SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \
117 stream/asf_mmst_streaming.c \
118 stream/asf_streaming.c \
119 stream/cookies.c \
120 stream/http.c \
121 stream/network.c \
122 stream/pnm.c \
123 stream/rtp.c \
124 stream/udp.c \
125 stream/tcp.c \
126 stream/stream_rtp.c \
127 stream/stream_udp.c \
129 SRCS_COMMON-$(PNG) += libmpcodecs/vd_mpng.c
130 SRCS_COMMON-$(PRIORITY) += osdep/priority.c
131 SRCS_COMMON-$(PVR) += stream/stream_pvr.c
132 SRCS_COMMON-$(QTX_CODECS) += libmpcodecs/ad_qtaudio.c \
133 libmpcodecs/vd_qtvideo.c
134 SRCS_COMMON-$(RADIO) += stream/stream_radio.c
135 SRCS_COMMON-$(RADIO_CAPTURE) += stream/audio_in.c
136 SRCS_COMMON-$(REAL_CODECS) += libmpcodecs/ad_realaud.c \
137 libmpcodecs/vd_realvid.c
138 SRCS_COMMON-$(SPEEX) += libmpcodecs/ad_speex.c
139 SRCS_COMMON-$(STREAM_CACHE) += stream/cache2.c
141 SRCS_COMMON-$(TV) += stream/stream_tv.c stream/tv.c \
142 stream/frequencies.c stream/tvi_dummy.c
143 SRCS_COMMON-$(TV_BSDBT848) += stream/tvi_bsdbt848.c
144 SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c \
145 loader/dshow/guids.c \
146 loader/dshow/mediatype.c \
148 SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c
149 SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
150 SRCS_COMMON-$(UNRAR_EXEC) += sub/unrar_exec.c
151 SRCS_COMMON-$(VCD) += stream/stream_vcd.c
152 SRCS_COMMON-$(VORBIS) += libmpcodecs/ad_libvorbis.c \
153 libmpdemux/demux_ogg.c
154 SRCS_COMMON-$(VSTREAM) += stream/stream_vstream.c
155 SRCS_QTX_EMULATION += loader/wrapper.S
156 SRCS_COMMON-$(QTX_EMULATION) += $(SRCS_QTX_EMULATION)
157 SRCS_WIN32_EMULATION += loader/elfdll.c \
158 loader/ext.c \
159 loader/ldt_keeper.c \
160 loader/module.c \
161 loader/pe_image.c \
162 loader/pe_resource.c \
163 loader/registry.c \
164 loader/resource.c \
165 loader/win32.c \
167 SRCS_COMMON-$(WIN32_EMULATION) += $(SRCS_WIN32_EMULATION)
169 SRCS_COMMON-$(WIN32DLL) += libmpcodecs/ad_acm.c \
170 libmpcodecs/ad_dmo.c \
171 libmpcodecs/ad_dshow.c \
172 libmpcodecs/ad_twin.c \
173 libmpcodecs/vd_dmo.c \
174 libmpcodecs/vd_dshow.c \
175 libmpcodecs/vd_vfw.c \
176 libmpcodecs/vd_vfwex.c \
177 libmpdemux/demux_avs.c \
178 loader/afl.c \
179 loader/drv.c \
180 loader/vfl.c \
181 loader/dshow/DS_AudioDecoder.c \
182 loader/dshow/DS_Filter.c \
183 loader/dshow/DS_VideoDecoder.c \
184 loader/dshow/allocator.c \
185 loader/dshow/cmediasample.c \
186 loader/dshow/graph.c \
187 loader/dshow/guids.c \
188 loader/dshow/inputpin.c \
189 loader/dshow/mediatype.c \
190 loader/dshow/outputpin.c \
191 loader/dmo/DMO_AudioDecoder.c \
192 loader/dmo/DMO_VideoDecoder.c \
193 loader/dmo/buffer.c \
194 loader/dmo/dmo.c \
195 loader/dmo/dmo_guids.c \
197 SRCS_COMMON-$(XANIM_CODECS) += libmpcodecs/vd_xanim.c
198 SRCS_COMMON-$(XMMS_PLUGINS) += libmpdemux/demux_xmms.c
199 SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c
201 SRCS_COMMON = asxparser.c \
202 av_log.c \
203 av_opts.c \
204 bstr.c \
205 codec-cfg.c \
206 cpudetect.c \
207 defaultopts.c \
208 fmt-conversion.c \
209 m_config.c \
210 m_option.c \
211 m_struct.c \
212 mp_msg.c \
213 mpcommon.c \
214 parser-cfg.c \
215 path.c \
216 playtree.c \
217 playtreeparser.c \
218 subopt-helper.c \
219 talloc.c \
220 libaf/af.c \
221 libaf/af_center.c \
222 libaf/af_channels.c \
223 libaf/af_comp.c \
224 libaf/af_delay.c \
225 libaf/af_dummy.c \
226 libaf/af_equalizer.c \
227 libaf/af_extrastereo.c \
228 libaf/af_format.c \
229 libaf/af_gate.c \
230 libaf/af_hrtf.c \
231 libaf/af_karaoke.c \
232 libaf/af_lavcac3enc.c \
233 libaf/af_lavcresample.c \
234 libaf/af_pan.c \
235 libaf/af_resample.c \
236 libaf/af_scaletempo.c \
237 libaf/af_sinesuppress.c \
238 libaf/af_stats.c \
239 libaf/af_sub.c \
240 libaf/af_surround.c \
241 libaf/af_sweep.c \
242 libaf/af_tools.c \
243 libaf/af_volnorm.c \
244 libaf/af_volume.c \
245 libaf/filter.c \
246 libaf/format.c \
247 libaf/reorder_ch.c \
248 libaf/window.c \
249 libmpcodecs/ad.c \
250 libmpcodecs/ad_alaw.c \
251 libmpcodecs/ad_dk3adpcm.c \
252 libmpcodecs/ad_dvdpcm.c \
253 libmpcodecs/ad_ffmpeg.c \
254 libmpcodecs/ad_hwac3.c \
255 libmpcodecs/ad_hwmpa.c \
256 libmpcodecs/ad_imaadpcm.c \
257 libmpcodecs/ad_msadpcm.c \
258 libmpcodecs/ad_pcm.c \
259 libmpcodecs/dec_audio.c \
260 libmpcodecs/dec_teletext.c \
261 libmpcodecs/dec_video.c \
262 libmpcodecs/img_format.c \
263 libmpcodecs/mp_image.c \
264 libmpcodecs/pullup.c \
265 libmpcodecs/vd.c \
266 libmpcodecs/vd_ffmpeg.c \
267 libmpcodecs/vd_hmblck.c \
268 libmpcodecs/vd_lzo.c \
269 libmpcodecs/vd_mpegpes.c \
270 libmpcodecs/vd_mtga.c \
271 libmpcodecs/vd_null.c \
272 libmpcodecs/vd_raw.c \
273 libmpcodecs/vd_sgi.c \
274 libmpcodecs/vf.c \
275 libmpcodecs/vf_1bpp.c \
276 libmpcodecs/vf_2xsai.c \
277 libmpcodecs/vf_blackframe.c \
278 libmpcodecs/vf_boxblur.c \
279 libmpcodecs/vf_crop.c \
280 libmpcodecs/vf_cropdetect.c \
281 libmpcodecs/vf_decimate.c \
282 libmpcodecs/vf_delogo.c \
283 libmpcodecs/vf_denoise3d.c \
284 libmpcodecs/vf_detc.c \
285 libmpcodecs/vf_dint.c \
286 libmpcodecs/vf_divtc.c \
287 libmpcodecs/vf_down3dright.c \
288 libmpcodecs/vf_dsize.c \
289 libmpcodecs/vf_dvbscale.c \
290 libmpcodecs/vf_eq.c \
291 libmpcodecs/vf_eq2.c \
292 libmpcodecs/vf_expand.c \
293 libmpcodecs/vf_field.c \
294 libmpcodecs/vf_fil.c \
295 libmpcodecs/vf_filmdint.c \
296 libmpcodecs/vf_fixpts.c \
297 libmpcodecs/vf_flip.c \
298 libmpcodecs/vf_format.c \
299 libmpcodecs/vf_framestep.c \
300 libmpcodecs/vf_fspp.c \
301 libmpcodecs/vf_geq.c \
302 libmpcodecs/vf_gradfun.c \
303 libmpcodecs/vf_halfpack.c \
304 libmpcodecs/vf_harddup.c \
305 libmpcodecs/vf_hqdn3d.c \
306 libmpcodecs/vf_hue.c \
307 libmpcodecs/vf_il.c \
308 libmpcodecs/vf_ilpack.c \
309 libmpcodecs/vf_ivtc.c \
310 libmpcodecs/vf_kerndeint.c \
311 libmpcodecs/vf_lavc.c \
312 libmpcodecs/vf_lavcdeint.c \
313 libmpcodecs/vf_mirror.c \
314 libmpcodecs/vf_noformat.c \
315 libmpcodecs/vf_noise.c \
316 libmpcodecs/vf_ow.c \
317 libmpcodecs/vf_palette.c \
318 libmpcodecs/vf_perspective.c \
319 libmpcodecs/vf_phase.c \
320 libmpcodecs/vf_pp7.c \
321 libmpcodecs/vf_pullup.c \
322 libmpcodecs/vf_qp.c \
323 libmpcodecs/vf_rectangle.c \
324 libmpcodecs/vf_remove_logo.c \
325 libmpcodecs/vf_rgbtest.c \
326 libmpcodecs/vf_rotate.c \
327 libmpcodecs/vf_sab.c \
328 libmpcodecs/vf_scale.c \
329 libmpcodecs/vf_screenshot.c \
330 libmpcodecs/vf_smartblur.c \
331 libmpcodecs/vf_softpulldown.c \
332 libmpcodecs/vf_stereo3d.c \
333 libmpcodecs/vf_softskip.c \
334 libmpcodecs/vf_swapuv.c \
335 libmpcodecs/vf_telecine.c \
336 libmpcodecs/vf_test.c \
337 libmpcodecs/vf_tfields.c \
338 libmpcodecs/vf_tile.c \
339 libmpcodecs/vf_tinterlace.c \
340 libmpcodecs/vf_unsharp.c \
341 libmpcodecs/vf_uspp.c \
342 libmpcodecs/vf_vo.c \
343 libmpcodecs/vf_yadif.c \
344 libmpcodecs/vf_yuvcsp.c \
345 libmpcodecs/vf_yvu9.c \
346 libmpdemux/aac_hdr.c \
347 libmpdemux/asfheader.c \
348 libmpdemux/aviheader.c \
349 libmpdemux/aviprint.c \
350 libmpdemux/demuxer.c \
351 libmpdemux/demux_aac.c \
352 libmpdemux/demux_asf.c \
353 libmpdemux/demux_audio.c \
354 libmpdemux/demux_avi.c \
355 libmpdemux/demux_demuxers.c \
356 libmpdemux/demux_edl.c \
357 libmpdemux/demux_film.c \
358 libmpdemux/demux_fli.c \
359 libmpdemux/demux_lavf.c \
360 libmpdemux/demux_lmlm4.c \
361 libmpdemux/demux_mf.c \
362 libmpdemux/demux_mkv.c \
363 libmpdemux/demux_mov.c \
364 libmpdemux/demux_mpg.c \
365 libmpdemux/demux_nsv.c \
366 libmpdemux/demux_pva.c \
367 libmpdemux/demux_rawaudio.c \
368 libmpdemux/demux_rawvideo.c \
369 libmpdemux/demux_realaud.c \
370 libmpdemux/demux_real.c \
371 libmpdemux/demux_roq.c \
372 libmpdemux/demux_smjpeg.c \
373 libmpdemux/demux_ts.c \
374 libmpdemux/demux_ty.c \
375 libmpdemux/demux_viv.c \
376 libmpdemux/demux_vqf.c \
377 libmpdemux/demux_y4m.c \
378 libmpdemux/ebml.c \
379 libmpdemux/extension.c \
380 libmpdemux/mf.c \
381 libmpdemux/mp3_hdr.c \
382 libmpdemux/mp_taglists.c \
383 libmpdemux/mpeg_hdr.c \
384 libmpdemux/mpeg_packetizer.c \
385 libmpdemux/parse_es.c \
386 libmpdemux/parse_mp4.c \
387 libmpdemux/video.c \
388 libmpdemux/yuv4mpeg.c \
389 libmpdemux/yuv4mpeg_ratio.c \
390 libvo/osd.c \
391 libvo/bitmap_packer.c \
392 osdep/numcores.c \
393 osdep/io.c \
394 osdep/$(GETCH) \
395 osdep/$(TIMER) \
396 stream/stream.c \
397 stream/stream_cue.c \
398 stream/stream_ffmpeg.c \
399 stream/stream_file.c \
400 stream/stream_mf.c \
401 stream/stream_null.c \
402 stream/url.c \
403 sub/dec_sub.c \
404 sub/find_sub.c \
405 sub/find_subfiles.c \
406 sub/sd_lavc.c \
407 sub/spudec.c \
408 sub/sub.c \
409 sub/sub_cc.c \
410 sub/subassconvert.c \
411 sub/subreader.c \
412 sub/vobsub.c \
413 timeline/tl_edl.c \
414 timeline/tl_matroska.c \
415 $(SRCS_COMMON-yes) \
416 $(SRCS_COMMON-NEGATED-no)
419 SRCS_MPLAYER-$(ALSA) += libao2/ao_alsa.c
420 SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
421 SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
422 SRCS_MPLAYER-$(CACA) += libvo/vo_caca.c
423 SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_coreaudio.c
424 SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_corevideo.m
425 SRCS_MPLAYER-$(SHAREDBUFFER) += libvo/vo_sharedbuffer.m
426 SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c
427 SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c
428 SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c
429 SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
430 SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c libvo/vo_gl3.c \
431 pnm_loader.c
432 SRCS_MPLAYER-$(GL_SDL) += libvo/sdl_common.c
433 SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c
434 SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c
436 SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
437 SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
438 SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
439 SRCS_MPLAYER-$(LIBQUVI) += stream/quvi.c
440 SRCS_MPLAYER-$(LIRC) += input/lirc.c
441 SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
442 SRCS_MPLAYER-$(OPENAL) += libao2/ao_openal.c
443 SRCS_MPLAYER-$(OSS) += libao2/ao_oss.c
444 SRCS_MPLAYER-$(PNM) += libvo/vo_pnm.c
445 SRCS_MPLAYER-$(PULSE) += libao2/ao_pulse.c
446 SRCS_MPLAYER-$(PORTAUDIO) += libao2/ao_portaudio.c
447 SRCS_MPLAYER-$(RSOUND) += libao2/ao_rsound.c
448 SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c
449 SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c
450 SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c
451 SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c
452 SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c
454 SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/x11_common.c
455 SRCS_MPLAYER-$(XV) += libvo/vo_xv.c
456 SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c
458 SRCS_MPLAYER = command.c \
459 m_property.c \
460 mixer.c \
461 mp_fifo.c \
462 mplayer.c \
463 parser-mpcmd.c \
464 screenshot.c \
465 input/input.c \
466 libao2/ao_null.c \
467 libao2/ao_pcm.c \
468 libao2/audio_out.c \
469 libvo/aspect.c \
470 libvo/csputils.c \
471 libvo/filter_kernels.c \
472 libvo/geometry.c \
473 libvo/old_vo_wrapper.c \
474 libvo/video_out.c \
475 libvo/vo_null.c \
476 libvo/vo_png.c \
477 $(SRCS_MPLAYER-yes)
479 COMMON_LIBS += $(COMMON_LIBS-yes)
481 OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
482 OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)))
483 OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
484 OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
486 MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
487 DEP_FILES = $(patsubst %.S,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON:.m=.d) $(SRCS_MPLAYER:.m=.d)))
489 INSTALL_TARGETS += install-mplayer \
490 install-mplayer-man \
491 install-mplayer-msg
493 INSTALL_NO_MAN_TARGETS += install-mplayer \
494 install-mplayer-msg
496 DIRS = . \
497 input \
498 libaf \
499 libao2 \
500 libdvdcss \
501 libdvdnav \
502 libdvdnav/vm \
503 libdvdread4 \
504 libmpcodecs \
505 libmpcodecs/native \
506 libmpdemux \
507 libvo \
508 loader \
509 loader/dshow \
510 loader/dmo \
511 loader/wine \
512 osdep \
513 stream \
514 sub \
515 timeline \
516 TOOLS \
518 MOFILES := $(MSG_LANGS:%=locale/%/LC_MESSAGES/mplayer.mo)
520 ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h))
522 ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2)))
523 ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(DIRS))
524 ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
526 ###### brief build output #######
528 ifndef V
529 $(eval override CC = @printf "CC\t$$@\n"; $(CC))
530 $(eval override RM = @$(RM))
531 endif
533 ###### generic rules #######
535 all: mplayer$(EXESUF) locales
537 %.1: %.rst
538 @which $(RST2MAN) >/dev/null 2>&1 || (printf "\n\trst2man not found. You need the Docutils system to generate the manpages (preferably version >= 0.9; 0.8 and older are known to corrupt the arguments shown in some option descriptions). Alternatively you can use 'install-no-man' rule.\n\n" && exit 1)
539 $(RST2MAN) $< $@
541 %.o: %.S
542 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
544 %.o: %.c
545 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
547 %.o: %.m
548 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
550 %-rc.o: %.rc
551 $(WINDRES) -I. $< $@
553 mplayer$(EXESUF): $(MPLAYER_DEPS)
554 mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
555 mplayer$(EXESUF):
556 $(CC) -o $@ $^ $(EXTRALIBS)
558 codecs.conf.h: TOOLS/file2string.py etc/codecs.conf
559 ./$^ >$@
561 input/input.conf.h: TOOLS/file2string.py etc/input.conf
562 ./$^ >$@
564 libvo/vdpau_template.c: TOOLS/vdpau_functions.py
565 ./$< > $@
567 libvo/vo_gl3_shaders.h: TOOLS/file2string.py libvo/vo_gl3_shaders.glsl
568 ./$^ >$@
570 libmpdemux/ebml_types.h: TOOLS/matroska.py
571 ./$< --generate-header > $@
573 libmpdemux/ebml_defs.c: TOOLS/matroska.py
574 ./$< --generate-definitions > $@
576 sub/osd_font.h: TOOLS/file2string.py sub/osd_font.pfb
577 ./$^ >$@
579 # ./configure must be rerun if it changed
580 config.mak: configure
581 @echo "############################################################"
582 @echo "####### Please run ./configure again - it's changed! #######"
583 @echo "############################################################"
585 version.h .version: version.sh
586 ./$<
588 # Force version.sh to run to potentially regenerate version.h
589 -include .version
591 %$(EXESUF): %.c
592 $(CC) $(CFLAGS) -o $@ $^
594 locales: $(MOFILES)
596 locale/%/LC_MESSAGES/mplayer.mo: po/%.po
597 mkdir -p $(dir $@)
598 msgfmt -c -o $@ $<
600 %.ho: %.h
601 $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
603 checkheaders: $(ALLHEADERS:.h=.ho)
607 ###### dependency declarations / specific CFLAGS ######
609 # Make sure all generated header files are created.
610 codec-cfg.o: codecs.conf.h
611 mpcommon.o osdep/mplayer-rc.o: version.h
612 input/input.o: input/input.conf.h
613 libvo/vo_gl3.o: libvo/vo_gl3_shaders.h
614 libvo/vo_vdpau.o: libvo/vdpau_template.c
615 libmpdemux/ebml.o libmpdemux/demux_mkv.o: libmpdemux/ebml_types.h
616 libmpdemux/ebml.o: libmpdemux/ebml_defs.c
617 sub/osd_libass.o: sub/osd_font.h
619 # Files that depend on libavcodec internals
620 libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
622 osdep/mplayer-rc.o: osdep/mplayer.exe.manifest
624 libdvdcss/%: CFLAGS := -Ilibdvdcss -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)
625 libdvdnav/%: CFLAGS := -Ilibdvdnav -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)
626 libdvdread4/%: CFLAGS := -Ilibdvdread4 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS)
628 loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
629 #loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
630 loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
632 stream/stream_dvdnav%: CFLAGS := $(CFLAGS_LIBDVDNAV) $(CFLAGS)
636 ###### installation / clean / generic rules #######
638 install: $(INSTALL_TARGETS)
640 install-no-man: $(INSTALL_NO_MAN_TARGETS)
642 install-dirs:
643 if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
644 if test ! -d $(CONFDIR) ; then $(INSTALL) -d $(CONFDIR) ; fi
645 if test ! -d $(LIBDIR) ; then $(INSTALL) -d $(LIBDIR) ; fi
647 install-%: %$(EXESUF) install-dirs
648 $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
650 install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang))
651 install-mplayer-msg: $(foreach lang,$(MSG_LANGS),install-mplayer-msg-$(lang))
653 DOCS/man/en/mplayer.1: DOCS/man/en/*.rst
654 install-mplayer-man-en: DOCS/man/en/mplayer.1
655 if test ! -d $(MANDIR)/man1 ; then $(INSTALL) -d $(MANDIR)/man1 ; fi
656 $(INSTALL) -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
658 define MPLAYER_MAN_RULE
659 DOCS/man/$(lang)/mplayer.1: DOCS/man/$(lang)/*.rst
660 install-mplayer-man-$(lang): DOCS/man/$(lang)/mplayer.1
661 if test ! -d $(MANDIR)/$(lang)/man1 ; then $(INSTALL) -d $(MANDIR)/$(lang)/man1 ; fi
662 $(INSTALL) -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
663 endef
665 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE)))
667 define MPLAYER_MSG_RULE
668 install-mplayer-msg-$(lang):
669 if test ! -d $(LOCALEDIR)/$(lang)/LC_MESSAGES ; then $(INSTALL) -d $(LOCALEDIR)/$(lang)/LC_MESSAGES ; fi
670 $(INSTALL) -m 644 locale/$(lang)/LC_MESSAGES/mplayer.mo $(LOCALEDIR)/$(lang)/LC_MESSAGES/
671 endef
673 $(foreach lang,$(MSG_LANG_ALL),$(eval $(MPLAYER_MSG_RULE)))
675 uninstall:
676 $(RM) $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
677 $(RM) $(prefix)/share/pixmaps/mplayer.xpm
678 $(RM) $(prefix)/share/applications/mplayer.desktop
679 $(RM) $(MANDIR)/man1/mplayer.1
680 $(RM) $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1,$(MANDIR)/$(lang)/man1/$(man)))
681 $(RM) $(foreach lang,$(MSG_LANGS),$(LOCALEDIR)/$(lang)/LC_MESSAGES/mplayer.1)
683 clean:
684 -$(RM) $(call ADD_ALL_DIRS,/*.o /*.d /*.a /*.ho /*~)
685 -$(RM) $(call ADD_ALL_EXESUFS,mplayer)
686 -$(RM) $(MOFILES)
688 distclean: clean testsclean toolsclean
689 -$(RM) -r DOCS/tech/doxygen
690 -$(RM) -r locale
691 -$(RM) $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1,DOCS/man/$(lang)/$(man)))
692 -$(RM) config.log config.mak config.h codecs.conf.h version.h TAGS tags
693 -$(RM) input/input.conf.h
694 -$(RM) libvo/vdpau_template.c
695 -$(RM) libvo/vo_gl3_shaders.h
696 -$(RM) libmpdemux/ebml_types.h libmpdemux/ebml_defs.c
697 -$(RM) sub/osd_font.h
698 -$(RM) $(call ADD_ALL_EXESUFS,cpuinfo)
700 doxygen:
701 doxygen DOCS/tech/Doxyfile
703 TAGS:
704 $(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs etags -a
706 tags:
707 $(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a
709 ###### tests / tools #######
711 TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
713 LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
715 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
716 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
718 TESTS =
720 ifdef ARCH_X86
721 TESTS += loader/qtx/list loader/qtx/qtxload
722 endif
724 tests: $(addsuffix $(EXESUF),$(TESTS))
726 testsclean:
727 -$(RM) $(call ADD_ALL_EXESUFS,$(TESTS))
729 TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)
731 ifdef ARCH_X86
732 TOOLS += TOOLS/fastmemcpybench TOOLS/modify_reg
733 endif
735 ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc
737 tools: $(addsuffix $(EXESUF),$(TOOLS))
738 alltools: $(addsuffix $(EXESUF),$(ALLTOOLS))
740 toolsclean:
741 -$(RM) $(call ADD_ALL_EXESUFS,$(ALLTOOLS))
742 -$(RM) TOOLS/realcodecs/*.so.6.0
744 TOOLS/bmovl-test$(EXESUF): -lSDL_image
746 TOOLS/subrip$(EXESUF): sub/vobsub.o sub/spudec.o sub/unrar_exec.o \
747 libvo/aclib.o \ libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS)
749 TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
751 mplayer-nomain.o: mplayer.c
752 $(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
754 TOOLS/netstream$(EXESUF): TOOLS/netstream.c
755 TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
756 TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(OBJS_COMMON) $(COMMON_LIBS)
757 $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS)
759 REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
760 REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
762 realcodecs: $(REAL_TARGETS)
763 realcodecs: CFLAGS += -g
765 %.so.6.0: %.o
766 ld -shared -o $@ $< -ldl -lc
768 osxbundle:
769 @TOOLS/osxbundle.py mplayer
772 -include $(DEP_FILES)
774 .PHONY: all doxygen locales *install* *tools
775 .PHONY: checkheaders *clean tests .version
777 # Disable suffix rules. Most of the builtin rules are suffix rules,
778 # so this saves some time on slow systems.
779 .SUFFIXES:
781 # If a command returns failure but changed its target file, delete the
782 # (presumably malformed) file. Otherwise the file would be considered to
783 # be up to date if make is restarted.
785 .DELETE_ON_ERROR: