help_mp-hu.h synced with r19462
[mplayer/greg.git] / Makefile
blob197695e5bb05998c67b8ce521cc20df7c74ae7d1
1 # LINUX Makefile made by A'rpi / Astral
2 # Some cleanup by LGB: * 'make -C dir' instead of 'cd dir;make;cd..'
3 # * for loops instead of linear sequence of make directories
4 # * some minor problems with make clean and distclean were corrected
5 # * DVD support
7 include config.mak
9 LIBAV_INC =
10 ifeq ($(CONFIG_LIBAVUTIL),yes)
11 LIBAV_INC += -I./libavutil
12 endif
13 ifeq ($(CONFIG_LIBAVCODEC),yes)
14 LIBAV_INC += -I./libavcodec
15 endif
17 # Do not strip the binaries at installation
18 ifeq ($(STRIPBINARIES),yes)
19 INSTALLSTRIP = -s
20 endif
22 SRCS_COMMON = asxparser.c \
23 codec-cfg.c \
24 cpudetect.c \
25 edl.c \
26 find_sub.c \
27 m_config.c \
28 m_option.c \
29 m_struct.c \
30 parser-cfg.c \
31 playtree.c \
32 playtreeparser.c \
33 spudec.c \
34 sub_cc.c \
35 subreader.c \
36 vobsub.c \
38 SRCS_MENCODER = mencoder.c \
39 mp_msg-mencoder.c \
40 $(SRCS_COMMON) \
41 libvo/aclib.c \
42 libvo/font_load.c \
43 libvo/osd.c \
44 libvo/sub.c \
45 parser-mecmd.c \
46 xvid_vbr.c \
48 SRCS_MPLAYER = mplayer.c \
49 m_property.c \
50 mp_msg.c \
51 $(SRCS_COMMON) \
52 mixer.c \
53 parser-mpcmd.c \
54 subopt-helper.c \
56 ifeq ($(UNRARLIB),yes)
57 SRCS_COMMON += unrarlib.c
58 endif
60 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o)
61 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o)
63 VO_LIBS = $(AA_LIB) \
64 $(X_LIB) \
65 $(SDL_LIB) \
66 $(GGI_LIB) \
67 $(MLIB_LIB) \
68 $(SVGA_LIB) \
69 $(DIRECTFB_LIB) \
70 $(CACA_LIB) \
71 $(VESA_LIB) \
73 ifeq ($(EXTERNAL_VIDIX),yes)
74 VO_LIBS += $(EXTERNAL_VIDIX_LIB)
75 endif
77 AO_LIBS = $(ARTS_LIB) \
78 $(ESD_LIB) \
79 $(JACK_LIB) \
80 $(OPENAL_LIB) \
81 $(NAS_LIB) \
82 $(SGIAUDIO_LIB) \
83 $(POLYP_LIB) \
85 CODEC_LIBS = $(AV_LIB) \
86 $(FAME_LIB) \
87 $(MAD_LIB) \
88 $(VORBIS_LIB) \
89 $(THEORA_LIB) \
90 $(FAAD_LIB) \
91 $(LIBLZO_LIB) \
92 $(DECORE_LIB) \
93 $(XVID_LIB) \
94 $(DTS_LIB) \
95 $(PNG_LIB) \
96 $(Z_LIB) \
97 $(JPEG_LIB) \
98 $(ALSA_LIB) \
99 $(XMMS_LIB) \
100 $(X264_LIB) \
101 $(MUSEPACK_LIB) \
102 $(SPEEX_LIB) \
104 COMMON_LIBS = libmpcodecs/libmpcodecs.a \
105 $(W32_LIB) \
106 libaf/libaf.a \
107 libmpdemux/libmpdemux.a \
108 stream/stream.a \
109 libswscale/libswscale.a \
110 osdep/libosdep.a \
111 $(DVDREAD_LIB) \
112 $(DVDNAV_LIB) \
113 $(CODEC_LIBS) \
114 $(TERMCAP_LIB) \
115 $(CDPARANOIA_LIB) \
116 $(MPLAYER_NETWORK_LIB) \
117 $(LIBCDIO_LIB) \
118 $(WIN32_LIB) \
119 $(GIF_LIB) \
120 $(MACOSX_FRAMEWORKS) \
121 $(SMBSUPPORT_LIB) \
122 $(FRIBIDI_LIB) \
123 $(ENCA_LIB) \
125 CFLAGS = $(OPTFLAGS) -I. $(LIBAV_INC)
127 #CFLAGS += -Wall
129 ifeq ($(TOOLAME),yes)
130 CFLAGS += $(TOOLAME_EXTRAFLAGS)
131 CODEC_LIBS += $(TOOLAME_LIB)
132 endif
134 ifeq ($(TWOLAME),yes)
135 CODEC_LIBS += $(TWOLAME_LIB)
136 endif
138 ifeq ($(FAAC),yes)
139 CODEC_LIBS += $(FAAC_LIB)
140 endif
142 PARTS = libmpdemux \
143 stream \
144 libmpcodecs \
145 libavutil \
146 libavcodec \
147 libpostproc \
148 libavformat \
149 libswscale \
150 libao2 \
151 osdep \
152 input \
153 libvo \
154 libaf \
156 ifeq ($(MP3LIB),yes)
157 PARTS += mp3lib
158 endif
159 ifeq ($(LIBA52),yes)
160 PARTS += liba52
161 endif
162 ifeq ($(LIBMPEG2),yes)
163 PARTS += libmpeg2
164 endif
165 ifeq ($(FAAD_INTERNAL),yes)
166 COMMON_LIBS += libfaad2/libfaad2.a
167 PARTS += libfaad2
168 endif
169 ifeq ($(VIDIX),yes)
170 PARTS += libdha vidix
171 endif
172 ifeq ($(FAME),yes)
173 PARTS += libfame
174 endif
175 ifeq ($(DVDKIT2),yes)
176 PARTS += libmpdvdkit2
177 else
178 endif
179 ifeq ($(GUI),yes)
180 PARTS += Gui
181 endif
182 ifneq ($(W32_LIB),)
183 PARTS += loader loader/dshow loader/dmo
184 endif
185 ifeq ($(LIBMENU),yes)
186 PARTS += libmenu
187 endif
188 ifeq ($(TREMOR_INTERNAL),yes)
189 PARTS += tremor
190 endif
192 ALL_PRG = $(PRG)
193 ifeq ($(MENCODER),yes)
194 ALL_PRG += $(PRG_MENCODER)
195 endif
197 COMMON_DEPS = $(W32_DEP) \
198 $(AV_DEP) \
199 libmpdemux/libmpdemux.a \
200 stream/stream.a \
201 libmpcodecs/libmpcodecs.a \
202 libao2/libao2.a \
203 osdep/libosdep.a \
204 libswscale/libswscale.a \
205 input/libinput.a \
206 libvo/libvo.a \
207 libaf/libaf.a \
209 ifeq ($(MP3LIB),yes)
210 COMMON_DEPS += mp3lib/libMP3.a
211 COMMON_LIBS += mp3lib/libMP3.a
212 endif
213 ifeq ($(LIBA52),yes)
214 COMMON_DEPS += liba52/liba52.a
215 COMMON_LIBS += liba52/liba52.a
216 endif
217 ifeq ($(LIBMPEG2),yes)
218 COMMON_DEPS += libmpeg2/libmpeg2.a
219 COMMON_LIBS += libmpeg2/libmpeg2.a
220 endif
221 ifeq ($(FAAD_INTERNAL),yes)
222 COMMON_DEPS += libfaad2/libfaad2.a
223 endif
224 ifeq ($(TREMOR_INTERNAL),yes)
225 COMMON_DEPS += tremor/libvorbisidec.a
226 COMMON_LIBS += tremor/libvorbisidec.a
227 endif
228 ifeq ($(VIDIX),yes)
229 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
230 endif
231 ifeq ($(FAME),yes)
232 COMMON_DEPS += libfame/libfame.a
233 endif
234 ifeq ($(DVDKIT2),yes)
235 COMMON_DEPS += libmpdvdkit2/libmpdvdkit.a
236 endif
237 ifeq ($(CONFIG_ASS),yes)
238 COMMON_DEPS += libass/libass.a
239 COMMON_LIBS += libass/libass.a
240 PARTS += libass
241 endif
242 # FontConfig and FreeType need to come after ASS to avoid link failures on MinGW
243 COMMON_LIBS += $(FONTCONFIG_LIB)
244 ifeq ($(FREETYPE),yes)
245 SRCS_MENCODER += libvo/font_load_ft.c
246 COMMON_LIBS += $(FREETYPE_LIB)
247 endif
248 ifeq ($(GUI),yes)
249 COMMON_DEPS += Gui/libgui.a
250 GUI_LIBS = Gui/libgui.a $(GTK_LIBS)
251 endif
253 .SUFFIXES: .cc .c .o
255 #.PHONY: $(COMMON_DEPS)
257 all: $(ALL_PRG)
259 .c.o:
260 $(CC) -c $(CFLAGS) -o $@ $<
262 libaf/libaf.a:
263 $(MAKE) -C libaf
265 libmpdvdkit2/libmpdvdkit.a:
266 $(MAKE) -C libmpdvdkit2
268 loader/libloader.a:
269 $(MAKE) -C loader
271 libfame/libfame.a:
272 $(MAKE) -C libfame
274 libass/libass.a:
275 $(MAKE) -C libass
277 libmpdemux/libmpdemux.a:
278 $(MAKE) -C libmpdemux
280 stream/stream.a:
281 $(MAKE) -C stream
283 libmpcodecs/libmpcodecs.a:
284 $(MAKE) -C libmpcodecs
286 loader/dshow/libDS_Filter.a:
287 $(MAKE) -C loader/dshow
289 loader/dmo/libDMO_Filter.a:
290 $(MAKE) -C loader/dmo
292 libavutil/libavutil.a:
293 $(MAKE) -C libavutil LIBPREF=lib LIBSUF=.a
295 libavcodec/libavcodec.a:
296 $(MAKE) -C libavcodec LIBPREF=lib LIBSUF=.a
298 libpostproc/libpostproc.a:
299 $(MAKE) -C libpostproc LIBPREF=lib LIBSUF=.a
301 libavformat/libavformat.a:
302 $(MAKE) -C libavformat LIBPREF=lib LIBSUF=.a
304 libswscale/libswscale.a:
305 $(MAKE) -C libswscale LIBPREF=lib LIBSUF=.a
307 libmpeg2/libmpeg2.a:
308 $(MAKE) -C libmpeg2
310 libvo/libvo.a:
311 $(MAKE) -C libvo
313 libao2/libao2.a:
314 $(MAKE) -C libao2
316 liba52/liba52.a:
317 $(MAKE) -C liba52
319 libfaad2/libfaad2.a:
320 $(MAKE) -C libfaad2
322 mp3lib/libMP3.a:
323 $(MAKE) -C mp3lib
325 tremor/libvorbisidec.a:
326 $(MAKE) -C tremor
328 libdha/libdha.so:
329 $(MAKE) -C libdha
331 vidix/libvidix.a: libdha/libdha.so
332 $(MAKE) -C vidix
334 Gui/libgui.a:
335 $(MAKE) -C Gui
337 osdep/libosdep.a:
338 $(MAKE) -C osdep
340 input/libinput.a:
341 $(MAKE) -C input
343 libmenu/libmenu.a:
344 $(MAKE) -C libmenu
346 MPLAYER_DEP = $(OBJS_MPLAYER) $(COMMON_DEPS)
348 ifeq ($(LIBMENU),yes)
349 MPLAYER_DEP += libmenu/libmenu.a
350 MENU_LIBS = libmenu/libmenu.a
351 PARTS += libmenu
352 else
353 MENU_LIBS =
354 endif
356 MENCODER_DEP = $(OBJS_MENCODER) $(COMMON_DEPS) libmpcodecs/libmpencoders.a
358 ifeq ($(VIDIX),yes)
359 VIDIX_LIBS = vidix/libvidix.a
360 else
361 VIDIX_LIBS =
362 endif
364 ifeq ($(TARGET_WIN32),yes)
365 OBJS_MPLAYER += osdep/mplayer-rc.o
366 endif
368 LIBS_MPLAYER = libvo/libvo.a \
369 libao2/libao2.a \
370 input/libinput.a \
371 $(MENU_LIBS) \
372 $(VIDIX_LIBS) \
373 $(GUI_LIBS) \
374 $(COMMON_LIBS) \
375 $(VO_LIBS) \
376 $(AO_LIBS) \
377 $(EXTRA_LIB)\
378 $(LIRC_LIB) \
379 $(LIRCC_LIB) \
380 $(STATIC_LIB) \
381 $(ARCH_LIB) \
382 $(MATH_LIB) \
383 $(LIBC_LIB) \
385 $(PRG): $(MPLAYER_DEP)
386 ifeq ($(TARGET_WIN32),yes)
387 windres -o osdep/mplayer-rc.o osdep/mplayer.rc
388 endif
389 $(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(LIBS_MPLAYER)
391 ifeq ($(MENCODER),yes)
392 LIBS_MENCODER = libmpcodecs/libmpencoders.a \
393 $(ENCORE_LIB) \
394 $(COMMON_LIBS) \
395 $(EXTRA_LIB) \
396 $(MLIB_LIB) \
397 $(LIRC_LIB) \
398 $(LIRCC_LIB) \
399 $(ARCH_LIB) \
400 $(MATH_LIB) \
401 $(LIBC_LIB) \
403 $(PRG_MENCODER): $(MENCODER_DEP)
404 $(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(LIBS_MENCODER)
405 endif
407 codec-cfg: codec-cfg.c codec-cfg.h help_mp.h
408 $(HOST_CC) -I. -DCODECS2HTML codec-cfg.c -o $@
410 codecs.conf.h: codec-cfg etc/codecs.conf
411 ./codec-cfg ./etc/codecs.conf > $@
413 codec-cfg.o: codecs.conf.h
415 codecs2html: mp_msg.o
416 $(CC) -DCODECS2HTML codec-cfg.c mp_msg.o -o $@
418 install: $(ALL_PRG)
419 ifeq ($(VIDIX),yes)
420 $(MAKE) -C libdha install
421 $(MAKE) -C vidix install
422 endif
423 $(INSTALL) -d $(BINDIR)
424 $(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG) $(BINDIR)/$(PRG)
425 ifeq ($(GUI),yes)
426 -ln -sf $(PRG) $(BINDIR)/gmplayer
427 endif
428 $(INSTALL) -d $(MANDIR)/man1
429 for i in $(MAN_LANG); do \
430 if test "$$i" = en ; then \
431 $(INSTALL) -c -m 644 DOCS/man/en/mplayer.1 $(MANDIR)/man1/mplayer.1 ; \
432 else \
433 $(INSTALL) -d $(MANDIR)/$$i/man1 ; \
434 $(INSTALL) -c -m 644 DOCS/man/$$i/mplayer.1 $(MANDIR)/$$i/man1/mplayer.1 ; \
435 fi ; \
436 done
437 ifeq ($(MENCODER),yes)
438 $(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
439 for i in $(MAN_LANG); do \
440 if test "$$i" = en ; then \
441 ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1 ; \
442 else \
443 ln -sf mplayer.1 $(MANDIR)/$$i/man1/mencoder.1 ; \
444 fi ; \
445 done
446 endif
447 @$(INSTALL) -d $(DATADIR)
448 @$(INSTALL) -d $(DATADIR)/font
449 @if test ! -f $(DATADIR)/font/font.desc ; then \
450 echo "*** Download font at http://www.mplayerhq.hu/dload.html" ; \
451 echo "*** for OSD/Subtitles support and extract to $(DATADIR)/font/" ; \
453 ifeq ($(GUI),yes)
454 @$(INSTALL) -d $(DATADIR)/skins
455 @echo "*** Download skin(s) at http://www.mplayerhq.hu/dload.html"
456 @echo "*** for GUI, and extract to $(DATADIR)/skins/"
457 @$(INSTALL) -d $(prefix)/share/pixmaps
458 $(INSTALL) -m 644 etc/mplayer.xpm $(prefix)/share/pixmaps/mplayer.xpm
459 @$(INSTALL) -d $(prefix)/share/applications
460 $(INSTALL) -m 644 etc/mplayer.desktop $(prefix)/share/applications/mplayer.desktop
461 endif
462 @$(INSTALL) -d $(CONFDIR)
463 @if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
465 uninstall:
466 -rm -f $(BINDIR)/$(PRG) $(BINDIR)/gmplayer $(MANDIR)/man1/mplayer.1
467 -rm -f $(BINDIR)/$(PRG_MENCODER) $(MANDIR)/man1/mencoder.1
468 -rm -f $(prefix)/share/pixmaps/mplayer.xpm
469 -rm -f $(prefix)/share/applications/mplayer.desktop
470 for l in $(MAN_LANG); do \
471 if test "$$l" != "en"; then \
472 rm -f $(MANDIR)/$$l/man1/mplayer.1 \
473 $(MANDIR)/$$l/man1/mencoder.1 \
474 $(MANDIR)/$$l/man1/gmplayer.1 ; \
475 fi ; \
476 done
477 ifeq ($(VIDIX),yes)
478 $(MAKE) -C libdha uninstall
479 $(MAKE) -C vidix uninstall
480 endif
481 @echo "Uninstall completed"
483 dirclean:
484 -rm -f *.o *.a *~
486 clean: dirclean
487 @for a in $(PARTS); do $(MAKE) -C $$a clean; done
489 distclean: clean doxygen_clean
490 @for a in $(PARTS); do $(MAKE) -C $$a distclean; done
491 -rm -f *~ $(PRG) $(PRG_MENCODER) codec-cfg codecs2html
492 -rm -f .depend configure.log codecs.conf.h help_mp.h config.h config.mak
494 strip:
495 strip -s $(ALL_PRG)
497 dep: depend
499 depend: help_mp.h version.h
500 $(CC) -MM $(CFLAGS) -DCODECS2HTML mplayer.c mencoder.c $(SRCS_MPLAYER) $(SRCS_MENCODER) 1>.depend
501 @for a in $(PARTS); do $(MAKE) -C $$a dep; done
503 # ./configure must be rerun if it changed
504 config.h: configure
505 @echo "############################################################"
506 @echo "####### Please run ./configure again - it's changed! #######"
507 @echo "############################################################"
509 # rebuild at every config.h/config.mak/Makefile change:
510 version.h: config.h config.mak Makefile
511 ./version.sh `$(CC) -dumpversion`
513 doxygen:
514 doxygen DOCS/tech/Doxyfile
516 doxygen_clean:
517 -rm -rf DOCS/tech/doxygen
519 help_mp.h: help/help_mp-en.h $(HELP_FILE)
520 @echo '// WARNING! This is a generated file. Do NOT edit.' > help_mp.h
521 @echo '// See the help/ subdir for the editable files.' >> help_mp.h
522 ifeq ($(CHARSET),)
523 @echo '#include "$(HELP_FILE)"' >> help_mp.h
524 else
525 iconv -f `cat $(HELP_FILE).charset` -t $(CHARSET) "$(HELP_FILE)" >> help_mp.h
526 endif
528 ifneq ($(HELP_FILE),help/help_mp-en.h)
529 @echo "Adding untranslated messages to help_mp.h"
530 @echo '// untranslated messages from the English master file:' >> help_mp.h
531 @help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h
532 endif
534 # explicit dependencies to force version.h to be built even if .depend is missing
535 mplayer.o mencoder.o vobsub.o: version.h
537 # temporary measure to make sure help_mp.h is built. we desperately need correct deps!
538 $(MPLAYER_DEP) $(MENCODER_DEP): help_mp.h
541 # the following lines provide _partial_ dependency information
542 # for the 'library' directories under main dir, in order to cause
543 # the build process to recursively descend into them if something
544 # has changed. ideally this will be replaced with a single
545 # nonrecursive makefile for the whole project.
547 # Now all directories are recursed by default because these rules do not
548 # consider dependencies on files in other directories, while the recursively
549 # invoked Makefiles do. Conditional recursion only to the directories with
550 # changed files can be enabled by creating a file named ".norecurse" and
551 # optionally giving it a timestamp in the past. Directories whose .a files
552 # are newer than the timestamp and newer than other files in the directory
553 # will not be recursed.
554 .norecurse:
556 libvo/libvo.a: .norecurse $(wildcard libvo/*.[ch])
557 libao2/libao2.a: .norecurse $(wildcard libao2/*.[ch])
558 osdep/libosdep.a: .norecurse $(wildcard osdep/*.[ch])
559 input/libinput.a: .norecurse $(wildcard input/*.[ch])
561 libmenu/libmenu.a: .norecurse $(wildcard libmenu/*.[ch])
562 libaf/libaf.a: .norecurse $(wildcard libaf/*.[ch])
563 libmpdvdkit2/libmpdvdkit.a: .norecurse $(wildcard libmpdvdkit2/*.[ch])
565 libmpdemux/libmpdemux.a: .norecurse $(wildcard libmpdemux/*.[ch] libmpdemux/*/*.[ch])
566 stream/stream.a: .norecurse $(wildcard stream/*.[ch] stream/*/*.[ch])
567 libmpcodecs/libmpcodecs.a: .norecurse $(wildcard libmpcodecs/*.[ch]) $(wildcard libmpcodecs/native/*.[ch])
568 libmpcodecs/libmpencoders.a: .norecurse $(wildcard libmpcodecs/*.[ch])
570 libavutil/libavutil.a: .norecurse $(wildcard libavutil/*.[ch])
571 libavcodec/libavcodec.a: .norecurse $(wildcard libavcodec/*.[ch] libavcodec/*/*.[chS])
572 libavformat/libavformat.a: .norecurse $(wildcard libavformat/*.[ch])
573 libswscale/libswscale.a: .norecurse $(wildcard libswscale/*.[ch])
575 libmpeg2/libmpeg2.a: .norecurse $(wildcard libmpeg2/*.[ch])
576 liba52/liba52.a: .norecurse $(wildcard liba52/*.[ch])
577 mp3lib/libMP3.a: .norecurse $(wildcard mp3lib/*.[ch])
578 libfaad2/libfaad2.a: .norecurse $(wildcard libfaad2/*.[ch] libfaad2/*/*.[ch])
580 loader/libloader.a: .norecurse $(wildcard loader/*.[chSs])
581 loader/dmo/libDMO_Filter.a: .norecurse $(wildcard loader/dmo/*.[ch])
582 loader/dshow/libDS_Filter.a: .norecurse $(wildcard loader/dshow/*.[ch])
584 libdha/libdha.so: .norecurse $(wildcard libdha/*.[ch])
585 vidix/libvidix.a: .norecurse $(wildcard vidix/*.[ch])
586 Gui/libgui.a: .norecurse $(wildcard Gui/*.[ch] Gui/*/*.[ch] Gui/*/*/*.[ch])
588 libass/libass.a: .norecurse $(wildcard libass/*.[ch])
591 # include dependency files if they exist
593 ifneq ($(wildcard .depend),)
594 include .depend
595 endif