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