cleanup: Silence compilation warnings on MinGW-w64
[mplayer.git] / Makefile
blob80708c29bc39749e99ee6664d0bec009999badcd
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-$(BITMAP_FONT) += sub/font_load.c
30 SRCS_COMMON-$(CDDA) += stream/stream_cdda.c \
31 stream/cdinfo.c
32 SRCS_COMMON-$(CDDB) += stream/stream_cddb.c
33 SRCS_COMMON-$(DVBIN) += stream/dvb_tune.c \
34 stream/stream_dvb.c
35 SRCS_COMMON-$(DVDNAV) += stream/stream_dvdnav.c
36 SRCS_COMMON-$(DVDNAV_INTERNAL) += libdvdnav/dvdnav.c \
37 libdvdnav/highlight.c \
38 libdvdnav/navigation.c \
39 libdvdnav/read_cache.c \
40 libdvdnav/remap.c \
41 libdvdnav/searching.c \
42 libdvdnav/settings.c \
43 libdvdnav/vm/decoder.c \
44 libdvdnav/vm/vm.c \
45 libdvdnav/vm/vmcmd.c \
47 SRCS_COMMON-$(DVDREAD) += stream/stream_dvd.c \
48 stream/stream_dvd_common.c
49 SRCS_COMMON-$(DVDREAD_INTERNAL) += libdvdread4/bitreader.c \
50 libdvdread4/dvd_input.c \
51 libdvdread4/dvd_reader.c \
52 libdvdread4/dvd_udf.c \
53 libdvdread4/ifo_print.c \
54 libdvdread4/ifo_read.c \
55 libdvdread4/md5.c \
56 libdvdread4/nav_print.c \
57 libdvdread4/nav_read.c \
59 SRCS_COMMON-$(FAAD) += libmpcodecs/ad_faad.c
60 SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c
62 # These filters use private headers and do not work with shared libavcodec.
63 SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_mcdeint.c \
64 libmpcodecs/vf_spp.c \
66 SRCS_COMMON-$(FREETYPE) += sub/font_load_ft.c
67 SRCS_COMMON-$(FTP) += stream/stream_ftp.c
68 SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c
69 SRCS_COMMON-$(HAVE_POSIX_SELECT) += libmpcodecs/vf_bmovl.c
70 SRCS_COMMON-$(HAVE_SYS_MMAN_H) += libaf/af_export.c osdep/mmap_anon.c
71 SRCS_COMMON-$(JPEG) += libmpcodecs/vd_ijpg.c
72 SRCS_COMMON-$(LADSPA) += libaf/af_ladspa.c
73 SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_liba52.c
74 SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \
75 sub/ass_mp.c \
76 sub/sd_ass.c \
78 SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c
79 SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c
80 SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
81 SRCS_COMMON-$(LIBDV) += libmpcodecs/ad_libdv.c \
82 libmpcodecs/vd_libdv.c \
83 libmpdemux/demux_rawdv.c
84 SRCS_COMMON-$(LIBDVDCSS_INTERNAL) += libdvdcss/css.c \
85 libdvdcss/device.c \
86 libdvdcss/error.c \
87 libdvdcss/ioctl.c \
88 libdvdcss/libdvdcss.c \
90 SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
92 SRCS_COMMON-$(LIBNEMESI) += libmpdemux/demux_nemesi.c \
93 stream/stream_nemesi.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-$(LIVE555) += libmpdemux/demux_rtp.cpp \
100 libmpdemux/demux_rtp_codec.cpp \
101 stream/stream_live555.c
102 SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.c
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
108 SRCS_COMMON-$(NATIVE_RTSP) += stream/stream_rtsp.c \
109 stream/freesdp/common.c \
110 stream/freesdp/errorlist.c \
111 stream/freesdp/parser.c \
112 stream/librtsp/rtsp.c \
113 stream/librtsp/rtsp_rtp.c \
114 stream/librtsp/rtsp_session.c \
116 SRCS_COMMON-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c
117 SRCS_COMMON-$(NEED_GLOB) += osdep/glob-win.c
118 SRCS_COMMON-$(NEED_MMAP) += osdep/mmap-os2.c
119 SRCS_COMMON-$(NEED_SETENV) += osdep/setenv.c
120 SRCS_COMMON-$(NEED_SHMEM) += osdep/shmem.c
121 SRCS_COMMON-$(NEED_STRSEP) += osdep/strsep.c
122 SRCS_COMMON-$(NEED_SWAB) += osdep/swab.c
123 SRCS_COMMON-$(NEED_VSSCANF) += osdep/vsscanf.c
124 SRCS_COMMON-$(NETWORKING) += stream/stream_netstream.c \
125 stream/asf_mmst_streaming.c \
126 stream/asf_streaming.c \
127 stream/cookies.c \
128 stream/http.c \
129 stream/network.c \
130 stream/pnm.c \
131 stream/rtp.c \
132 stream/udp.c \
133 stream/tcp.c \
134 stream/stream_rtp.c \
135 stream/stream_udp.c \
136 stream/librtsp/rtsp.c \
137 stream/realrtsp/asmrp.c \
138 stream/realrtsp/real.c \
139 stream/realrtsp/rmff.c \
140 stream/realrtsp/sdpplin.c \
141 stream/realrtsp/xbuffer.c \
143 SRCS_COMMON-$(PNG) += libmpcodecs/vd_mpng.c
144 SRCS_COMMON-$(PRIORITY) += osdep/priority.c
145 SRCS_COMMON-$(PVR) += stream/stream_pvr.c
146 SRCS_COMMON-$(QTX_CODECS) += libmpcodecs/ad_qtaudio.c \
147 libmpcodecs/vd_qtvideo.c
148 SRCS_COMMON-$(RADIO) += stream/stream_radio.c
149 SRCS_COMMON-$(RADIO_CAPTURE) += stream/audio_in.c
150 SRCS_COMMON-$(REAL_CODECS) += libmpcodecs/ad_realaud.c \
151 libmpcodecs/vd_realvid.c
152 SRCS_COMMON-$(SPEEX) += libmpcodecs/ad_speex.c
153 SRCS_COMMON-$(STREAM_CACHE) += stream/cache2.c
155 SRCS_COMMON-$(TV) += stream/stream_tv.c stream/tv.c \
156 stream/frequencies.c stream/tvi_dummy.c
157 SRCS_COMMON-$(TV_BSDBT848) += stream/tvi_bsdbt848.c
158 SRCS_COMMON-$(TV_DSHOW) += stream/tvi_dshow.c \
159 loader/dshow/guids.c \
160 loader/dshow/mediatype.c \
162 SRCS_COMMON-$(TV_V4L1) += stream/tvi_v4l.c stream/audio_in.c
163 SRCS_COMMON-$(TV_V4L2) += stream/tvi_v4l2.c stream/audio_in.c
164 SRCS_COMMON-$(UNRAR_EXEC) += sub/unrar_exec.c
165 SRCS_COMMON-$(VCD) += stream/stream_vcd.c
166 SRCS_COMMON-$(VORBIS) += libmpcodecs/ad_libvorbis.c \
167 libmpdemux/demux_ogg.c
168 SRCS_COMMON-$(VSTREAM) += stream/stream_vstream.c
169 SRCS_QTX_EMULATION += loader/wrapper.S
170 SRCS_COMMON-$(QTX_EMULATION) += $(SRCS_QTX_EMULATION)
171 SRCS_WIN32_EMULATION += loader/elfdll.c \
172 loader/ext.c \
173 loader/ldt_keeper.c \
174 loader/module.c \
175 loader/pe_image.c \
176 loader/pe_resource.c \
177 loader/registry.c \
178 loader/resource.c \
179 loader/win32.c \
181 SRCS_COMMON-$(WIN32_EMULATION) += $(SRCS_WIN32_EMULATION)
183 SRCS_COMMON-$(WIN32DLL) += libmpcodecs/ad_acm.c \
184 libmpcodecs/ad_dmo.c \
185 libmpcodecs/ad_dshow.c \
186 libmpcodecs/ad_twin.c \
187 libmpcodecs/vd_dmo.c \
188 libmpcodecs/vd_dshow.c \
189 libmpcodecs/vd_vfw.c \
190 libmpcodecs/vd_vfwex.c \
191 libmpdemux/demux_avs.c \
192 loader/afl.c \
193 loader/drv.c \
194 loader/vfl.c \
195 loader/dshow/DS_AudioDecoder.c \
196 loader/dshow/DS_Filter.c \
197 loader/dshow/DS_VideoDecoder.c \
198 loader/dshow/allocator.c \
199 loader/dshow/cmediasample.c \
200 loader/dshow/graph.c \
201 loader/dshow/guids.c \
202 loader/dshow/inputpin.c \
203 loader/dshow/mediatype.c \
204 loader/dshow/outputpin.c \
205 loader/dmo/DMO_AudioDecoder.c \
206 loader/dmo/DMO_VideoDecoder.c \
207 loader/dmo/buffer.c \
208 loader/dmo/dmo.c \
209 loader/dmo/dmo_guids.c \
211 SRCS_COMMON-$(XANIM_CODECS) += libmpcodecs/vd_xanim.c
212 SRCS_COMMON-$(XMMS_PLUGINS) += libmpdemux/demux_xmms.c
213 SRCS_COMMON-$(XVID4) += libmpcodecs/vd_xvid4.c
214 SRCS_COMMON = asxparser.c \
215 av_log.c \
216 av_opts.c \
217 bstr.c \
218 codec-cfg.c \
219 cpudetect.c \
220 defaultopts.c \
221 edl.c \
222 fmt-conversion.c \
223 m_config.c \
224 m_option.c \
225 m_struct.c \
226 mp_msg.c \
227 mpcommon.c \
228 parser-cfg.c \
229 path.c \
230 playtree.c \
231 playtreeparser.c \
232 subopt-helper.c \
233 talloc.c \
234 libaf/af.c \
235 libaf/af_center.c \
236 libaf/af_channels.c \
237 libaf/af_comp.c \
238 libaf/af_delay.c \
239 libaf/af_dummy.c \
240 libaf/af_equalizer.c \
241 libaf/af_extrastereo.c \
242 libaf/af_format.c \
243 libaf/af_gate.c \
244 libaf/af_hrtf.c \
245 libaf/af_karaoke.c \
246 libaf/af_lavcac3enc.c \
247 libaf/af_lavcresample.c \
248 libaf/af_pan.c \
249 libaf/af_resample.c \
250 libaf/af_scaletempo.c \
251 libaf/af_sinesuppress.c \
252 libaf/af_stats.c \
253 libaf/af_sub.c \
254 libaf/af_surround.c \
255 libaf/af_sweep.c \
256 libaf/af_tools.c \
257 libaf/af_volnorm.c \
258 libaf/af_volume.c \
259 libaf/filter.c \
260 libaf/format.c \
261 libaf/reorder_ch.c \
262 libaf/window.c \
263 libmpcodecs/ad.c \
264 libmpcodecs/ad_alaw.c \
265 libmpcodecs/ad_dk3adpcm.c \
266 libmpcodecs/ad_dvdpcm.c \
267 libmpcodecs/ad_ffmpeg.c \
268 libmpcodecs/ad_hwac3.c \
269 libmpcodecs/ad_hwmpa.c \
270 libmpcodecs/ad_imaadpcm.c \
271 libmpcodecs/ad_msadpcm.c \
272 libmpcodecs/ad_pcm.c \
273 libmpcodecs/dec_audio.c \
274 libmpcodecs/dec_teletext.c \
275 libmpcodecs/dec_video.c \
276 libmpcodecs/img_format.c \
277 libmpcodecs/mp_image.c \
278 libmpcodecs/pullup.c \
279 libmpcodecs/vd.c \
280 libmpcodecs/vd_ffmpeg.c \
281 libmpcodecs/vd_hmblck.c \
282 libmpcodecs/vd_lzo.c \
283 libmpcodecs/vd_mpegpes.c \
284 libmpcodecs/vd_mtga.c \
285 libmpcodecs/vd_null.c \
286 libmpcodecs/vd_raw.c \
287 libmpcodecs/vd_sgi.c \
288 libmpcodecs/vf.c \
289 libmpcodecs/vf_1bpp.c \
290 libmpcodecs/vf_2xsai.c \
291 libmpcodecs/vf_blackframe.c \
292 libmpcodecs/vf_boxblur.c \
293 libmpcodecs/vf_crop.c \
294 libmpcodecs/vf_cropdetect.c \
295 libmpcodecs/vf_decimate.c \
296 libmpcodecs/vf_delogo.c \
297 libmpcodecs/vf_denoise3d.c \
298 libmpcodecs/vf_detc.c \
299 libmpcodecs/vf_dint.c \
300 libmpcodecs/vf_divtc.c \
301 libmpcodecs/vf_down3dright.c \
302 libmpcodecs/vf_dsize.c \
303 libmpcodecs/vf_dvbscale.c \
304 libmpcodecs/vf_eq.c \
305 libmpcodecs/vf_eq2.c \
306 libmpcodecs/vf_expand.c \
307 libmpcodecs/vf_field.c \
308 libmpcodecs/vf_fil.c \
309 libmpcodecs/vf_filmdint.c \
310 libmpcodecs/vf_fixpts.c \
311 libmpcodecs/vf_flip.c \
312 libmpcodecs/vf_format.c \
313 libmpcodecs/vf_framestep.c \
314 libmpcodecs/vf_fspp.c \
315 libmpcodecs/vf_geq.c \
316 libmpcodecs/vf_gradfun.c \
317 libmpcodecs/vf_halfpack.c \
318 libmpcodecs/vf_harddup.c \
319 libmpcodecs/vf_hqdn3d.c \
320 libmpcodecs/vf_hue.c \
321 libmpcodecs/vf_il.c \
322 libmpcodecs/vf_ilpack.c \
323 libmpcodecs/vf_ivtc.c \
324 libmpcodecs/vf_kerndeint.c \
325 libmpcodecs/vf_lavc.c \
326 libmpcodecs/vf_lavcdeint.c \
327 libmpcodecs/vf_mirror.c \
328 libmpcodecs/vf_noformat.c \
329 libmpcodecs/vf_noise.c \
330 libmpcodecs/vf_ow.c \
331 libmpcodecs/vf_palette.c \
332 libmpcodecs/vf_perspective.c \
333 libmpcodecs/vf_phase.c \
334 libmpcodecs/vf_pp7.c \
335 libmpcodecs/vf_pullup.c \
336 libmpcodecs/vf_qp.c \
337 libmpcodecs/vf_rectangle.c \
338 libmpcodecs/vf_remove_logo.c \
339 libmpcodecs/vf_rgbtest.c \
340 libmpcodecs/vf_rotate.c \
341 libmpcodecs/vf_sab.c \
342 libmpcodecs/vf_scale.c \
343 libmpcodecs/vf_screenshot.c \
344 libmpcodecs/vf_smartblur.c \
345 libmpcodecs/vf_softpulldown.c \
346 libmpcodecs/vf_stereo3d.c \
347 libmpcodecs/vf_softskip.c \
348 libmpcodecs/vf_swapuv.c \
349 libmpcodecs/vf_telecine.c \
350 libmpcodecs/vf_test.c \
351 libmpcodecs/vf_tfields.c \
352 libmpcodecs/vf_tile.c \
353 libmpcodecs/vf_tinterlace.c \
354 libmpcodecs/vf_unsharp.c \
355 libmpcodecs/vf_uspp.c \
356 libmpcodecs/vf_vo.c \
357 libmpcodecs/vf_yadif.c \
358 libmpcodecs/vf_yuvcsp.c \
359 libmpcodecs/vf_yvu9.c \
360 libmpdemux/aac_hdr.c \
361 libmpdemux/asfheader.c \
362 libmpdemux/aviheader.c \
363 libmpdemux/aviprint.c \
364 libmpdemux/demuxer.c \
365 libmpdemux/demux_aac.c \
366 libmpdemux/demux_asf.c \
367 libmpdemux/demux_audio.c \
368 libmpdemux/demux_avi.c \
369 libmpdemux/demux_demuxers.c \
370 libmpdemux/demux_edl.c \
371 libmpdemux/demux_film.c \
372 libmpdemux/demux_fli.c \
373 libmpdemux/demux_lavf.c \
374 libmpdemux/demux_lmlm4.c \
375 libmpdemux/demux_mf.c \
376 libmpdemux/demux_mkv.c \
377 libmpdemux/demux_mov.c \
378 libmpdemux/demux_mpg.c \
379 libmpdemux/demux_nsv.c \
380 libmpdemux/demux_pva.c \
381 libmpdemux/demux_rawaudio.c \
382 libmpdemux/demux_rawvideo.c \
383 libmpdemux/demux_realaud.c \
384 libmpdemux/demux_real.c \
385 libmpdemux/demux_roq.c \
386 libmpdemux/demux_smjpeg.c \
387 libmpdemux/demux_ts.c \
388 libmpdemux/demux_ty.c \
389 libmpdemux/demux_viv.c \
390 libmpdemux/demux_vqf.c \
391 libmpdemux/demux_y4m.c \
392 libmpdemux/ebml.c \
393 libmpdemux/extension.c \
394 libmpdemux/mf.c \
395 libmpdemux/mp3_hdr.c \
396 libmpdemux/mp_taglists.c \
397 libmpdemux/mpeg_hdr.c \
398 libmpdemux/mpeg_packetizer.c \
399 libmpdemux/parse_es.c \
400 libmpdemux/parse_mp4.c \
401 libmpdemux/video.c \
402 libmpdemux/yuv4mpeg.c \
403 libmpdemux/yuv4mpeg_ratio.c \
404 libvo/osd.c \
405 osdep/numcores.c \
406 osdep/$(GETCH) \
407 osdep/$(TIMER) \
408 stream/open.c \
409 stream/stream.c \
410 stream/stream_cue.c \
411 stream/stream_ffmpeg.c \
412 stream/stream_file.c \
413 stream/stream_mf.c \
414 stream/stream_null.c \
415 stream/url.c \
416 sub/av_sub.c \
417 sub/sub.c \
418 sub/sub_cc.c \
419 sub/dec_sub.c \
420 sub/find_sub.c \
421 sub/find_subfiles.c \
422 sub/spudec.c \
423 sub/subassconvert.c \
424 sub/subreader.c \
425 sub/vobsub.c \
426 timeline/tl_edl.c \
427 timeline/tl_matroska.c \
428 $(SRCS_COMMON-yes)
431 SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c
432 SRCS_MPLAYER-$(AA) += libvo/vo_aa.c
433 SRCS_MPLAYER-$(ALSA) += libao2/ao_alsa.c
434 SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
435 SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
436 SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c
437 SRCS_MPLAYER-$(BL) += libvo/vo_bl.c
438 SRCS_MPLAYER-$(CACA) += libvo/vo_caca.c
439 SRCS_MPLAYER-$(COREAUDIO) += libao2/ao_coreaudio.c
440 SRCS_MPLAYER-$(COREVIDEO) += libvo/vo_corevideo.m libvo/osx_common.c
441 SRCS_MPLAYER-$(DART) += libao2/ao_dart.c
442 SRCS_MPLAYER-$(DGA) += libvo/vo_dga.c
443 SRCS_MPLAYER-$(DIRECT3D) += libvo/vo_direct3d.c libvo/w32_common.c
444 SRCS_MPLAYER-$(DIRECTFB) += libvo/vo_directfb2.c libvo/vo_dfbmga.c
445 SRCS_MPLAYER-$(DIRECTX) += libao2/ao_dsound.c libvo/vo_directx.c
446 SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
447 SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
448 SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c
449 SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c
450 SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
451 SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \
452 pnm_loader.c
453 SRCS_MPLAYER-$(GL_COCOA) += libvo/cocoa_common.m
454 SRCS_MPLAYER-$(GL_SDL) += libvo/sdl_common.c
455 SRCS_MPLAYER-$(GL_WIN32) += libvo/w32_common.c
456 SRCS_MPLAYER-$(GL_X11) += libvo/x11_common.c
458 SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c
459 SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
460 SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
461 SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
462 SRCS_MPLAYER-$(KAI) += libao2/ao_kai.c
463 SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
464 SRCS_MPLAYER-$(LIRC) += input/lirc.c
465 SRCS_MPLAYER-$(MD5SUM) += libvo/vo_md5sum.c
466 SRCS_MPLAYER-$(MGA) += libvo/vo_mga.c
467 SRCS_MPLAYER-$(NAS) += libao2/ao_nas.c
468 SRCS_MPLAYER-$(OPENAL) += libao2/ao_openal.c
469 SRCS_MPLAYER-$(OSS) += libao2/ao_oss.c
470 SRCS_MPLAYER-$(PNM) += libvo/vo_pnm.c
471 SRCS_MPLAYER-$(PULSE) += libao2/ao_pulse.c
472 SRCS_MPLAYER-$(QUARTZ) += libvo/vo_quartz.c libvo/osx_common.c
473 SRCS_MPLAYER-$(RSOUND) += libao2/ao_rsound.c
474 SRCS_MPLAYER-$(S3FB) += libvo/vo_s3fb.c
475 SRCS_MPLAYER-$(SDL) += libao2/ao_sdl.c libvo/vo_sdl.c libvo/sdl_common.c
476 SRCS_MPLAYER-$(SGIAUDIO) += libao2/ao_sgi.c
477 SRCS_MPLAYER-$(SUNAUDIO) += libao2/ao_sun.c
478 SRCS_MPLAYER-$(SVGA) += libvo/vo_svga.c
479 SRCS_MPLAYER-$(TDFXFB) += libvo/vo_tdfxfb.c
480 SRCS_MPLAYER-$(TDFXVID) += libvo/vo_tdfx_vid.c
481 SRCS_MPLAYER-$(TGA) += libvo/vo_tga.c
482 SRCS_MPLAYER-$(V4L2) += libvo/vo_v4l2.c
483 SRCS_MPLAYER-$(V4L2) += libao2/ao_v4l2.c
484 SRCS_MPLAYER-$(VDPAU) += libvo/vo_vdpau.c
485 SRCS_MPLAYER-$(VESA) += libvo/gtf.c libvo/vo_vesa.c libvo/vesa_lvo.c
487 SRCS_MPLAYER-$(WII) += libvo/vo_wii.c
488 SRCS_MPLAYER-$(WIN32WAVEOUT) += libao2/ao_win32.c
489 SRCS_MPLAYER-$(X11) += libvo/vo_x11.c libvo/vo_xover.c \
490 libvo/x11_common.c
491 SRCS_MPLAYER-$(XMGA) += libvo/vo_xmga.c
492 SRCS_MPLAYER-$(XV) += libvo/vo_xv.c
493 SRCS_MPLAYER-$(XVR100) += libvo/vo_xvr100.c
494 SRCS_MPLAYER-$(YUV4MPEG) += libvo/vo_yuv4mpeg.c
496 SRCS_MPLAYER = command.c \
497 m_property.c \
498 mixer.c \
499 mp_fifo.c \
500 mplayer.c \
501 parser-mpcmd.c \
502 screenshot.c \
503 input/input.c \
504 libao2/ao_mpegpes.c \
505 libao2/ao_null.c \
506 libao2/ao_pcm.c \
507 libao2/audio_out.c \
508 libvo/aspect.c \
509 libvo/csputils.c \
510 libvo/geometry.c \
511 libvo/old_vo_wrapper.c \
512 libvo/spuenc.c \
513 libvo/video_out.c \
514 libvo/vo_mpegpes.c \
515 libvo/vo_null.c \
516 libvo/vo_png.c \
517 $(SRCS_MPLAYER-yes)
519 COMMON_LIBS += $(COMMON_LIBS-yes)
521 OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)))
522 OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)))
523 OBJS_MPLAYER-$(PE_EXECUTABLE) += osdep/mplayer-rc.o
524 OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
526 MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
527 DEP_FILES = $(patsubst %.S,%.d,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d))))
529 ALL_PRG-$(MPLAYER) += mplayer$(EXESUF)
531 INSTALL_TARGETS-$(MPLAYER) += install-mplayer \
532 install-mplayer-man \
533 install-mplayer-msg
535 DIRS = . \
536 input \
537 libaf \
538 libao2 \
539 libdvdcss \
540 libdvdnav \
541 libdvdnav/vm \
542 libdvdread4 \
543 libmpcodecs \
544 libmpcodecs/native \
545 libmpdemux \
546 libvo \
547 loader \
548 loader/dshow \
549 loader/dmo \
550 loader/wine \
551 osdep \
552 stream \
553 stream/freesdp \
554 stream/librtsp \
555 stream/realrtsp \
556 sub \
557 timeline \
558 TOOLS \
560 MOFILES := $(MSG_LANGS:%=locale/%/LC_MESSAGES/mplayer.mo)
562 ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h))
564 ADDSUFFIXES = $(foreach suf,$(1),$(addsuffix $(suf),$(2)))
565 ADD_ALL_DIRS = $(call ADDSUFFIXES,$(1),$(DIRS))
566 ADD_ALL_EXESUFS = $(1) $(call ADDSUFFIXES,$(EXESUFS_ALL),$(1))
568 ###### brief build output #######
570 ifndef V
571 $(eval override CC = @printf "CC\t$$@\n"; $(CC))
572 $(eval override RM = @$(RM))
573 endif
575 ###### generic rules #######
577 all: $(ALL_PRG-yes) locales
579 %.o: %.S
580 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
582 %.o: %.c
583 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
585 %.o: %.cpp
586 $(CC) $(DEPFLAGS) $(CXXFLAGS) -c -o $@ $<
588 %.o: %.m
589 $(CC) $(DEPFLAGS) $(CFLAGS) -c -o $@ $<
591 %-rc.o: %.rc
592 $(WINDRES) -I. $< $@
594 mplayer$(EXESUF): $(MPLAYER_DEPS)
595 mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
596 mplayer$(EXESUF):
597 $(CC) -o $@ $^ $(EXTRALIBS)
599 codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h
600 $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $<
602 codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
603 ./$^ > $@
605 # ./configure must be rerun if it changed
606 config.mak: configure
607 @echo "############################################################"
608 @echo "####### Please run ./configure again - it's changed! #######"
609 @echo "############################################################"
611 version.h .version: version.sh
612 ./$<
614 # Force version.sh to run to potentially regenerate version.h
615 -include .version
617 %$(EXESUF): %.c
618 $(CC) $(CFLAGS) -o $@ $^
620 locales: $(MOFILES)
622 locale/%/LC_MESSAGES/mplayer.mo: po/%.po
623 mkdir -p $(dir $@)
624 msgfmt -c -o $@ $<
626 %.ho: %.h
627 $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
629 checkheaders: $(ALLHEADERS:.h=.ho)
633 ###### dependency declarations / specific CFLAGS ######
635 # Make sure all generated header files are created.
636 codec-cfg.o: codecs.conf.h
637 mpcommon.o osdep/mplayer-rc.o: version.h
639 # Files that depend on libavcodec internals
640 libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)
642 osdep/mplayer-rc.o: osdep/mplayer.exe.manifest
644 libdvdcss/%: CFLAGS := -Ilibdvdcss -D_GNU_SOURCE -DVERSION=\"1.2.10\" $(CFLAGS_LIBDVDCSS) $(CFLAGS)
645 libdvdnav/%: CFLAGS := -Ilibdvdnav -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\" $(CFLAGS)
646 libdvdread4/%: CFLAGS := -Ilibdvdread4 -D_GNU_SOURCE $(CFLAGS_LIBDVDCSS_DVDREAD) $(CFLAGS)
648 loader/%: CFLAGS += -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
649 #loader/%: CFLAGS += -Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
650 loader/win32%: CFLAGS += $(CFLAGS_STACKREALIGN)
652 stream/stream_dvdnav%: CFLAGS := $(CFLAGS_LIBDVDNAV) $(CFLAGS)
656 ###### installation / clean / generic rules #######
658 install: $(INSTALL_TARGETS-yes)
660 install-dirs:
661 if test ! -d $(BINDIR) ; then $(INSTALL) -d $(BINDIR) ; fi
662 if test ! -d $(CONFDIR) ; then $(INSTALL) -d $(CONFDIR) ; fi
663 if test ! -d $(LIBDIR) ; then $(INSTALL) -d $(LIBDIR) ; fi
665 install-%: %$(EXESUF) install-dirs
666 $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR)
668 install-mplayer-man: $(foreach lang,$(MAN_LANGS),install-mplayer-man-$(lang))
669 install-mplayer-msg: $(foreach lang,$(MSG_LANGS),install-mplayer-msg-$(lang))
671 install-mplayer-man-en:
672 if test ! -d $(MANDIR)/man1 ; then $(INSTALL) -d $(MANDIR)/man1 ; fi
673 $(INSTALL) -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/
675 define MPLAYER_MAN_RULE
676 install-mplayer-man-$(lang):
677 if test ! -d $(MANDIR)/$(lang)/man1 ; then $(INSTALL) -d $(MANDIR)/$(lang)/man1 ; fi
678 $(INSTALL) -m 644 DOCS/man/$(lang)/mplayer.1 $(MANDIR)/$(lang)/man1/
679 endef
681 $(foreach lang,$(filter-out en,$(MAN_LANG_ALL)),$(eval $(MPLAYER_MAN_RULE)))
683 define MPLAYER_MSG_RULE
684 install-mplayer-msg-$(lang):
685 if test ! -d $(LOCALEDIR)/$(lang)/LC_MESSAGES ; then $(INSTALL) -d $(LOCALEDIR)/$(lang)/LC_MESSAGES ; fi
686 $(INSTALL) -m 644 locale/$(lang)/LC_MESSAGES/mplayer.mo $(LOCALEDIR)/$(lang)/LC_MESSAGES/
687 endef
689 $(foreach lang,$(MSG_LANG_ALL),$(eval $(MPLAYER_MSG_RULE)))
691 uninstall:
692 $(RM) $(BINDIR)/mplayer$(EXESUF) $(BINDIR)/gmplayer$(EXESUF)
693 $(RM) $(prefix)/share/pixmaps/mplayer.xpm
694 $(RM) $(prefix)/share/applications/mplayer.desktop
695 $(RM) $(MANDIR)/man1/mplayer.1
696 $(RM) $(foreach lang,$(MAN_LANGS),$(foreach man,mplayer.1,$(MANDIR)/$(lang)/man1/$(man)))
697 $(RM) $(foreach lang,$(MSG_LANGS),$(LOCALEDIR)/$(lang)/LC_MESSAGES/mplayer.1)
699 clean:
700 -$(RM) $(call ADD_ALL_DIRS,/*.o /*.a /*.ho /*~)
701 -$(RM) $(call ADD_ALL_EXESUFS,mplayer)
702 -$(RM) $(MOFILES)
704 distclean: clean testsclean toolsclean driversclean
705 -$(RM) -r DOCS/tech/doxygen
706 -$(RM) -r locale
707 -$(RM) $(call ADD_ALL_DIRS,/*.d)
708 -$(RM) config.log config.mak config.h codecs.conf.h version.h TAGS tags
709 -$(RM) $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo)
711 doxygen:
712 doxygen DOCS/tech/Doxyfile
714 TAGS:
715 $(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs etags -a
717 tags:
718 $(RM) $@; find . -name '*.[chS]' -o -name '*.asm' | xargs ctags -a
720 generated_ebml:
721 TOOLS/matroska.py --generate-header >libmpdemux/ebml_types.h
722 TOOLS/matroska.py --generate-definitions >libmpdemux/ebml_defs.c
724 ###### tests / tools #######
726 TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
728 codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h $(TEST_OBJS)
729 $(CC) -I. -DTESTING -o $@ $^
731 codecs2html$(EXESUF): codec-cfg.c $(TEST_OBJS)
732 $(CC) -I. -DCODECS2HTML -o $@ $^
734 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)
736 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
737 loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
739 TESTS = codecs2html codec-cfg-test
741 ifdef ARCH_X86
742 TESTS += loader/qtx/list loader/qtx/qtxload
743 endif
745 tests: $(addsuffix $(EXESUF),$(TESTS))
747 testsclean:
748 -$(RM) $(call ADD_ALL_EXESUFS,$(TESTS))
750 TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)
752 ifdef ARCH_X86
753 TOOLS += TOOLS/fastmemcpybench TOOLS/modify_reg
754 endif
756 ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc
758 tools: $(addsuffix $(EXESUF),$(TOOLS))
759 alltools: $(addsuffix $(EXESUF),$(ALLTOOLS))
761 toolsclean:
762 -$(RM) $(call ADD_ALL_EXESUFS,$(ALLTOOLS))
763 -$(RM) TOOLS/realcodecs/*.so.6.0
765 TOOLS/bmovl-test$(EXESUF): -lSDL_image
767 TOOLS/subrip$(EXESUF): sub/vobsub.o sub/spudec.o sub/unrar_exec.o \
768 libvo/aclib.o \ libswscale/libswscale.a libavutil/libavutil.a $(TEST_OBJS)
770 TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
772 mplayer-nomain.o: mplayer.c
773 $(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
775 TOOLS/netstream$(EXESUF): TOOLS/netstream.c
776 TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
777 TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(OBJS_COMMON) $(COMMON_LIBS)
778 $(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS)
780 REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
781 REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
783 realcodecs: $(REAL_TARGETS)
784 realcodecs: CFLAGS += -g
786 %.so.6.0: %.o
787 ld -shared -o $@ $< -ldl -lc
791 ###### drivers #######
793 KERNEL_INC = /lib/modules/`uname -r`/build/include
794 KERNEL_VERSION = $(shell grep RELEASE $(KERNEL_INC)/linux/version.h | cut -d'"' -f2)
795 KERNEL_CFLAGS = -O2 -D__KERNEL__ -DMODULE -Wall -I$(KERNEL_INC) -include $(KERNEL_INC)/linux/modversions.h
796 KERNEL_OBJS = $(addprefix drivers/, mga_vid.o tdfx_vid.o radeon_vid.o rage128_vid.o)
797 MODULES_DIR = /lib/modules/$(KERNEL_VERSION)/misc
798 DRIVER_OBJS = $(KERNEL_OBJS) drivers/mga_vid_test drivers/tdfx_vid_test
800 drivers: $(DRIVER_OBJS)
802 $(DRIVER_OBJS): CFLAGS = $(KERNEL_CFLAGS)
803 drivers/mga_vid.o: drivers/mga_vid.c drivers/mga_vid.h
804 drivers/tdfx_vid.o: drivers/tdfx_vid.c drivers/3dfx.h
805 drivers/radeon_vid.o drivers/rage128_vid.o: CFLAGS += -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math
806 drivers/radeon_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
807 drivers/rage128_vid.o: drivers/radeon_vid.c drivers/radeon.h drivers/radeon_vid.h
808 $(CC) $(CFLAGS) -DRAGE128 -c $< -o $@
810 install-drivers: $(DRIVER_OBJS)
811 -mkdir -p $(MODULES_DIR)
812 install -m 644 $(KERNEL_OBJS) $(MODULES_DIR)
813 depmod -a
814 -mknod /dev/mga_vid c 178 0
815 -mknod /dev/tdfx_vid c 178 0
816 -mknod /dev/radeon_vid c 178 0
817 -ln -s /dev/radeon_vid /dev/rage128_vid
819 driversclean:
820 -$(RM) $(DRIVER_OBJS) drivers/*~
824 -include $(DEP_FILES)
826 .PHONY: all doxygen locales *install* *tools drivers
827 .PHONY: checkheaders *clean tests .version
829 # Disable suffix rules. Most of the builtin rules are suffix rules,
830 # so this saves some time on slow systems.
831 .SUFFIXES:
833 # If a command returns failure but changed its target file, delete the
834 # (presumably malformed) file. Otherwise the file would be considered to
835 # be up to date if make is restarted.
837 .DELETE_ON_ERROR: