1 ################################################################################
2 # vlc (VideoLAN Client) main makefile
4 ################################################################################
5 # This makefile is the main makefile for the VideoLAN client.
6 ################################################################################
8 ################################################################################
10 ################################################################################
12 # Debugging mode on or off (set to 1 to activate)
22 exec_prefix=@exec_prefix@
31 #----------------- do not change anything below this line ----------------------
33 ################################################################################
34 # Configuration pre-processing
35 ################################################################################
37 # PROGRAM_OPTIONS is an identification string of the compilation options
38 PROGRAM_OPTIONS = $(SYS) $(ARCH)
40 PROGRAM_OPTIONS += DEBUG
44 PROGRAM_OPTIONS += DEBUG
48 # PROGRAM_BUILD is a complete identification of the build
49 # (we can't use fancy options with date since OSes like Solaris
50 # or FreeBSD have strange date implementations)
52 # XXX: beos does not support hostname (how lame...)
53 PROGRAM_BUILD = `date` $(USER)
55 PROGRAM_BUILD = `date` $(USER)@`hostname`
58 # DEFINE will contain some of the constants definitions decided in Makefile,
59 # including SYS_xx. It will be passed to C compiler.
60 DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr '[a-z].' '[A-Z]_')
62 # On Linux activate 64-bit off_t (by default under BSD)
63 ifneq (,$(findstring linux,$(SYS)))
64 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
67 ################################################################################
68 # Tuning and other variables - do not change anything except if you know
69 # exactly what you are doing
70 ################################################################################
73 # C headers directories
76 INCLUDE += -Iinclude -Iextras -I/usr/local/include
81 LIB = @LIB@ -L/usr/local/lib
84 LIB += -lbe -lroot -lgame
90 # C compiler flags: mainstream compilation
92 CFLAGS += $(DEFINE) $(INCLUDE)
93 CFLAGS += -Wall -Winline
94 CFLAGS += -D_REENTRANT
95 CFLAGS += -D_GNU_SOURCE
97 # flags needed for clean beos compilation
99 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
102 ifneq (,$(findstring darwin,$(SYS)))
103 CFLAGS += -traditional-cpp
106 # Optimizations : don't compile debug versions with them
109 CFLAGS += -ffast-math -funroll-loops
110 CFLAGS += -fomit-frame-pointer
112 # Optimizations for x86 familiy
113 ifneq (,$(findstring 86,$(ARCH)))
114 # Optional Pentium Pro optimizations
115 ifneq (,$(findstring ppro,$(ARCH)))
116 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
118 CFLAGS += -march=pentium -mcpu=pentium
122 # Optimizations for PowerPC
123 ifneq (,$(findstring powerpc,$(ARCH)))
124 CFLAGS += -mmultiple -mhard-float -mstring
127 # Optimizations for Sparc
128 ifneq (,$(findstring sparc,$(ARCH)))
129 CFLAGS += -mhard-float
132 #end of optimisations
135 # Optional MMX optimizations for x86
136 ifneq (,$(findstring mmx,$(ARCH)))
141 # C compiler flags: plugin compilation
146 # C compiler flags: plugin linking
148 ifneq (,$(findstring darwin,$(SYS)))
149 PLCFLAGS += -bundle -undefined suppress
152 PLCFLAGS += -nostart plugins/_APP_
159 # C compiler flags: dependancies
161 DCFLAGS += $(INCLUDE)
165 # C compiler flags: linking
167 LCFLAGS += @LCFLAGS@ $(LIB)
172 LCFLAGS += -Xlinker -soname=_APP_
174 ifneq (,$(findstring qnx,$(SYS)))
175 LCFLAGS += -Xlinker -export-dynamic
177 ifneq (,$(findstring darwin,$(SYS)))
180 LCFLAGS += --export-dynamic
186 # Debugging and profiling support (unless optimisations are active)
192 #################################################################################
194 #################################################################################
199 INTERFACE = src/interface/main.o \
200 src/interface/interface.o \
201 src/interface/intf_msg.o \
202 src/interface/intf_cmd.o \
203 src/interface/intf_ctrl.o \
204 src/interface/intf_playlist.o \
205 src/interface/intf_channels.o \
206 src/interface/intf_console.o \
207 src/interface/intf_urldecode.o \
209 INPUT = src/input/input_ext-dec.o \
210 src/input/input_ext-intf.o \
211 src/input/input_dec.o \
212 src/input/input_programs.o \
213 src/input/input_netlist.o \
214 src/input/input_clock.o \
216 src/input/mpeg_system.o
218 AUDIO_OUTPUT = src/audio_output/audio_output.o \
219 src/audio_output/aout_fifo.o \
220 src/audio_output/aout_u8.o \
221 src/audio_output/aout_s8.o \
222 src/audio_output/aout_u16.o \
223 src/audio_output/aout_s16.o
225 VIDEO_OUTPUT = src/video_output/video_output.o \
226 src/video_output/video_text.o \
227 src/video_output/video_spu.o \
228 src/video_output/video_yuv.o
230 AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
231 src/ac3_decoder/ac3_decoder.o \
232 src/ac3_decoder/ac3_parse.o \
233 src/ac3_decoder/ac3_exponent.o \
234 src/ac3_decoder/ac3_bit_allocate.o \
235 src/ac3_decoder/ac3_mantissa.o \
236 src/ac3_decoder/ac3_rematrix.o \
237 src/ac3_decoder/ac3_imdct.o \
238 src/ac3_decoder/ac3_downmix.o \
239 src/ac3_decoder/ac3_downmix_c.o
241 LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
242 src/lpcm_decoder/lpcm_decoder.o
244 AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
245 src/audio_decoder/adec_generic.o \
246 src/audio_decoder/adec_layer1.o \
247 src/audio_decoder/adec_layer2.o \
248 src/audio_decoder/adec_math.o
250 SPU_DECODER = src/spu_decoder/spu_decoder.o
252 #GEN_DECODER = src/generic_decoder/generic_decoder.o
254 VIDEO_PARSER = src/video_parser/video_parser.o \
255 src/video_parser/vpar_headers.o \
256 src/video_parser/vpar_blocks.o \
257 src/video_parser/vpar_synchro.o \
258 src/video_parser/video_fifo.o
260 VIDEO_DECODER = src/video_decoder/video_decoder.o
262 MISC = src/misc/mtime.o \
264 src/misc/rsc_files.o \
268 C_OBJ = $(INTERFACE) \
287 CPP_OBJ = src/misc/beos_specific.o
293 ifneq (,$(findstring 86,$(ARCH)))
294 ifneq (,$(findstring mmx,$(ARCH)))
302 PLUGIN_ALSA = plugins/alsa/alsa.o \
303 plugins/alsa/aout_alsa.o
305 PLUGIN_BEOS = plugins/beos/beos.o \
306 plugins/beos/aout_beos.o \
307 plugins/beos/intf_beos.o \
308 plugins/beos/vout_beos.o \
309 plugins/beos/DrawingTidbits.o \
310 plugins/beos/TransportButton.o
312 PLUGIN_DARWIN = plugins/darwin/darwin.o
314 PLUGIN_DSP = plugins/dsp/dsp.o \
315 plugins/dsp/aout_dsp.o
317 PLUGIN_DUMMY = plugins/dummy/dummy.o \
318 plugins/dummy/aout_dummy.o \
319 plugins/dummy/intf_dummy.o \
320 plugins/dummy/vout_dummy.o
322 PLUGIN_DVD = plugins/dvd/dvd.o \
323 plugins/dvd/input_dvd.o \
324 plugins/dvd/dvd_netlist.o \
325 plugins/dvd/dvd_ioctl.o \
326 plugins/dvd/dvd_ifo.o \
327 plugins/dvd/dvd_udf.o \
328 plugins/dvd/dvd_css.o
330 PLUGIN_ESD = plugins/esd/esd.o \
331 plugins/esd/aout_esd.o
333 PLUGIN_FB = plugins/fb/fb.o \
336 PLUGIN_GGI = plugins/ggi/ggi.o \
337 plugins/ggi/vout_ggi.o
339 PLUGIN_GLIDE = plugins/glide/glide.o \
340 plugins/glide/vout_glide.o
342 PLUGIN_GNOME = plugins/gnome/gnome.o \
343 plugins/gnome/intf_gnome.o \
344 plugins/gnome/gnome_callbacks.o \
345 plugins/gnome/gnome_interface.o \
346 plugins/gnome/gnome_support.o
348 PLUGIN_GTK = plugins/gtk/gtk.o \
349 plugins/gtk/intf_gtk.o \
350 plugins/gtk/gtk_callbacks.o \
351 plugins/gtk/gtk_interface.o \
352 plugins/gtk/gtk_support.o \
353 plugins/gtk/gtk_playlist.o
355 PLUGIN_IDCT = plugins/idct/idct.o
357 PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o
359 PLUGIN_IDCTMMX = plugins/idct/idctmmx.o
361 PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o
363 PLUGIN_IDCTALTIVEC = plugins/idct/idctaltivec.o
365 PLUGIN_IDCTCOMMON = plugins/idct/idct_common.o
367 PLUGIN_KDE = plugins/kde/kde.o \
368 plugins/kde/intf_kde.o
370 PLUGIN_MACOSX = plugins/macosx/macosx.o \
371 plugins/macosx/intf_macosx.o \
372 plugins/macosx/vout_macosx.o
374 PLUGIN_MGA = plugins/mga/mga.o \
375 plugins/mga/vout_mga.o
377 PLUGIN_MOTION = plugins/motion/motion.o \
378 plugins/motion/vdec_motion_inner.o
380 PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
381 plugins/motion/vdec_motion_inner_mmx.o
383 PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
384 plugins/motion/vdec_motion_inner_mmxext.o
386 PLUGIN_MOTIONCOMMON = plugins/motion/vdec_motion_common.o
388 PLUGIN_NCURSES = plugins/text/ncurses.o \
389 plugins/text/intf_ncurses.o
391 PLUGIN_NULL = plugins/null/null.o
393 PLUGIN_PS = plugins/mpeg/ps.o \
394 plugins/mpeg/input_ps.o
396 PLUGIN_QT = plugins/qt/qt.o \
399 PLUGIN_SDL = plugins/sdl/sdl.o \
400 plugins/sdl/vout_sdl.o \
401 plugins/sdl/aout_sdl.o
403 PLUGIN_TS = plugins/mpeg/ts.o \
404 plugins/mpeg/input_ts.o
406 PLUGIN_XVIDEO = plugins/x11/xvideo.o \
407 plugins/x11/vout_xvideo.o
409 PLUGIN_X11 = plugins/x11/x11.o \
410 plugins/x11/vout_x11.o
412 PLUGIN_YUV = plugins/yuv/yuv.o \
413 plugins/yuv/video_yuv.o \
414 plugins/yuv/transforms_yuv.o
416 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
417 plugins/yuv/video_yuvmmx.o \
418 plugins/yuv/transforms_yuvmmx.o
430 $(PLUGIN_IDCTCLASSIC) \
432 $(PLUGIN_IDCTMMXEXT) \
433 $(PLUGIN_IDCTCOMMON) \
436 $(PLUGIN_MOTIONMMX) \
437 $(PLUGIN_MOTIONMMXEXT) \
438 $(PLUGIN_MOTIONCOMMON) \
447 NONSTD_PLUGIN_OBJ = \
454 $(PLUGIN_IDCTALTIVEC)
456 NONSTD_CPP_PLUGIN_OBJ = \
462 # Other lists of files
464 objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
465 cdependancies := $(objects:%.o=.dep/%.d)
466 cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
467 cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
469 # All symbols must be exported
472 ################################################################################
474 ################################################################################
479 all: vlc @ALIASES@ plugins
482 rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
483 rm -f plugins/*/*.o src/*/*.o lib/*.so extras/*/*.o
484 rm -f vlc gvlc kvlc qvlc
487 rm -f **/*.o **/*~ *.log
488 rm -f Makefile include/defs.h include/config.h
489 rm -f config.status config.cache config.log
490 rm -f gmon.out core build-stamp
494 mkdir -p $(DESTDIR)$(bindir)
495 $(INSTALL) vlc $(DESTDIR)$(bindir)
497 for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
498 mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
499 $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
500 mkdir -p $(DESTDIR)$(datadir)/videolan
501 $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
502 $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
503 $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
505 ifneq (,$(findstring darwin,$(SYS)))
506 # XXX this should only be for MacOS X
507 #should the following be "$(DESTDIR)$(bindir)vlc.app/" or "$(DESTDIR)vlc.app/" ?
508 mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS
509 mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
510 mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
511 $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist $(DESTDIR)$(bindir)vlc.app/Contents/
512 $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo $(DESTDIR)$(bindir)vlc.app/Contents/
513 $(INSTALL) vlc $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/
514 $(INSTALL) $(PLUGINS:%=lib/%.so) $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
515 $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
520 @echo CFLAGS: $(CFLAGS)
521 @echo DCFLAGS: $(DCFLAGS)
522 @echo LCFLAGS: $(LCFLAGS)
523 @echo C_OBJ: $(C_OBJ)
524 @echo CPP_OBJ: $(CPP_OBJ)
525 @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
526 @echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
527 @echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
528 @echo objects: $(objects)
529 @echo cppobjects: $(cppobjects)
531 # ugliest of all, but I have no time to do it -- sam
533 rm -rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
534 # copy archive in /tmp
535 find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
536 do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
538 find debian -mindepth 1 -maxdepth 1 -type d | \
539 while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
541 find include src plugins -type f -name '*.[chi]*' | while read i ; \
542 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
545 cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
546 Makefile.in Makefile.dep configure configure.in install-sh \
547 config.sub config.guess todo.pl \
548 /tmp/vlc-@VLC_VERSION@/
549 for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
550 changelog changelog-css rules rules-css vlc.1 vlc.dirs \
552 cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
553 for file in default8x16.psf default8x9.psf gvlc.png vlc.png \
554 gvlc.xpm vlc.xpm ; do \
555 cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
557 # build css-enabled archives
558 (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
559 bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
560 > vlc-@VLC_VERSION@.tar.bz2 ; \
561 gzip -f -9 vlc-@VLC_VERSION@.tar )
562 mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
565 rm -rf /tmp/vlc-@VLC_VERSION@*
567 plugins: $(PLUGINS:%=lib/%.so)
572 # GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
576 rm -f $@ && ln -s vlc $@
580 # Generic rules (see below)
582 $(cdependancies): %.d: FORCE
583 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
585 $(cppdependancies): %.dpp: FORCE
586 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
588 $(C_OBJ): %.o: Makefile.dep
589 $(C_OBJ): %.o: .dep/%.d
591 ifneq (,$(findstring darwin,$(SYS)))
592 #this is uglier of all
593 @if test "src/ac3_decoder/ac3_imdct.c" = "$<"; then $(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<; echo "(CC) `echo $(CFLAGS) | sed -e 's/-O3/-O/'` -c -o $@ $<"; else $(CC) $(CFLAGS) -c -o $@ $<; echo "$(CC) $(CFLAGS) -c -o $@ $<"; fi
595 $(CC) $(CFLAGS) -c -o $@ $<
598 $(CPP_OBJ): %.o: Makefile.dep
599 $(CPP_OBJ): %.o: .dep/%.dpp
600 $(CPP_OBJ): %.o: %.cpp
601 $(CC) $(CFLAGS) -c -o $@ $<
603 $(ASM_OBJ): %.o: Makefile.dep
605 $(CC) $(CFLAGS) -c -o $@ $<
607 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
608 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
609 $(STD_PLUGIN_OBJ): %.o: %.c
610 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
612 $(PLUGIN_XVIDEO): %.o: Makefile.dep
613 $(PLUGIN_XVIDEO): %.o: .dep/%.d
614 $(PLUGIN_XVIDEO): %.o: %.c
615 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<
617 $(PLUGIN_X11): %.o: Makefile.dep
618 $(PLUGIN_X11): %.o: .dep/%.d
619 $(PLUGIN_X11): %.o: %.c
620 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/X11R6/include -c -o $@ $<
622 $(PLUGIN_GTK): %.o: Makefile.dep
623 $(PLUGIN_GTK): %.o: .dep/%.d
624 $(PLUGIN_GTK): %.o: %.c
625 $(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
627 $(PLUGIN_GNOME): %.o: Makefile.dep
628 $(PLUGIN_GNOME): %.o: .dep/%.d
629 $(PLUGIN_GNOME): %.o: %.c
630 $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
632 $(PLUGIN_GLIDE): %.o: Makefile.dep
633 $(PLUGIN_GLIDE): %.o: .dep/%.d
634 $(PLUGIN_GLIDE): %.o: %.c
635 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
637 $(PLUGIN_QT): %.o: Makefile.dep
638 $(PLUGIN_QT): %.o: .dep/%.dpp
639 $(PLUGIN_QT): %.o: %.moc
640 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
641 $(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
644 $(PLUGIN_KDE): %.o: Makefile.dep
645 $(PLUGIN_KDE): %.o: .dep/%.dpp
646 $(PLUGIN_KDE): %.o: %.cpp
647 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
649 $(PLUGIN_BEOS): %.o: Makefile.dep
650 $(PLUGIN_BEOS): %.o: .dep/%.dpp
651 $(PLUGIN_BEOS): %.o: %.cpp
652 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
654 $(PLUGIN_IDCTALTIVEC): %.o: Makefile.dep
655 $(PLUGIN_IDCTALTIVEC): %.o: .dep/%.d
656 $(PLUGIN_IDCTALTIVEC): %.o: %.c
657 $(CC) $(CFLAGS) $(PCFLAGS) -faltivec -c -o $@ $<
659 $(PLUGIN_MACOSX): %.o: Makefile.dep
660 $(PLUGIN_MACOSX): %.o: .dep/%.d
661 $(PLUGIN_MACOSX): %.o: %.c
662 $(CC) $(CFLAGS) $(PCFLAGS) -fpascal-strings -c -o $@ $<
665 # Main application target
668 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
669 $(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(LCFLAGS)
671 rm -f ./plugins/_APP_
672 ln -s ../vlc ./plugins/_APP_
676 ifneq (,$(findstring darwin,$(SYS)))
677 mkdir -p vlc.app/Contents/MacOS
678 mkdir -p vlc.app/Contents/MacOS/lib
679 mkdir -p vlc.app/Contents/MacOS/share
680 $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
681 $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
682 $(INSTALL) vlc vlc.app/Contents/MacOS/
683 $(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
684 $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
691 lib/alsa.so: $(PLUGIN_ALSA)
692 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lasound
694 lib/beos.so: $(PLUGIN_BEOS)
695 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lbe -lgame -lroot -ltracker
697 lib/esd.so: $(PLUGIN_ESD)
698 ifneq (,$(findstring bsd,$(SYS)))
699 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lesd
701 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -laudiofile -lesd
704 lib/darwin.so: $(PLUGIN_DARWIN)
705 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio
707 lib/dsp.so: $(PLUGIN_DSP)
708 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
710 lib/dummy.so: $(PLUGIN_DUMMY)
711 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
713 lib/dvd.so: $(PLUGIN_DVD)
714 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
716 lib/fb.so: $(PLUGIN_FB)
717 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
719 lib/ggi.so: $(PLUGIN_GGI)
720 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GGI@
722 lib/glide.so: $(PLUGIN_GLIDE)
723 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_GLIDE@
725 lib/gnome.so: $(PLUGIN_GNOME)
726 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
728 lib/gtk.so: $(PLUGIN_GTK)
729 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gtk-config --libs gtk | sed 's,-rdynamic,,'`
731 lib/idct.so: $(PLUGIN_IDCT) $(PLUGIN_IDCTCOMMON)
732 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
734 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON)
735 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
737 lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON)
738 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
740 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON)
741 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
743 lib/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON)
744 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework vecLib
746 lib/kde.so: $(PLUGIN_KDE)
747 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lkdeui -lkdecore -lqt -ldl
749 lib/macosx.so: $(PLUGIN_MACOSX)
750 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework CoreAudio -framework Carbon -framework AGL
752 lib/mga.so: $(PLUGIN_MGA)
753 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
755 lib/motion.so: $(PLUGIN_MOTION) $(PLUGIN_MOTIONCOMMON)
756 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
758 lib/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
759 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
761 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
762 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
764 lib/ncurses.so: $(PLUGIN_NCURSES)
765 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lncurses
767 lib/null.so: $(PLUGIN_NULL)
768 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
770 lib/ps.so: $(PLUGIN_PS)
771 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
773 lib/qt.so: $(PLUGIN_QT)
774 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -lqt -L${QTDIR}/lib
776 lib/sdl.so: $(PLUGIN_SDL)
777 ifneq (,$(findstring darwin,$(SYS)))
778 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@ -framework Carbon -framework AGL
780 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) @LIB_SDL@
783 lib/ts.so: $(PLUGIN_TS)
784 ifneq (,$(findstring darwin,$(SYS)))
785 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -framework AGL -framework Carbon
787 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
790 lib/xvideo.so: $(PLUGIN_XVIDEO)
791 ifeq ($(SYS),nto-qnx)
792 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv -lsocket
794 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXv
797 lib/x11.so: $(PLUGIN_X11)
798 ifeq ($(SYS),nto-qnx)
799 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lsocket
801 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) -L/usr/X11R6/lib -lX11 -lXext
804 lib/yuv.so: $(PLUGIN_YUV)
805 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
807 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
808 $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
810 ################################################################################
811 # Note on generic rules and dependancies
812 ################################################################################
814 # Note on dependancies: each .c file is associated with a .d file, which
815 # depends of it. The .o file associated with a .c file depends of the .d, of the
816 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
818 # The dep directory should be ignored by CVS.
820 # Note on inclusions: depending of the target, the dependancies files must
821 # or must not be included. The problem is that if we ask make to include a file,
822 # and this file does not exist, it is made before it can be included. In a
823 # general way, a .d file should be included if and only if the corresponding .o
824 # needs to be re-made.
826 # Two makefiles are used: the main one (this one) has regular generic rules,
827 # except for .o files, for which it calls the object Makefile. Dependancies
828 # are not included in this file.
829 # The object Makefile known how to make a .o from a .c, and includes
830 # dependancies for the target, but only those required.