]> git.sesse.net Git - vlc/blob - Makefile.in
* Beginning of support for encrypted DVDs.
[vlc] / Makefile.in
1 ################################################################################
2 # vlc (VideoLAN Client) main makefile
3 # (c)1998 VideoLAN
4 ################################################################################
5 # This makefile is the main makefile for the VideoLAN client.
6 ################################################################################
7
8 ################################################################################
9 # Configuration
10 ################################################################################
11
12 # Debugging mode on or off (set to 1 to activate)
13 DEBUG=@DEBUG@
14 STATS=@STATS@
15 OPTIMS=@OPTIMS@
16
17 SYS=@SYS@
18 PLUGINS=@PLUGINS@
19 SNAPSHOTDIR=vlc-@VLC_VERSION@
20 INSTALL=@INSTALL@
21 ARCH=@ARCH@
22 prefix=@prefix@
23 CC=@CC@
24 SHELL=@SHELL@
25
26 LIB_SDL=@LIB_SDL@
27 LIB_GLIDE=@LIB_GLIDE@
28 LIB_GGI=@LIB_GGI@
29
30 #----------------- do not change anything below this line ----------------------
31
32 ################################################################################
33 # Configuration pre-processing
34 ################################################################################
35
36 # PROGRAM_OPTIONS is an identification string of the compilation options
37 PROGRAM_OPTIONS = $(SYS) $(ARCH)
38 ifeq ($(DEBUG),1)
39 PROGRAM_OPTIONS += DEBUG
40 DEFINE += -DDEBUG
41 endif
42 ifeq ($(STATS),1)
43 PROGRAM_OPTIONS += DEBUG
44 DEFINE += -DSTATS
45 endif
46
47 # PROGRAM_BUILD is a complete identification of the build
48 # ( we can't use fancy options with date since OSes like Solaris
49 # or FreeBSD have strange date implementations )
50 PROGRAM_BUILD = `date` $(USER)
51 # XXX: beos does not support hostname
52 #PROGRAM_BUILD = `date` $(USER)@`hostname`
53
54 # DEFINE will contain some of the constants definitions decided in Makefile, 
55 # including SYS_xx. It will be passed to C compiler.
56 DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_)
57
58 ################################################################################
59 # Tuning and other variables - do not change anything except if you know
60 # exactly what you are doing
61 ################################################################################
62
63 #
64 # C headers directories
65 #
66 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
67
68 #
69 # Libraries
70 #
71 ifeq ($(SYS),gnu)
72 LIB += -lthreads -ldl
73 endif
74
75 ifneq (,$(findstring bsd,$(SYS)))
76 LIB += -pthread -lgnugetopt
77 LIB += -L/usr/local/lib
78 endif
79
80 ifneq (,$(findstring linux,$(SYS)))
81 LIB += -lpthread -ldl
82 endif
83
84 ifneq (,$(findstring solaris,$(SYS)))
85 LIB += -ldl -lsocket -lnsl -lpthread
86 endif
87
88 ifeq ($(SYS),beos)
89 LIB += -lbe -lroot -lgame
90 else
91 LIB += -lm
92 endif
93
94 #
95 # C compiler flags: mainstream compilation
96 #
97 CFLAGS += $(DEFINE) $(INCLUDE)
98 CFLAGS += -Wall -Winline
99 CFLAGS += -D_REENTRANT
100 CFLAGS += -D_GNU_SOURCE
101
102 # flags needed for clean beos compilation
103 ifeq ($(SYS),beos)
104 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
105 endif
106
107 # Optimizations : don't compile debug versions with them
108 ifeq ($(OPTIMS),1)
109 CFLAGS += -O6
110 CFLAGS += -ffast-math -funroll-loops -funroll-all-loops
111 CFLAGS += -fomit-frame-pointer
112 CFLAGS += @BIZARRE_OPTIMS@
113
114 # Optimizations for x86 familiy
115 ifneq (,$(findstring 86,$(ARCH)))
116 CFLAGS += -malign-double
117 # Optional Pentium Pro optimizations
118 ifneq (,$(findstring ppro,$(ARCH)))
119 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
120 else
121 CFLAGS += -march=pentium -mcpu=pentium
122 endif
123 endif
124
125 # Optimizations for PowerPC
126 ifneq (,$(findstring powerpc,$(ARCH)))
127 # 604e
128 CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
129 # G3
130 #CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
131 # G4
132 #CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
133 endif
134
135 # Optimizations for Sparc
136 ifneq (,$(findstring sparc,$(ARCH)))
137 CFLAGS += -mhard-float
138 endif
139
140 #end of optimisations
141 endif
142
143 # Optional MMX optimizations for x86
144 ifneq (,$(findstring mmx,$(ARCH)))
145 CFLAGS += -DHAVE_MMX
146 endif
147
148 #
149 # C compiler flags: plugin compilation
150 #
151 PCFLAGS += -fPIC
152
153 #
154 # C compiler flags: dependancies
155 #
156 DCFLAGS += $(INCLUDE)
157 DCFLAGS += -MM
158
159 #
160 # C compiler flags: linking
161 #
162 LCFLAGS += $(LIB)
163 LCFLAGS += -Wall
164 #LCFLAGS += -s
165
166 #
167 # Debugging and profiling support (unless optimisations are active)
168 #
169 ifneq ($(OPTIMS),1)
170 CFLAGS += -g
171 endif
172
173 #################################################################################
174 # Objects and files
175 #################################################################################
176
177 #
178 # C Objects
179
180 INTERFACE =     src/interface/main.o \
181                 src/interface/interface.o \
182                 src/interface/intf_msg.o \
183                 src/interface/intf_cmd.o \
184                 src/interface/intf_ctrl.o \
185                 src/interface/intf_console.o
186
187 INPUT =         src/input/input_ps.o \
188                 src/input/input_ts.o \
189                 src/input/dvd_ifo.o \
190         src/input/dvd_css.o \
191                 src/input/input_dvd.o \
192                 src/input/mpeg_system.o \
193                 src/input/input_ext-dec.o \
194                 src/input/input_dec.o \
195                 src/input/input_programs.o \
196                 src/input/input_netlist.o \
197                 src/input/input.o
198
199 AUDIO_OUTPUT =  src/audio_output/audio_output.o
200
201 VIDEO_OUTPUT =  src/video_output/video_output.o \
202                 src/video_output/video_text.o \
203                 src/video_output/video_spu.o \
204                 src/video_output/video_yuv.o
205
206 AC3_DECODER =   src/ac3_decoder/ac3_decoder_thread.o \
207                 src/ac3_decoder/ac3_decoder.o \
208                 src/ac3_decoder/ac3_parse.o \
209                 src/ac3_decoder/ac3_exponent.o \
210                 src/ac3_decoder/ac3_bit_allocate.o \
211                 src/ac3_decoder/ac3_mantissa.o \
212                 src/ac3_decoder/ac3_rematrix.o \
213                 src/ac3_decoder/ac3_imdct.o \
214                 src/ac3_decoder/ac3_downmix.o
215
216 LPCM_DECODER =  src/lpcm_decoder/lpcm_decoder_thread.o \
217                 src/lpcm_decoder/lpcm_decoder.o
218
219 AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
220                 src/audio_decoder/adec_generic.o \
221                 src/audio_decoder/adec_layer1.o \
222                 src/audio_decoder/adec_layer2.o \
223                 src/audio_decoder/adec_math.o
224
225 SPU_DECODER =   src/spu_decoder/spu_decoder.o
226
227 #GEN_DECODER =  src/generic_decoder/generic_decoder.o
228
229 VIDEO_PARSER =  src/video_parser/video_parser.o \
230                 src/video_parser/vpar_headers.o \
231                 src/video_parser/vpar_blocks.o \
232                 src/video_parser/vpar_synchro.o \
233                 src/video_parser/video_fifo.o
234
235 VIDEO_DECODER = src/video_decoder/video_decoder.o
236
237 MISC =          src/misc/mtime.o \
238                 src/misc/tests.o \
239                 src/misc/rsc_files.o \
240                 src/misc/modules.o \
241                 src/misc/netutils.o \
242                 src/misc/playlist.o \
243                 src/misc/plugins.o
244
245
246 C_OBJ =         $(INTERFACE) \
247                 $(INPUT) \
248                 $(VIDEO_OUTPUT) \
249                 $(AUDIO_OUTPUT) \
250                 $(AC3_DECODER) \
251                 $(LPCM_DECODER) \
252                 $(AUDIO_DECODER) \
253                 $(SPU_DECODER) \
254                 $(GEN_DECODER) \
255                 $(VIDEO_PARSER) \
256                 $(VIDEO_DECODER) \
257                 $(MISC)
258
259
260 #
261 # CPP Objects
262
263 ifeq ($(SYS),beos)
264 CPP_OBJ =       src/misc/beos_specific.o
265 endif
266
267 #
268 # Assembler Objects
269
270 ifneq (,$(findstring 86,$(ARCH)))
271 ifneq (,$(findstring mmx,$(ARCH)))
272 ASM_OBJ =               
273 STD_PLUGIN_ASM =        
274 endif
275 endif
276
277 #
278 # Plugins
279 #
280 PLUGIN_BEOS =   plugins/beos/beos.o \
281                 plugins/beos/aout_beos.o \
282                 plugins/beos/intf_beos.o \
283                 plugins/beos/vout_beos.o
284
285 PLUGIN_DSP =    plugins/dsp/dsp.o \
286                 plugins/dsp/aout_dsp.o
287
288
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
293
294 PLUGIN_ESD =    plugins/esd/esd.o \
295                 plugins/esd/aout_esd.o
296
297 PLUGIN_FB =     plugins/fb/fb.o \
298                 plugins/fb/intf_fb.o \
299                 plugins/fb/vout_fb.o
300
301 PLUGIN_GGI =    plugins/ggi/ggi.o \
302                 plugins/ggi/intf_ggi.o \
303                 plugins/ggi/vout_ggi.o
304
305 PLUGIN_SDL =    plugins/sdl/sdl.o \
306                 plugins/sdl/intf_sdl.o \
307                 plugins/sdl/vout_sdl.o \
308                 plugins/sdl/aout_sdl.o 
309
310 PLUGIN_NULL =   plugins/null/null.o
311
312 PLUGIN_GLIDE =  plugins/glide/glide.o \
313                 plugins/glide/intf_glide.o \
314                 plugins/glide/vout_glide.o
315
316 PLUGIN_GNOME =  plugins/gnome/gnome.o \
317                 plugins/gnome/intf_gnome.o \
318                 plugins/gnome/intf_gnome_callbacks.o \
319                 plugins/gnome/intf_gnome_interface.o \
320                 plugins/gnome/intf_gnome_support.o \
321                 plugins/gnome/vout_gnome.o
322
323 PLUGIN_MGA =    plugins/mga/mga.o \
324                 plugins/mga/intf_mga.o \
325                 plugins/mga/vout_mga.o
326
327 PLUGIN_X11=     plugins/x11/x11.o \
328                 plugins/x11/intf_x11.o \
329                 plugins/x11/vout_x11.o
330
331 PLUGIN_YUV =    plugins/yuv/yuv.o \
332                 plugins/yuv/video_yuv.o \
333                 plugins/yuv/transforms_yuv.o
334
335 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
336                 plugins/yuv/video_yuvmmx.o \
337                 plugins/yuv/transforms_yuvmmx.o
338
339 PLUGIN_MOTION = plugins/motion/motion.o \
340                 plugins/motion/vdec_motion_common.o \
341                 plugins/motion/vdec_motion_inner.o
342
343 PLUGIN_MOTIONMMX =      plugins/motion/motionmmx.o \
344                         plugins/motion/vdec_motion_common.o \
345                         plugins/motion/vdec_motion_inner_mmx.o
346
347 PLUGIN_MOTIONMMXEXT =   plugins/motion/motionmmxext.o \
348                         plugins/motion/vdec_motion_common.o \
349                         plugins/motion/vdec_motion_inner_mmxext.o
350
351 PLUGIN_IDCT =   plugins/idct/idct.o \
352                 plugins/idct/idct_common.o
353
354 PLUGIN_IDCTCLASSIC =    plugins/idct/idctclassic.o \
355                         plugins/idct/idct_common.o
356
357 PLUGIN_IDCTMMX =        plugins/idct/idctmmx.o \
358                         plugins/idct/idct_common.o
359
360 PLUGIN_IDCTMMXEXT =     plugins/idct/idctmmxext.o \
361                         plugins/idct/idct_common.o
362
363 PLUGIN_ALSA =   plugins/alsa/alsa.o \
364                 plugins/alsa/aout_alsa.o
365
366 STD_PLUGIN_OBJ =$(PLUGIN_BEOS) \
367                 $(PLUGIN_DSP) \
368                 $(PLUGIN_DUMMY) \
369                 $(PLUGIN_ESD) \
370                 $(PLUGIN_FB) \
371                 $(PLUGIN_GGI) \
372                 $(PLUGIN_MGA) \
373                 $(PLUGIN_X11) \
374                 $(PLUGIN_YUV) \
375                 $(PLUGIN_YUVMMX) \
376                 $(PLUGIN_MOTION) \
377                 $(PLUGIN_MOTIONMMX) \
378                 $(PLUGIN_MOTIONMMXEXT) \
379                 $(PLUGIN_IDCT) \
380                 $(PLUGIN_IDCTCLASSIC) \
381                 $(PLUGIN_IDCTMMX) \
382                 $(PLUGIN_IDCTMMXEXT) \
383                 $(PLUGIN_SDL) \
384                 $(PLUGIN_ALSA) \
385                 $(PLUGIN_NULL)
386
387 # list duplicates
388 STD_PLUGIN_COMMON =     plugins/idct/idct_common.o \
389                         plugins/motion/vdec_motion_common.o
390
391 # filter out duplicates from the plugin object lists
392 STD_PLUGIN_OBJ :=       $(filter-out $(STD_PLUGIN_COMMON) $(STD_PLUGIN_ASM), \
393                                  $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
394
395 #
396 # Other lists of files
397 #
398 objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(STD_PLUGIN_ASM)
399 dependancies := $(objects:%.o=.dep/%.d)
400
401 # All symbols must be exported
402 export
403
404 ################################################################################
405 # Targets
406 ################################################################################
407
408 #
409 # Virtual targets
410 #
411 all: vlc @ALIASES@ plugins
412
413 clean:
414         rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
415         rm -f plugins/*/*.o src/*/*.o lib/*.so
416         rm -f vlc @ALIASES@
417
418 distclean: clean
419         rm -f src/*/*.o plugins/*/*.o **/*~ *.log
420         rm -f Makefile include/defs.h include/config.h
421         rm -f config.status config.cache config.log
422         rm -f gmon.out core build-stamp
423         rm -rf .dep
424
425 install:
426         mkdir -p $(prefix)/bin
427         $(INSTALL) vlc $(prefix)/bin
428 # ugly
429         for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
430         mkdir -p $(prefix)/lib/videolan/vlc
431         $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
432         mkdir -p $(prefix)/share/videolan
433         $(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
434         $(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
435
436 show:
437         @echo CC: $(CC)
438         @echo CFLAGS: $(CFLAGS)
439         @echo DCFLAGS: $(DCFLAGS)
440         @echo LCFLAGS: $(LCFLAGS)
441         @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
442
443 # ugliest of all, but I have no time to do it -- sam
444 snapshot:
445         rm -rf /tmp/${SNAPSHOTDIR}
446         mkdir /tmp/${SNAPSHOTDIR}
447         cp -a * /tmp/${SNAPSHOTDIR}
448                 (cd /tmp/${SNAPSHOTDIR} ; \
449                 make distclean ; \
450                 find . -type d -name CVS | xargs rm -rf ; \
451                 find . -type f -name '.*.swp' | xargs rm -f ; \
452                 find . -type f -name '.cvsignore' | xargs rm -f ; \
453                 cd .. ; \
454                 tar czvf ${SNAPSHOTDIR}.tar.gz ${SNAPSHOTDIR} ; \
455                 tar cIvf ${SNAPSHOTDIR}.tar.bz2 ${SNAPSHOTDIR} )
456         rm -rf /tmp/${SNAPSHOTDIR}
457         mv /tmp/${SNAPSHOTDIR}.tar.gz ..
458         mv /tmp/${SNAPSHOTDIR}.tar.bz2 ..
459         @echo "Sources are in ../${SNAPSHOTDIR}.tar.[gz,bz2]"
460
461 plugins: $(PLUGINS:%=lib/%.so)
462
463 FORCE:
464
465 #
466 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
467 # the namespace
468 #
469 gvlc fbvlc: vlc
470         rm -f $@ && ln -s vlc $@
471
472
473 #
474 # Generic rules (see below)
475 #
476 $(dependancies): %.d: FORCE
477         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
478
479 $(C_OBJ): %.o: Makefile.dep
480 $(C_OBJ): %.o: .dep/%.d
481 $(C_OBJ): %.o: %.c
482         $(CC) $(CFLAGS) -c -o $@ $<
483
484 $(CPP_OBJ): %.o: %.cpp
485         $(CC) $(CFLAGS) -c -o $@ $<
486
487 $(ASM_OBJ): %.o: Makefile.dep
488 $(ASM_OBJ): %.o: %.S
489         $(CC) $(CFLAGS) -c -o $@ $<
490
491 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
492 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
493 $(STD_PLUGIN_OBJ): %.o: %.c
494         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
495
496 $(STD_PLUGIN_ASM): %.o: Makefile.dep
497 $(STD_PLUGIN_ASM): %.o: %.S
498         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
499
500 $(PLUGIN_GNOME): %.o: Makefile.dep
501 $(PLUGIN_GNOME): %.o: %.c
502         $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
503
504 $(PLUGIN_GLIDE): %.o: Makefile.dep
505 $(PLUGIN_GLIDE): %.o: %.c
506         $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
507
508 #
509 # Main application target
510 #
511
512 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
513 ifeq ($(SYS),beos)
514         $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
515         rm -f ./plugins/_APP_
516         ln -s ../vlc ./plugins/_APP_
517 else
518         $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) 
519 endif
520
521 #
522 # Plugin targets
523 #
524
525 lib/beos.so: $(PLUGIN_BEOS)
526         $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
527
528 lib/esd.so: $(PLUGIN_ESD)
529 ifneq (,$(findstring bsd,$(SYS)))
530         $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
531 else
532         $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
533 endif
534
535 lib/dsp.so: $(PLUGIN_DSP)
536         $(CC) $(PCFLAGS) -shared -o $@ $^
537
538 lib/alsa.so: $(PLUGIN_ALSA)
539         $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
540
541 lib/fb.so: $(PLUGIN_FB)
542         $(CC) $(PCFLAGS) -shared -o $@ $^
543
544 lib/x11.so: $(PLUGIN_X11)
545         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
546
547 lib/mga.so: $(PLUGIN_MGA)
548         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
549
550 lib/gnome.so: $(PLUGIN_GNOME)
551         $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
552
553 lib/glide.so: $(PLUGIN_GLIDE)
554         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
555
556 lib/ggi.so: $(PLUGIN_GGI)
557         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
558
559 lib/sdl.so: $(PLUGIN_SDL)
560         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
561
562 ifeq ($(SYS),beos)
563 lib/null.so: $(PLUGIN_NULL)
564         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
565
566 lib/dummy.so: $(PLUGIN_DUMMY)
567         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
568
569 lib/yuv.so: $(PLUGIN_YUV)
570         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
571
572 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
573         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
574
575 lib/motion.so: $(PLUGIN_MOTION)
576         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
577
578 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
579         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
580
581 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
582         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
583
584 lib/idct.so: $(PLUGIN_IDCT)
585         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
586
587 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
588         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
589
590 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
591         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
592
593 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
594         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
595 else
596 lib/null.so: $(PLUGIN_NULL)
597         $(CC) $(PCFLAGS) -shared -o $@ $^
598
599 lib/dummy.so: $(PLUGIN_DUMMY)
600         $(CC) $(PCFLAGS) -shared -o $@ $^
601
602 lib/yuv.so: $(PLUGIN_YUV)
603         $(CC) $(PCFLAGS) -shared -o $@ $^
604
605 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
606         $(CC) $(PCFLAGS) -shared -o $@ $^
607
608 lib/motion.so: $(PLUGIN_MOTION)
609         $(CC) $(PCFLAGS) -shared -o $@ $^
610
611 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
612         $(CC) $(PCFLAGS) -shared -o $@ $^
613
614 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
615         $(CC) $(PCFLAGS) -shared -o $@ $^
616
617 lib/idct.so: $(PLUGIN_IDCT)
618         $(CC) $(PCFLAGS) -shared -o $@ $^
619
620 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
621         $(CC) $(PCFLAGS) -shared -o $@ $^
622
623 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
624         $(CC) $(PCFLAGS) -shared -o $@ $^
625
626 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
627         $(CC) $(PCFLAGS) -shared -o $@ $^
628 endif
629
630 ################################################################################
631 # Note on generic rules and dependancies
632 ################################################################################
633
634 # Note on dependancies: each .c file is associated with a .d file, which
635 # depends of it. The .o file associated with a .c file depends of the .d, of the
636 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
637 # directory.
638 # The dep directory should be ignored by CVS.
639
640 # Note on inclusions: depending of the target, the dependancies files must
641 # or must not be included. The problem is that if we ask make to include a file,
642 # and this file does not exist, it is made before it can be included. In a
643 # general way, a .d file should be included if and only if the corresponding .o
644 # needs to be re-made.
645
646 # Two makefiles are used: the main one (this one) has regular generic rules,
647 # except for .o files, for which it calls the object Makefile. Dependancies
648 # are not included in this file.
649 # The object Makefile known how to make a .o from a .c, and includes
650 # dependancies for the target, but only those required.