]> git.sesse.net Git - vlc/blob - Makefile.in
* Upgraded version number to 0.2.61. Release is today.
[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 (how lame...)
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 # 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
60 endif
61
62 ################################################################################
63 # Tuning and other variables - do not change anything except if you know
64 # exactly what you are doing
65 ################################################################################
66
67 #
68 # C headers directories
69 #
70 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
71
72 #
73 # Libraries
74 #
75 ifeq ($(SYS),gnu)
76 LIB += -lthreads -ldl
77 endif
78
79 ifneq (,$(findstring bsd,$(SYS)))
80 LIB += -pthread -lgnugetopt
81 LIB += -L/usr/local/lib
82 endif
83
84 ifneq (,$(findstring linux,$(SYS)))
85 LIB += -lpthread -ldl
86 endif
87
88 ifneq (,$(findstring solaris,$(SYS)))
89 LIB += -ldl -lsocket -lnsl -lpthread
90 endif
91
92 ifeq ($(SYS),beos)
93 LIB += -lbe -lroot -lgame
94 else
95 LIB += -lm
96 endif
97
98 #
99 # C compiler flags: mainstream compilation
100 #
101 CFLAGS += $(DEFINE) $(INCLUDE)
102 CFLAGS += -Wall -Winline
103 CFLAGS += -D_REENTRANT
104 CFLAGS += -D_GNU_SOURCE
105
106 # flags needed for clean beos compilation
107 ifeq ($(SYS),beos)
108 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
109 endif
110
111 # Optimizations : don't compile debug versions with them
112 ifeq ($(OPTIMS),1)
113 CFLAGS += -O3
114 CFLAGS += -ffast-math -funroll-loops
115 CFLAGS += -fomit-frame-pointer
116
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
122 else
123 CFLAGS += -march=pentium -mcpu=pentium
124 endif
125 endif
126
127 # Optimizations for PowerPC
128 ifneq (,$(findstring powerpc,$(ARCH)))
129 # 604e
130 CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
131 # G3
132 #CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
133 # G4
134 #CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
135 endif
136
137 # Optimizations for Sparc
138 ifneq (,$(findstring sparc,$(ARCH)))
139 CFLAGS += -mhard-float
140 endif
141
142 #end of optimisations
143 endif
144
145 # Optional MMX optimizations for x86
146 ifneq (,$(findstring mmx,$(ARCH)))
147 CFLAGS += -DHAVE_MMX
148 endif
149
150 #
151 # C compiler flags: plugin compilation
152 #
153 PCFLAGS += -fPIC
154
155 #
156 # C compiler flags: dependancies
157 #
158 DCFLAGS += $(INCLUDE)
159 DCFLAGS += -MM
160
161 #
162 # C compiler flags: linking
163 #
164 LCFLAGS += $(LIB)
165 LCFLAGS += -Wall
166 #LCFLAGS += -s
167
168 #
169 # Debugging and profiling support (unless optimisations are active)
170 #
171 ifneq ($(OPTIMS),1)
172 CFLAGS += -g
173 endif
174
175 #################################################################################
176 # Objects and files
177 #################################################################################
178
179 #
180 # C Objects
181
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
190
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 \
197                 src/input/input.o \
198                 src/input/mpeg_system.o
199
200 AUDIO_OUTPUT =  src/audio_output/audio_output.o
201
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
206
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
216
217 LPCM_DECODER =  src/lpcm_decoder/lpcm_decoder_thread.o \
218                 src/lpcm_decoder/lpcm_decoder.o
219
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
225
226 SPU_DECODER =   src/spu_decoder/spu_decoder.o
227
228 #GEN_DECODER =  src/generic_decoder/generic_decoder.o
229
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
235
236 VIDEO_DECODER = src/video_decoder/video_decoder.o
237
238 MISC =          src/misc/mtime.o \
239                 src/misc/tests.o \
240                 src/misc/rsc_files.o \
241                 src/misc/modules.o \
242                 src/misc/netutils.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 endif
273 endif
274
275 #
276 # Plugins
277 #
278 PLUGIN_ALSA =   plugins/alsa/alsa.o \
279                 plugins/alsa/aout_alsa.o
280
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
285
286 PLUGIN_DSP =    plugins/dsp/dsp.o \
287                 plugins/dsp/aout_dsp.o
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_DVD =    plugins/dvd/dvd.o \
295                 plugins/dvd/input_dvd.o \
296                 plugins/dvd/dvd_ifo.o \
297                 plugins/dvd/dvd_css.o
298
299 PLUGIN_ESD =    plugins/esd/esd.o \
300                 plugins/esd/aout_esd.o
301
302 PLUGIN_FB =     plugins/fb/fb.o \
303                 plugins/fb/intf_fb.o \
304                 plugins/fb/vout_fb.o
305
306 PLUGIN_GGI =    plugins/ggi/ggi.o \
307                 plugins/ggi/intf_ggi.o \
308                 plugins/ggi/vout_ggi.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/gnome_callbacks.o \
317                 plugins/gnome/gnome_interface.o \
318                 plugins/gnome/gnome_support.o
319
320 PLUGIN_IDCT =   plugins/idct/idct.o \
321                 plugins/idct/idct_common.o
322
323 PLUGIN_IDCTCLASSIC =    plugins/idct/idctclassic.o \
324                         plugins/idct/idct_common.o
325
326 PLUGIN_IDCTMMX =        plugins/idct/idctmmx.o \
327                         plugins/idct/idct_common.o
328
329 PLUGIN_IDCTMMXEXT =     plugins/idct/idctmmxext.o \
330                         plugins/idct/idct_common.o
331
332 PLUGIN_MGA =    plugins/mga/mga.o \
333                 plugins/mga/intf_mga.o \
334                 plugins/mga/vout_mga.o
335
336 PLUGIN_MOTION = plugins/motion/motion.o \
337                 plugins/motion/vdec_motion_common.o \
338                 plugins/motion/vdec_motion_inner.o
339
340 PLUGIN_MOTIONMMX =      plugins/motion/motionmmx.o \
341                         plugins/motion/vdec_motion_common.o \
342                         plugins/motion/vdec_motion_inner_mmx.o
343
344 PLUGIN_MOTIONMMXEXT =   plugins/motion/motionmmxext.o \
345                         plugins/motion/vdec_motion_common.o \
346                         plugins/motion/vdec_motion_inner_mmxext.o
347
348 PLUGIN_NCURSES =        plugins/text/ncurses.o \
349                         plugins/text/intf_ncurses.o
350
351 PLUGIN_NULL =   plugins/null/null.o
352
353 PLUGIN_PS =     plugins/mpeg/ps.o \
354                 plugins/mpeg/input_ps.o
355
356 PLUGIN_SDL =    plugins/sdl/sdl.o \
357                 plugins/sdl/vout_sdl.o \
358                 plugins/sdl/aout_sdl.o 
359
360 PLUGIN_TS =     plugins/mpeg/ts.o \
361                 plugins/mpeg/input_ts.o
362
363 PLUGIN_X11=     plugins/x11/x11.o \
364                 plugins/x11/vout_x11.o
365
366 PLUGIN_YUV =    plugins/yuv/yuv.o \
367                 plugins/yuv/video_yuv.o \
368                 plugins/yuv/transforms_yuv.o
369
370 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
371                 plugins/yuv/video_yuvmmx.o \
372                 plugins/yuv/transforms_yuvmmx.o
373
374 STD_PLUGIN_OBJ = \
375                 $(PLUGIN_ALSA) \
376                 $(PLUGIN_BEOS) \
377                 $(PLUGIN_DSP) \
378                 $(PLUGIN_DUMMY) \
379                 $(PLUGIN_DVD) \
380                 $(PLUGIN_ESD) \
381                 $(PLUGIN_FB) \
382                 $(PLUGIN_GGI) \
383                 $(PLUGIN_IDCT) \
384                 $(PLUGIN_IDCTCLASSIC) \
385                 $(PLUGIN_IDCTMMX) \
386                 $(PLUGIN_IDCTMMXEXT) \
387                 $(PLUGIN_MGA) \
388                 $(PLUGIN_MOTION) \
389                 $(PLUGIN_MOTIONMMX) \
390                 $(PLUGIN_MOTIONMMXEXT) \
391                 $(PLUGIN_NCURSES) \
392                 $(PLUGIN_NULL) \
393                 $(PLUGIN_PS) \
394                 $(PLUGIN_SDL) \
395                 $(PLUGIN_TS) \
396                 $(PLUGIN_X11) \
397                 $(PLUGIN_YUV) \
398                 $(PLUGIN_YUVMMX)
399
400 NONSTD_PLUGIN_OBJ = \
401                 $(PLUGIN_GLIDE) \
402                 $(PLUGIN_GNOME)
403
404 # list duplicates
405 STD_PLUGIN_COMMON =     plugins/idct/idct_common.o \
406                         plugins/motion/vdec_motion_common.o
407
408 # filter out duplicates from the plugin object lists
409 STD_PLUGIN_OBJ :=       $(filter-out $(STD_PLUGIN_COMMON), \
410                                  $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
411
412 #
413 # Other lists of files
414 #
415 objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
416 dependancies := $(objects:%.o=.dep/%.d)
417
418 # All symbols must be exported
419 export
420
421 ################################################################################
422 # Targets
423 ################################################################################
424
425 #
426 # Virtual targets
427 #
428 all: vlc @ALIASES@ plugins
429
430 clean:
431         rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
432         rm -f plugins/*/*.o src/*/*.o lib/*.so
433         rm -f vlc @ALIASES@
434
435 distclean: clean
436         rm -f src/*/*.o plugins/*/*.o **/*~ *.log
437         rm -f Makefile include/defs.h include/config.h
438         rm -f config.status config.cache config.log
439         rm -f gmon.out core build-stamp
440         rm -rf .dep
441
442 install:
443         mkdir -p $(prefix)/bin
444         $(INSTALL) vlc $(prefix)/bin
445 # ugly
446         for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
447         mkdir -p $(prefix)/lib/videolan/vlc
448         $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
449         mkdir -p $(prefix)/share/videolan
450         $(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
451         $(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
452
453 show:
454         @echo CC: $(CC)
455         @echo CFLAGS: $(CFLAGS)
456         @echo DCFLAGS: $(DCFLAGS)
457         @echo LCFLAGS: $(LCFLAGS)
458         @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
459
460 # ugliest of all, but I have no time to do it -- sam
461 snapshot:
462         rm -rf /tmp/vlc-@VLC_VERSION@ /tmp/vlc-@VLC_VERSION@nocss
463         # copy archive in /tmp
464         find -type d | while read i ; \
465                 do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
466         done
467         find debian -mindepth 1 -maxdepth 1 -type d | grep -v CVS | \
468                 while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
469         # CVS entries
470         find . -type f | grep CVS | while read i ; \
471                 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
472         done
473         # .c .h .in .cpp
474         find include src plugins -type f -name '*.[chi]*' | while read i ; \
475                 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
476         done
477         # copy misc files
478         cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
479                 Makefile.in Makefile.dep configure configure.in install-sh \
480                 config.sub config.guess todo.pl \
481                         /tmp/vlc-@VLC_VERSION@/
482         for file in control vlc-gnome.menu vlc.copyright vlc.docs changelog \
483                 rules vlc.1 vlc.dirs vlc.menu ; do \
484                         cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
485         for file in default8x16.psf default8x9.psf gvlc.png vlc.png ; do \
486                 cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
487
488         # build css-enabled archives
489         (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
490                 bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
491                         > vlc-@VLC_VERSION@.tar.bz2 ; \
492                 gzip -f -9 vlc-@VLC_VERSION@.tar )
493         mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
494
495         # removing CSS stuff
496 #       find /tmp/vlc-@VLC_VERSION@ -type f -name '*css*' | xargs rm -f
497 #       for x in Makefile.in src/input/input_dvd.c src/input/input_dvd.h ; do \
498 #       rm -f /tmp/vlc-@VLC_VERSION@/$$x ; \
499 #       perl -ne 'if (/^#e(lse|ndif)/) { $$i=0; } \
500 #                       if (/^#if.*DVD/) { $$i=1; print "#if 0\n"; } \
501 #                       elsif (!$$i || /^#/) { print $$_; }' \
502 #               < $$x | grep -vi css >| /tmp/vlc-@VLC_VERSION@/$$x ; \
503 #       done
504 #       rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
505 #       sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
506 #               > /tmp/vlc-@VLC_VERSION@/debian/changelog
507 #
508 #       # build nocss archives
509 #       (cd /tmp ; mv vlc-@VLC_VERSION@ vlc-@VLC_VERSION@nocss ; \
510 #               tar cf vlc-@VLC_VERSION@nocss.tar vlc-@VLC_VERSION@nocss ; \
511 #               bzip2 -f -9 < vlc-@VLC_VERSION@nocss.tar \
512 #                       > vlc-@VLC_VERSION@nocss.tar.bz2 ; \
513 #               gzip -f -9 vlc-@VLC_VERSION@nocss.tar )
514 #       mv /tmp/vlc-@VLC_VERSION@nocss.tar.gz \
515 #               /tmp/vlc-@VLC_VERSION@nocss.tar.bz2 ..
516 #
517 #       # clean up
518         rm -rf /tmp/vlc-@VLC_VERSION@*
519
520 plugins: $(PLUGINS:%=lib/%.so)
521
522 FORCE:
523
524 #
525 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
526 # the namespace
527 #
528 gvlc fbvlc: vlc
529         rm -f $@ && ln -s vlc $@
530
531
532 #
533 # Generic rules (see below)
534 #
535 $(dependancies): %.d: FORCE
536         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
537
538 $(C_OBJ): %.o: Makefile.dep
539 $(C_OBJ): %.o: .dep/%.d
540 $(C_OBJ): %.o: %.c
541         $(CC) $(CFLAGS) -c -o $@ $<
542
543 $(CPP_OBJ): %.o: %.cpp
544         $(CC) $(CFLAGS) -c -o $@ $<
545
546 $(ASM_OBJ): %.o: Makefile.dep
547 $(ASM_OBJ): %.o: %.S
548         $(CC) $(CFLAGS) -c -o $@ $<
549
550 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
551 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
552 $(STD_PLUGIN_OBJ): %.o: %.c
553         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
554
555 $(PLUGIN_GNOME): %.o: Makefile.dep
556 $(PLUGIN_GNOME): %.o: .dep/%.d
557 $(PLUGIN_GNOME): %.o: %.c
558         $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
559
560 $(PLUGIN_GLIDE): %.o: Makefile.dep
561 $(PLUGIN_GLIDE): %.o: .dep/%.d
562 $(PLUGIN_GLIDE): %.o: %.c
563         $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
564
565 #
566 # Main application target
567 #
568
569 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
570 ifeq ($(SYS),beos)
571         $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
572         rm -f ./plugins/_APP_
573         ln -s ../vlc ./plugins/_APP_
574 else
575         $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) 
576 endif
577
578 #
579 # Plugin targets
580 #
581
582 lib/beos.so: $(PLUGIN_BEOS)
583         $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
584
585 lib/esd.so: $(PLUGIN_ESD)
586 ifneq (,$(findstring bsd,$(SYS)))
587         $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
588 else
589         $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
590 endif
591
592 lib/dsp.so: $(PLUGIN_DSP)
593         $(CC) $(PCFLAGS) -shared -o $@ $^
594
595 lib/alsa.so: $(PLUGIN_ALSA)
596         $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
597
598 lib/fb.so: $(PLUGIN_FB)
599         $(CC) $(PCFLAGS) -shared -o $@ $^
600
601 lib/x11.so: $(PLUGIN_X11)
602         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
603
604 lib/mga.so: $(PLUGIN_MGA)
605         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
606
607 lib/gnome.so: $(PLUGIN_GNOME)
608         $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
609
610 lib/glide.so: $(PLUGIN_GLIDE)
611         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
612
613 lib/ggi.so: $(PLUGIN_GGI)
614         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
615
616 lib/sdl.so: $(PLUGIN_SDL)
617         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
618
619 lib/ncurses.so: $(PLUGIN_NCURSES)
620         $(CC) $(PCFLAGS) -shared -o $@ $^ -lcurses
621
622 ifeq ($(SYS),beos)
623 lib/null.so: $(PLUGIN_NULL)
624         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
625
626 lib/ps.so: $(PLUGIN_PS)
627         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
628
629 lib/ts.so: $(PLUGIN_TS)
630         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
631
632 lib/dvd.so: $(PLUGIN_DVD)
633         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
634
635 lib/dummy.so: $(PLUGIN_DUMMY)
636         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
637
638 lib/yuv.so: $(PLUGIN_YUV)
639         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
640
641 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
642         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
643
644 lib/motion.so: $(PLUGIN_MOTION)
645         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
646
647 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
648         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
649
650 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
651         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
652
653 lib/idct.so: $(PLUGIN_IDCT)
654         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
655
656 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
657         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
658
659 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
660         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
661
662 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
663         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
664 else
665 lib/null.so: $(PLUGIN_NULL)
666         $(CC) $(PCFLAGS) -shared -o $@ $^
667
668 lib/ps.so: $(PLUGIN_PS)
669         $(CC) $(PCFLAGS) -shared -o $@ $^
670
671 lib/ts.so: $(PLUGIN_TS)
672         $(CC) $(PCFLAGS) -shared -o $@ $^
673
674 lib/dvd.so: $(PLUGIN_DVD)
675         $(CC) $(PCFLAGS) -shared -o $@ $^
676
677 lib/dummy.so: $(PLUGIN_DUMMY)
678         $(CC) $(PCFLAGS) -shared -o $@ $^
679
680 lib/yuv.so: $(PLUGIN_YUV)
681         $(CC) $(PCFLAGS) -shared -o $@ $^
682
683 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
684         $(CC) $(PCFLAGS) -shared -o $@ $^
685
686 lib/motion.so: $(PLUGIN_MOTION)
687         $(CC) $(PCFLAGS) -shared -o $@ $^
688
689 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
690         $(CC) $(PCFLAGS) -shared -o $@ $^
691
692 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
693         $(CC) $(PCFLAGS) -shared -o $@ $^
694
695 lib/idct.so: $(PLUGIN_IDCT)
696         $(CC) $(PCFLAGS) -shared -o $@ $^
697
698 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
699         $(CC) $(PCFLAGS) -shared -o $@ $^
700
701 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
702         $(CC) $(PCFLAGS) -shared -o $@ $^
703
704 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
705         $(CC) $(PCFLAGS) -shared -o $@ $^
706 endif
707
708 ################################################################################
709 # Note on generic rules and dependancies
710 ################################################################################
711
712 # Note on dependancies: each .c file is associated with a .d file, which
713 # depends of it. The .o file associated with a .c file depends of the .d, of the
714 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
715 # directory.
716 # The dep directory should be ignored by CVS.
717
718 # Note on inclusions: depending of the target, the dependancies files must
719 # or must not be included. The problem is that if we ask make to include a file,
720 # and this file does not exist, it is made before it can be included. In a
721 # general way, a .d file should be included if and only if the corresponding .o
722 # needs to be re-made.
723
724 # Two makefiles are used: the main one (this one) has regular generic rules,
725 # except for .o files, for which it calls the object Makefile. Dependancies
726 # are not included in this file.
727 # The object Makefile known how to make a .o from a .c, and includes
728 # dependancies for the target, but only those required.