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@
35 #----------------- do not change anything below this line ----------------------
37 ################################################################################
38 # Configuration pre-processing
39 ################################################################################
41 # PROGRAM_OPTIONS is an identification string of the compilation options
42 PROGRAM_OPTIONS = $(SYS) $(ARCH)
44 PROGRAM_OPTIONS += DEBUG
48 PROGRAM_OPTIONS += DEBUG
52 # PROGRAM_BUILD is a complete identification of the build
53 # (we can't use fancy options with date since OSes like Solaris
54 # or FreeBSD have strange date implementations)
55 PROGRAM_BUILD = `date` $(USER)
56 # XXX: beos does not support hostname (how lame...)
57 #PROGRAM_BUILD = `date` $(USER)@`hostname`
59 # DEFINE will contain some of the constants definitions decided in Makefile,
60 # including SYS_xx. It will be passed to C compiler.
61 DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_)
63 # On Linux activate 64-bit off_t (by default under BSD)
64 ifneq (,$(findstring linux,$(SYS)))
65 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
68 ################################################################################
69 # Tuning and other variables - do not change anything except if you know
70 # exactly what you are doing
71 ################################################################################
74 # C headers directories
76 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
85 ifneq (,$(findstring bsd,$(SYS)))
86 LIB += -pthread -lgnugetopt
87 LIB += -L/usr/local/lib
90 ifneq (,$(findstring linux,$(SYS)))
94 ifneq (,$(findstring solaris,$(SYS)))
95 LIB += -ldl -lsocket -lnsl -lpthread
99 LIB += -lbe -lroot -lgame
105 # C compiler flags: mainstream compilation
107 CFLAGS += $(DEFINE) $(INCLUDE)
108 CFLAGS += -Wall -Winline
109 CFLAGS += -D_REENTRANT
110 CFLAGS += -D_GNU_SOURCE
112 # flags needed for clean beos compilation
114 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
117 # Optimizations : don't compile debug versions with them
120 CFLAGS += -ffast-math -funroll-loops
121 CFLAGS += -fomit-frame-pointer
123 # Optimizations for x86 familiy
124 ifneq (,$(findstring 86,$(ARCH)))
125 # Optional Pentium Pro optimizations
126 ifneq (,$(findstring ppro,$(ARCH)))
127 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
129 CFLAGS += -march=pentium -mcpu=pentium
133 # Optimizations for PowerPC
134 ifneq (,$(findstring powerpc,$(ARCH)))
136 CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
138 #CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
140 #CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
143 # Optimizations for Sparc
144 ifneq (,$(findstring sparc,$(ARCH)))
145 CFLAGS += -mhard-float
148 #end of optimisations
151 # Optional MMX optimizations for x86
152 ifneq (,$(findstring mmx,$(ARCH)))
157 # C compiler flags: plugin compilation
162 # C compiler flags: dependancies
164 DCFLAGS += $(INCLUDE)
168 # C compiler flags: linking
175 # Debugging and profiling support (unless optimisations are active)
181 #################################################################################
183 #################################################################################
188 INTERFACE = src/interface/main.o \
189 src/interface/interface.o \
190 src/interface/intf_msg.o \
191 src/interface/intf_cmd.o \
192 src/interface/intf_ctrl.o \
193 src/interface/intf_plst.o \
194 src/interface/intf_channels.o \
195 src/interface/intf_console.o \
196 src/interface/intf_urldecode.o \
198 INPUT = src/input/input_ext-dec.o \
199 src/input/input_ext-intf.o \
200 src/input/input_dec.o \
201 src/input/input_programs.o \
202 src/input/input_netlist.o \
203 src/input/input_clock.o \
205 src/input/mpeg_system.o
207 AUDIO_OUTPUT = src/audio_output/audio_output.o
209 VIDEO_OUTPUT = src/video_output/video_output.o \
210 src/video_output/video_text.o \
211 src/video_output/video_spu.o \
212 src/video_output/video_yuv.o
214 AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
215 src/ac3_decoder/ac3_decoder.o \
216 src/ac3_decoder/ac3_parse.o \
217 src/ac3_decoder/ac3_exponent.o \
218 src/ac3_decoder/ac3_bit_allocate.o \
219 src/ac3_decoder/ac3_mantissa.o \
220 src/ac3_decoder/ac3_rematrix.o \
221 src/ac3_decoder/ac3_imdct.o \
222 src/ac3_decoder/ac3_downmix.o \
223 src/ac3_decoder/ac3_downmix_c.o
225 LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
226 src/lpcm_decoder/lpcm_decoder.o
228 AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
229 src/audio_decoder/adec_generic.o \
230 src/audio_decoder/adec_layer1.o \
231 src/audio_decoder/adec_layer2.o \
232 src/audio_decoder/adec_math.o
234 SPU_DECODER = src/spu_decoder/spu_decoder.o
236 #GEN_DECODER = src/generic_decoder/generic_decoder.o
238 VIDEO_PARSER = src/video_parser/video_parser.o \
239 src/video_parser/vpar_headers.o \
240 src/video_parser/vpar_blocks.o \
241 src/video_parser/vpar_synchro.o \
242 src/video_parser/video_fifo.o
244 VIDEO_DECODER = src/video_decoder/video_decoder.o
246 MISC = src/misc/mtime.o \
248 src/misc/rsc_files.o \
253 C_OBJ = $(INTERFACE) \
271 CPP_OBJ = src/misc/beos_specific.o
277 ifneq (,$(findstring 86,$(ARCH)))
278 ifneq (,$(findstring mmx,$(ARCH)))
286 PLUGIN_ALSA = plugins/alsa/alsa.o \
287 plugins/alsa/aout_alsa.o
289 PLUGIN_BEOS = plugins/beos/beos.o \
290 plugins/beos/aout_beos.o \
291 plugins/beos/intf_beos.o \
292 plugins/beos/vout_beos.o \
293 plugins/beos/DrawingTidbits.o \
294 plugins/beos/TransportButton.o
296 PLUGIN_DSP = plugins/dsp/dsp.o \
297 plugins/dsp/aout_dsp.o
299 PLUGIN_DUMMY = plugins/dummy/dummy.o \
300 plugins/dummy/aout_dummy.o \
301 plugins/dummy/intf_dummy.o \
302 plugins/dummy/vout_dummy.o
304 PLUGIN_DVD = plugins/dvd/dvd.o \
305 plugins/dvd/input_dvd.o \
306 plugins/dvd/dvd_netlist.o \
307 plugins/dvd/dvd_ioctl.o \
308 plugins/dvd/dvd_ifo.o \
309 plugins/dvd/dvd_udf.o \
310 plugins/dvd/dvd_css.o
312 PLUGIN_ESD = plugins/esd/esd.o \
313 plugins/esd/aout_esd.o
315 PLUGIN_FB = plugins/fb/fb.o \
318 PLUGIN_GGI = plugins/ggi/ggi.o \
319 plugins/ggi/vout_ggi.o
321 PLUGIN_GLIDE = plugins/glide/glide.o \
322 plugins/glide/vout_glide.o
324 PLUGIN_GTK = plugins/gtk/gtk.o \
325 plugins/gtk/intf_gtk.o \
326 plugins/gtk/gtk_callbacks.o \
327 plugins/gtk/gtk_interface.o \
328 plugins/gtk/gtk_support.o \
329 plugins/gtk/gtk_playlist.o
331 PLUGIN_GNOME = plugins/gnome/gnome.o \
332 plugins/gnome/intf_gnome.o \
333 plugins/gnome/gnome_callbacks.o \
334 plugins/gnome/gnome_interface.o \
335 plugins/gnome/gnome_support.o
337 PLUGIN_KDE = plugins/kde/kde.o \
338 plugins/kde/intf_kde.o \
341 PLUGIN_IDCT = plugins/idct/idct.o \
342 plugins/idct/idct_common.o
344 PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o \
345 plugins/idct/idct_common.o
347 PLUGIN_IDCTMMX = plugins/idct/idctmmx.o \
348 plugins/idct/idct_common.o
350 PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o \
351 plugins/idct/idct_common.o
353 PLUGIN_MGA = plugins/mga/mga.o \
354 plugins/mga/vout_mga.o
356 PLUGIN_MOTION = plugins/motion/motion.o \
357 plugins/motion/vdec_motion_common.o \
358 plugins/motion/vdec_motion_inner.o
360 PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
361 plugins/motion/vdec_motion_common.o \
362 plugins/motion/vdec_motion_inner_mmx.o
364 PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
365 plugins/motion/vdec_motion_common.o \
366 plugins/motion/vdec_motion_inner_mmxext.o
368 PLUGIN_NCURSES = plugins/text/ncurses.o \
369 plugins/text/intf_ncurses.o
371 PLUGIN_NULL = plugins/null/null.o
373 PLUGIN_PS = plugins/mpeg/ps.o \
374 plugins/mpeg/input_ps.o
376 PLUGIN_SDL = plugins/sdl/sdl.o \
377 plugins/sdl/vout_sdl.o \
378 plugins/sdl/aout_sdl.o
380 PLUGIN_TS = plugins/mpeg/ts.o \
381 plugins/mpeg/input_ts.o
383 PLUGIN_X11= plugins/x11/x11.o \
384 plugins/x11/vout_x11.o
386 PLUGIN_YUV = plugins/yuv/yuv.o \
387 plugins/yuv/video_yuv.o \
388 plugins/yuv/transforms_yuv.o
390 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
391 plugins/yuv/video_yuvmmx.o \
392 plugins/yuv/transforms_yuvmmx.o
403 $(PLUGIN_IDCTCLASSIC) \
405 $(PLUGIN_IDCTMMXEXT) \
408 $(PLUGIN_MOTIONMMX) \
409 $(PLUGIN_MOTIONMMXEXT) \
420 STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
421 plugins/motion/vdec_motion_common.o
423 # filter out duplicates from the plugin object lists
424 STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \
425 $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
427 NONSTD_PLUGIN_OBJ = \
432 NONSTD_CPP_PLUGIN_OBJ = \
437 # Other lists of files
439 objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
440 cdependancies := $(objects:%.o=.dep/%.d)
441 cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
442 cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
444 # All symbols must be exported
447 ################################################################################
449 ################################################################################
454 all: vlc @ALIASES@ plugins
457 rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
458 rm -f plugins/*/*.o src/*/*.o lib/*.so
462 rm -f src/*/*.o plugins/*/*.o **/*~ *.log
463 rm -f Makefile include/defs.h include/config.h
464 rm -f config.status config.cache config.log
465 rm -f gmon.out core build-stamp
469 mkdir -p $(DESTDIR)$(bindir)
470 $(INSTALL) vlc $(DESTDIR)$(bindir)
472 for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
473 mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
474 $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
475 mkdir -p $(DESTDIR)$(datadir)/videolan
476 $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
477 $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
478 $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
482 @echo CFLAGS: $(CFLAGS)
483 @echo DCFLAGS: $(DCFLAGS)
484 @echo LCFLAGS: $(LCFLAGS)
485 @echo C_OBJ: $(C_OBJ)
486 @echo CPP_OBJ: $(CPP_OBJ)
487 @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
488 @echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
489 @echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
490 @echo objects: $(objects)
491 @echo cppobjects: $(cppobjects)
493 # ugliest of all, but I have no time to do it -- sam
495 rm -rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
496 # copy archive in /tmp
497 find -type d | grep -v CVS | grep -v '^\.dep' | while read i ; \
498 do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
500 find debian -mindepth 1 -maxdepth 1 -type d | \
501 while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
503 find include src plugins -type f -name '*.[chi]*' | while read i ; \
504 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
507 cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
508 Makefile.in Makefile.dep configure configure.in install-sh \
509 config.sub config.guess todo.pl \
510 /tmp/vlc-@VLC_VERSION@/
511 for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
512 changelog changelog-css rules rules-css vlc.1 vlc.dirs \
514 cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
515 for file in default8x16.psf default8x9.psf gvlc.png vlc.png \
516 gvlc.xpm vlc.xpm ; do \
517 cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
519 # build css-enabled archives
520 (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
521 bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
522 > vlc-@VLC_VERSION@.tar.bz2 ; \
523 gzip -f -9 vlc-@VLC_VERSION@.tar )
524 mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
527 rm -rf /tmp/vlc-@VLC_VERSION@*
529 plugins: $(PLUGINS:%=lib/%.so)
534 # GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
538 rm -f $@ && ln -s vlc $@
542 # Generic rules (see below)
544 $(cdependancies): %.d: FORCE
545 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
547 $(cppdependancies): %.dpp: FORCE
548 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
550 $(C_OBJ): %.o: Makefile.dep
551 $(C_OBJ): %.o: .dep/%.d
553 $(CC) $(CFLAGS) -c -o $@ $<
555 $(CPP_OBJ): %.o: Makefile.dep
556 $(CPP_OBJ): %.o: .dep/%.dpp
557 $(CPP_OBJ): %.o: %.cpp
558 $(CC) $(CFLAGS) -c -o $@ $<
560 $(ASM_OBJ): %.o: Makefile.dep
562 $(CC) $(CFLAGS) -c -o $@ $<
564 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
565 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
566 $(STD_PLUGIN_OBJ): %.o: %.c
567 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
569 $(PLUGIN_GTK): %.o: Makefile.dep
570 $(PLUGIN_GTK): %.o: .dep/%.d
571 $(PLUGIN_GTK): %.o: %.c
572 $(CC) $(CFLAGS) $(PCFLAGS) `glib-config --cflags glib` `gtk-config --cflags gtk` -c -o $@ $<
574 $(PLUGIN_GNOME): %.o: Makefile.dep
575 $(PLUGIN_GNOME): %.o: .dep/%.d
576 $(PLUGIN_GNOME): %.o: %.c
577 $(CC) $(CFLAGS) $(PCFLAGS) `glib-config --cflags glib` `gnome-config --cflags gnomeui` -c -o $@ $<
579 $(PLUGIN_GLIDE): %.o: Makefile.dep
580 $(PLUGIN_GLIDE): %.o: .dep/%.d
581 $(PLUGIN_GLIDE): %.o: %.c
582 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
584 $(PLUGIN_KDE): %.o: Makefile.dep
585 $(PLUGIN_KDE): %.o: .dep/%.dpp
586 $(PLUGIN_KDE): %.o: %.cpp
587 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
589 $(PLUGIN_BEOS): %.o: Makefile.dep
590 $(PLUGIN_BEOS): %.o: .dep/%.dpp
591 $(PLUGIN_BEOS): %.o: %.cpp
592 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
595 # Main application target
598 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
600 $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
601 rm -f ./plugins/_APP_
602 ln -s ../vlc ./plugins/_APP_
604 $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
611 lib/beos.so: $(PLUGIN_BEOS)
612 $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ -lbe -lgame -lroot -ltracker
614 lib/esd.so: $(PLUGIN_ESD)
615 ifneq (,$(findstring bsd,$(SYS)))
616 $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
618 $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
621 lib/dsp.so: $(PLUGIN_DSP)
622 $(CC) $(PCFLAGS) -shared -o $@ $^
624 lib/kde.so: $(PLUGIN_KDE)
625 $(CC) $(PCFLAGS) -shared -o $@ $^ -lkdeui -lkdecore -lqt -ldl
627 lib/alsa.so: $(PLUGIN_ALSA)
628 $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
630 lib/fb.so: $(PLUGIN_FB)
631 $(CC) $(PCFLAGS) -shared -o $@ $^
633 lib/x11.so: $(PLUGIN_X11)
634 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
636 lib/mga.so: $(PLUGIN_MGA)
637 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
639 lib/gtk.so: $(PLUGIN_GTK)
640 $(CC) $(PCFLAGS) -shared -o $@ $^ `gtk-config --libs gtk | sed 's,-rdynamic,,'`
642 lib/gnome.so: $(PLUGIN_GNOME)
643 $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
645 lib/glide.so: $(PLUGIN_GLIDE)
646 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
648 lib/ggi.so: $(PLUGIN_GGI)
649 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
651 lib/sdl.so: $(PLUGIN_SDL)
652 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
654 lib/ncurses.so: $(PLUGIN_NCURSES)
655 $(CC) $(PCFLAGS) -shared -o $@ $^ -lncurses
658 lib/null.so: $(PLUGIN_NULL)
659 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
661 lib/ps.so: $(PLUGIN_PS)
662 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
664 lib/ts.so: $(PLUGIN_TS)
665 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
667 lib/dvd.so: $(PLUGIN_DVD)
668 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
670 lib/dummy.so: $(PLUGIN_DUMMY)
671 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
673 lib/yuv.so: $(PLUGIN_YUV)
674 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
676 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
677 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
679 lib/motion.so: $(PLUGIN_MOTION)
680 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
682 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
683 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
685 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
686 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
688 lib/idct.so: $(PLUGIN_IDCT)
689 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
691 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
692 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
694 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
695 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
697 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
698 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
700 lib/null.so: $(PLUGIN_NULL)
701 $(CC) $(PCFLAGS) -shared -o $@ $^
703 lib/ps.so: $(PLUGIN_PS)
704 $(CC) $(PCFLAGS) -shared -o $@ $^
706 lib/ts.so: $(PLUGIN_TS)
707 $(CC) $(PCFLAGS) -shared -o $@ $^
709 lib/dvd.so: $(PLUGIN_DVD)
710 $(CC) $(PCFLAGS) -shared -o $@ $^
712 lib/dummy.so: $(PLUGIN_DUMMY)
713 $(CC) $(PCFLAGS) -shared -o $@ $^
715 lib/yuv.so: $(PLUGIN_YUV)
716 $(CC) $(PCFLAGS) -shared -o $@ $^
718 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
719 $(CC) $(PCFLAGS) -shared -o $@ $^
721 lib/motion.so: $(PLUGIN_MOTION)
722 $(CC) $(PCFLAGS) -shared -o $@ $^
724 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
725 $(CC) $(PCFLAGS) -shared -o $@ $^
727 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
728 $(CC) $(PCFLAGS) -shared -o $@ $^
730 lib/idct.so: $(PLUGIN_IDCT)
731 $(CC) $(PCFLAGS) -shared -o $@ $^
733 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
734 $(CC) $(PCFLAGS) -shared -o $@ $^
736 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
737 $(CC) $(PCFLAGS) -shared -o $@ $^
739 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
740 $(CC) $(PCFLAGS) -shared -o $@ $^
743 ################################################################################
744 # Note on generic rules and dependancies
745 ################################################################################
747 # Note on dependancies: each .c file is associated with a .d file, which
748 # depends of it. The .o file associated with a .c file depends of the .d, of the
749 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
751 # The dep directory should be ignored by CVS.
753 # Note on inclusions: depending of the target, the dependancies files must
754 # or must not be included. The problem is that if we ask make to include a file,
755 # and this file does not exist, it is made before it can be included. In a
756 # general way, a .d file should be included if and only if the corresponding .o
757 # needs to be re-made.
759 # Two makefiles are used: the main one (this one) has regular generic rules,
760 # except for .o files, for which it calls the object Makefile. Dependancies
761 # are not included in this file.
762 # The object Makefile known how to make a .o from a .c, and includes
763 # dependancies for the target, but only those required.