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