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)
29 #----------------- do not change anything below this line ----------------------
31 ################################################################################
32 # Configuration pre-processing
33 ################################################################################
35 # PROGRAM_OPTIONS is an identification string of the compilation options
36 PROGRAM_OPTIONS = $(SYS) $(ARCH)
38 PROGRAM_OPTIONS += DEBUG
42 PROGRAM_OPTIONS += DEBUG
46 # PROGRAM_BUILD is a complete identification of the build
47 # (we can't use fancy options with date since OSes like Solaris
48 # or FreeBSD have strange date implementations)
49 PROGRAM_BUILD = `date` $(USER)
50 # XXX: beos does not support hostname (how lame...)
51 #PROGRAM_BUILD = `date` $(USER)@`hostname`
53 # DEFINE will contain some of the constants definitions decided in Makefile,
54 # including SYS_xx. It will be passed to C compiler.
55 DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_)
57 # On Linux activate 64-bit off_t (by default under BSD)
58 ifneq (,$(findstring linux,$(SYS)))
59 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
62 ################################################################################
63 # Tuning and other variables - do not change anything except if you know
64 # exactly what you are doing
65 ################################################################################
68 # C headers directories
70 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
79 ifneq (,$(findstring bsd,$(SYS)))
80 LIB += -pthread -lgnugetopt
81 LIB += -L/usr/local/lib
84 ifneq (,$(findstring linux,$(SYS)))
88 ifneq (,$(findstring solaris,$(SYS)))
89 LIB += -ldl -lsocket -lnsl -lpthread
93 LIB += -lbe -lroot -lgame
99 # C compiler flags: mainstream compilation
101 CFLAGS += $(DEFINE) $(INCLUDE)
102 CFLAGS += -Wall -Winline
103 CFLAGS += -D_REENTRANT
104 CFLAGS += -D_GNU_SOURCE
106 # flags needed for clean beos compilation
108 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
111 # Optimizations : don't compile debug versions with them
114 CFLAGS += -ffast-math -funroll-loops
115 CFLAGS += -fomit-frame-pointer
117 # Optimizations for x86 familiy
118 ifneq (,$(findstring 86,$(ARCH)))
119 # Optional Pentium Pro optimizations
120 ifneq (,$(findstring ppro,$(ARCH)))
121 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
123 CFLAGS += -march=pentium -mcpu=pentium
127 # Optimizations for PowerPC
128 ifneq (,$(findstring powerpc,$(ARCH)))
130 CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
132 #CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
134 #CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
137 # Optimizations for Sparc
138 ifneq (,$(findstring sparc,$(ARCH)))
139 CFLAGS += -mhard-float
142 #end of optimisations
145 # Optional MMX optimizations for x86
146 ifneq (,$(findstring mmx,$(ARCH)))
151 # C compiler flags: plugin compilation
156 # C compiler flags: dependancies
158 DCFLAGS += $(INCLUDE)
162 # C compiler flags: linking
169 # Debugging and profiling support (unless optimisations are active)
175 #################################################################################
177 #################################################################################
182 INTERFACE = src/interface/main.o \
183 src/interface/interface.o \
184 src/interface/intf_msg.o \
185 src/interface/intf_cmd.o \
186 src/interface/intf_ctrl.o \
187 src/interface/intf_plst.o \
188 src/interface/intf_channels.o \
189 src/interface/intf_console.o
191 INPUT = src/input/input_ext-dec.o \
192 src/input/input_ext-intf.o \
193 src/input/input_dec.o \
194 src/input/input_programs.o \
195 src/input/input_netlist.o \
196 src/input/input_clock.o \
198 src/input/mpeg_system.o
200 AUDIO_OUTPUT = src/audio_output/audio_output.o
202 VIDEO_OUTPUT = src/video_output/video_output.o \
203 src/video_output/video_text.o \
204 src/video_output/video_spu.o \
205 src/video_output/video_yuv.o
207 AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
208 src/ac3_decoder/ac3_decoder.o \
209 src/ac3_decoder/ac3_parse.o \
210 src/ac3_decoder/ac3_exponent.o \
211 src/ac3_decoder/ac3_bit_allocate.o \
212 src/ac3_decoder/ac3_mantissa.o \
213 src/ac3_decoder/ac3_rematrix.o \
214 src/ac3_decoder/ac3_imdct.o \
215 src/ac3_decoder/ac3_downmix.o
217 LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
218 src/lpcm_decoder/lpcm_decoder.o
220 AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
221 src/audio_decoder/adec_generic.o \
222 src/audio_decoder/adec_layer1.o \
223 src/audio_decoder/adec_layer2.o \
224 src/audio_decoder/adec_math.o
226 SPU_DECODER = src/spu_decoder/spu_decoder.o
228 #GEN_DECODER = src/generic_decoder/generic_decoder.o
230 VIDEO_PARSER = src/video_parser/video_parser.o \
231 src/video_parser/vpar_headers.o \
232 src/video_parser/vpar_blocks.o \
233 src/video_parser/vpar_synchro.o \
234 src/video_parser/video_fifo.o
236 VIDEO_DECODER = src/video_decoder/video_decoder.o
238 MISC = src/misc/mtime.o \
240 src/misc/rsc_files.o \
245 C_OBJ = $(INTERFACE) \
263 CPP_OBJ = src/misc/beos_specific.o
269 ifneq (,$(findstring 86,$(ARCH)))
270 ifneq (,$(findstring mmx,$(ARCH)))
278 PLUGIN_ALSA = plugins/alsa/alsa.o \
279 plugins/alsa/aout_alsa.o
281 PLUGIN_BEOS = plugins/beos/beos.o \
282 plugins/beos/aout_beos.o \
283 plugins/beos/intf_beos.o \
284 plugins/beos/vout_beos.o
286 PLUGIN_DSP = plugins/dsp/dsp.o \
287 plugins/dsp/aout_dsp.o
289 PLUGIN_DUMMY = plugins/dummy/dummy.o \
290 plugins/dummy/aout_dummy.o \
291 plugins/dummy/intf_dummy.o \
292 plugins/dummy/vout_dummy.o
294 PLUGIN_DVD = plugins/dvd/dvd.o \
295 plugins/dvd/input_dvd.o \
296 plugins/dvd/dvd_ifo.o \
297 plugins/dvd/dvd_udf.o \
298 plugins/dvd/dvd_css.o
300 PLUGIN_ESD = plugins/esd/esd.o \
301 plugins/esd/aout_esd.o
303 PLUGIN_FB = plugins/fb/fb.o \
306 PLUGIN_GGI = plugins/ggi/ggi.o \
307 plugins/ggi/intf_ggi.o \
308 plugins/ggi/vout_ggi.o
310 PLUGIN_GLIDE = plugins/glide/glide.o \
311 plugins/glide/intf_glide.o \
312 plugins/glide/vout_glide.o
314 PLUGIN_GNOME = plugins/gnome/gnome.o \
315 plugins/gnome/intf_gnome.o \
316 plugins/gnome/gnome_callbacks.o \
317 plugins/gnome/gnome_interface.o \
318 plugins/gnome/gnome_support.o
320 PLUGIN_IDCT = plugins/idct/idct.o \
321 plugins/idct/idct_common.o
323 PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o \
324 plugins/idct/idct_common.o
326 PLUGIN_IDCTMMX = plugins/idct/idctmmx.o \
327 plugins/idct/idct_common.o
329 PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o \
330 plugins/idct/idct_common.o
332 PLUGIN_MGA = plugins/mga/mga.o \
333 plugins/mga/intf_mga.o \
334 plugins/mga/vout_mga.o
336 PLUGIN_MOTION = plugins/motion/motion.o \
337 plugins/motion/vdec_motion_common.o \
338 plugins/motion/vdec_motion_inner.o
340 PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
341 plugins/motion/vdec_motion_common.o \
342 plugins/motion/vdec_motion_inner_mmx.o
344 PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
345 plugins/motion/vdec_motion_common.o \
346 plugins/motion/vdec_motion_inner_mmxext.o
348 PLUGIN_NCURSES = plugins/text/ncurses.o \
349 plugins/text/intf_ncurses.o
351 PLUGIN_NULL = plugins/null/null.o
353 PLUGIN_PS = plugins/mpeg/ps.o \
354 plugins/mpeg/input_ps.o
356 PLUGIN_SDL = plugins/sdl/sdl.o \
357 plugins/sdl/vout_sdl.o \
358 plugins/sdl/aout_sdl.o
360 PLUGIN_TS = plugins/mpeg/ts.o \
361 plugins/mpeg/input_ts.o
363 PLUGIN_X11= plugins/x11/x11.o \
364 plugins/x11/vout_x11.o
366 PLUGIN_YUV = plugins/yuv/yuv.o \
367 plugins/yuv/video_yuv.o \
368 plugins/yuv/transforms_yuv.o
370 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
371 plugins/yuv/video_yuvmmx.o \
372 plugins/yuv/transforms_yuvmmx.o
383 $(PLUGIN_IDCTCLASSIC) \
385 $(PLUGIN_IDCTMMXEXT) \
388 $(PLUGIN_MOTIONMMX) \
389 $(PLUGIN_MOTIONMMXEXT) \
400 STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
401 plugins/motion/vdec_motion_common.o
403 # filter out duplicates from the plugin object lists
404 STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \
405 $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
407 NONSTD_PLUGIN_OBJ = \
411 NONSTD_CPP_PLUGIN_OBJ = \
415 # Other lists of files
417 objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
418 cdependancies := $(objects:%.o=.dep/%.d)
419 cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
420 cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
422 # All symbols must be exported
425 ################################################################################
427 ################################################################################
432 all: vlc @ALIASES@ plugins
435 rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
436 rm -f plugins/*/*.o src/*/*.o lib/*.so
440 rm -f src/*/*.o plugins/*/*.o **/*~ *.log
441 rm -f Makefile include/defs.h include/config.h
442 rm -f config.status config.cache config.log
443 rm -f gmon.out core build-stamp
447 mkdir -p $(prefix)/bin
448 $(INSTALL) vlc $(prefix)/bin
450 for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
451 mkdir -p $(prefix)/lib/videolan/vlc
452 $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
453 mkdir -p $(prefix)/share/videolan
454 $(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
455 $(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
459 @echo CFLAGS: $(CFLAGS)
460 @echo DCFLAGS: $(DCFLAGS)
461 @echo LCFLAGS: $(LCFLAGS)
462 @echo C_OBJ: $(C_OBJ)
463 @echo CPP_OBJ: $(CPP_OBJ)
464 @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
465 @echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
466 @echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
467 @echo objects: $(objects)
468 @echo cppobjects: $(cppobjects)
470 # ugliest of all, but I have no time to do it -- sam
472 rm -rf /tmp/vlc-@VLC_VERSION@ /tmp/vlc-@VLC_VERSION@nocss
473 # copy archive in /tmp
474 find -type d | while read i ; \
475 do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
477 find debian -mindepth 1 -maxdepth 1 -type d | grep -v CVS | \
478 while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
480 find . -type f | grep CVS | while read i ; \
481 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
484 find include src plugins -type f -name '*.[chi]*' | while read i ; \
485 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
488 cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
489 Makefile.in Makefile.dep configure configure.in install-sh \
490 config.sub config.guess todo.pl \
491 /tmp/vlc-@VLC_VERSION@/
492 for file in control vlc-gnome.menu vlc.copyright vlc.docs changelog \
493 rules vlc.1 vlc.dirs vlc.menu ; do \
494 cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
495 for file in default8x16.psf default8x9.psf gvlc.png vlc.png ; do \
496 cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
498 # build css-enabled archives
499 (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
500 bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
501 > vlc-@VLC_VERSION@.tar.bz2 ; \
502 gzip -f -9 vlc-@VLC_VERSION@.tar )
503 mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
506 # find /tmp/vlc-@VLC_VERSION@ -type f -name '*css*' | xargs rm -f
507 # for x in Makefile.in src/input/input_dvd.c src/input/input_dvd.h ; do \
508 # rm -f /tmp/vlc-@VLC_VERSION@/$$x ; \
509 # perl -ne 'if (/^#e(lse|ndif)/) { $$i=0; } \
510 # if (/^#if.*DVD/) { $$i=1; print "#if 0\n"; } \
511 # elsif (!$$i || /^#/) { print $$_; }' \
512 # < $$x | grep -vi css >| /tmp/vlc-@VLC_VERSION@/$$x ; \
514 # rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
515 # sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
516 # > /tmp/vlc-@VLC_VERSION@/debian/changelog
518 # # build nocss archives
519 # (cd /tmp ; mv vlc-@VLC_VERSION@ vlc-@VLC_VERSION@nocss ; \
520 # tar cf vlc-@VLC_VERSION@nocss.tar vlc-@VLC_VERSION@nocss ; \
521 # bzip2 -f -9 < vlc-@VLC_VERSION@nocss.tar \
522 # > vlc-@VLC_VERSION@nocss.tar.bz2 ; \
523 # gzip -f -9 vlc-@VLC_VERSION@nocss.tar )
524 # mv /tmp/vlc-@VLC_VERSION@nocss.tar.gz \
525 # /tmp/vlc-@VLC_VERSION@nocss.tar.bz2 ..
528 rm -rf /tmp/vlc-@VLC_VERSION@*
530 plugins: $(PLUGINS:%=lib/%.so)
535 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
539 rm -f $@ && ln -s vlc $@
543 # Generic rules (see below)
545 $(cdependancies): %.d: FORCE
546 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
548 $(cppdependancies): %.dpp: FORCE
549 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
551 $(C_OBJ): %.o: Makefile.dep
552 $(C_OBJ): %.o: .dep/%.d
554 $(CC) $(CFLAGS) -c -o $@ $<
556 $(CPP_OBJ): %.o: Makefile.dep
557 $(CPP_OBJ): %.o: .dep/%.dpp
558 $(CPP_OBJ): %.o: %.cpp
559 $(CC) $(CFLAGS) -c -o $@ $<
561 $(ASM_OBJ): %.o: Makefile.dep
563 $(CC) $(CFLAGS) -c -o $@ $<
565 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
566 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
567 $(STD_PLUGIN_OBJ): %.o: %.c
568 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
570 $(PLUGIN_GNOME): %.o: Makefile.dep
571 $(PLUGIN_GNOME): %.o: .dep/%.d
572 $(PLUGIN_GNOME): %.o: %.c
573 $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
575 $(PLUGIN_GLIDE): %.o: Makefile.dep
576 $(PLUGIN_GLIDE): %.o: .dep/%.d
577 $(PLUGIN_GLIDE): %.o: %.c
578 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
580 $(PLUGIN_BEOS): %.o: Makefile.dep
581 $(PLUGIN_BEOS): %.o: .dep/%.dpp
582 $(PLUGIN_BEOS): %.o: %.cpp
583 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
586 # Main application target
589 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
591 $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
592 rm -f ./plugins/_APP_
593 ln -s ../vlc ./plugins/_APP_
595 $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
602 lib/beos.so: $(PLUGIN_BEOS)
603 $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ -lbe -lgame -lroot
605 lib/esd.so: $(PLUGIN_ESD)
606 ifneq (,$(findstring bsd,$(SYS)))
607 $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
609 $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
612 lib/dsp.so: $(PLUGIN_DSP)
613 $(CC) $(PCFLAGS) -shared -o $@ $^
615 lib/alsa.so: $(PLUGIN_ALSA)
616 $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
618 lib/fb.so: $(PLUGIN_FB)
619 $(CC) $(PCFLAGS) -shared -o $@ $^
621 lib/x11.so: $(PLUGIN_X11)
622 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
624 lib/mga.so: $(PLUGIN_MGA)
625 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
627 lib/gnome.so: $(PLUGIN_GNOME)
628 $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
630 lib/glide.so: $(PLUGIN_GLIDE)
631 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
633 lib/ggi.so: $(PLUGIN_GGI)
634 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
636 lib/sdl.so: $(PLUGIN_SDL)
637 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
639 lib/ncurses.so: $(PLUGIN_NCURSES)
640 $(CC) $(PCFLAGS) -shared -o $@ $^ -lcurses
643 lib/null.so: $(PLUGIN_NULL)
644 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
646 lib/ps.so: $(PLUGIN_PS)
647 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
649 lib/ts.so: $(PLUGIN_TS)
650 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
652 lib/dvd.so: $(PLUGIN_DVD)
653 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
655 lib/dummy.so: $(PLUGIN_DUMMY)
656 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
658 lib/yuv.so: $(PLUGIN_YUV)
659 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
661 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
662 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
664 lib/motion.so: $(PLUGIN_MOTION)
665 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
667 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
668 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
670 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
671 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
673 lib/idct.so: $(PLUGIN_IDCT)
674 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
676 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
677 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
679 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
680 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
682 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
683 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
685 lib/null.so: $(PLUGIN_NULL)
686 $(CC) $(PCFLAGS) -shared -o $@ $^
688 lib/ps.so: $(PLUGIN_PS)
689 $(CC) $(PCFLAGS) -shared -o $@ $^
691 lib/ts.so: $(PLUGIN_TS)
692 $(CC) $(PCFLAGS) -shared -o $@ $^
694 lib/dvd.so: $(PLUGIN_DVD)
695 $(CC) $(PCFLAGS) -shared -o $@ $^
697 lib/dummy.so: $(PLUGIN_DUMMY)
698 $(CC) $(PCFLAGS) -shared -o $@ $^
700 lib/yuv.so: $(PLUGIN_YUV)
701 $(CC) $(PCFLAGS) -shared -o $@ $^
703 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
704 $(CC) $(PCFLAGS) -shared -o $@ $^
706 lib/motion.so: $(PLUGIN_MOTION)
707 $(CC) $(PCFLAGS) -shared -o $@ $^
709 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
710 $(CC) $(PCFLAGS) -shared -o $@ $^
712 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
713 $(CC) $(PCFLAGS) -shared -o $@ $^
715 lib/idct.so: $(PLUGIN_IDCT)
716 $(CC) $(PCFLAGS) -shared -o $@ $^
718 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
719 $(CC) $(PCFLAGS) -shared -o $@ $^
721 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
722 $(CC) $(PCFLAGS) -shared -o $@ $^
724 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
725 $(CC) $(PCFLAGS) -shared -o $@ $^
728 ################################################################################
729 # Note on generic rules and dependancies
730 ################################################################################
732 # Note on dependancies: each .c file is associated with a .d file, which
733 # depends of it. The .o file associated with a .c file depends of the .d, of the
734 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
736 # The dep directory should be ignored by CVS.
738 # Note on inclusions: depending of the target, the dependancies files must
739 # or must not be included. The problem is that if we ask make to include a file,
740 # and this file does not exist, it is made before it can be included. In a
741 # general way, a .d file should be included if and only if the corresponding .o
742 # needs to be re-made.
744 # Two makefiles are used: the main one (this one) has regular generic rules,
745 # except for .o files, for which it calls the object Makefile. Dependancies
746 # are not included in this file.
747 # The object Makefile known how to make a .o from a .c, and includes
748 # dependancies for the target, but only those required.