]> git.sesse.net Git - vlc/blob - Makefile.in
Beginning of Interface II
[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 STD_PLUGIN_ASM =        
273 endif
274 endif
275
276 #
277 # Plugins
278 #
279 PLUGIN_NULL =   plugins/null/null.o
280
281 PLUGIN_PS =     plugins/mpeg/ps.o \
282                 plugins/mpeg/input_ps.o
283
284 PLUGIN_TS =     plugins/mpeg/ts.o \
285                 plugins/mpeg/input_ts.o
286
287 PLUGIN_DVD =    plugins/dvd/dvd.o \
288                 plugins/dvd/input_dvd.o \
289                 plugins/dvd/dvd_ifo.o \
290                 plugins/dvd/dvd_css.o
291
292 PLUGIN_BEOS =   plugins/beos/beos.o \
293                 plugins/beos/aout_beos.o \
294                 plugins/beos/intf_beos.o \
295                 plugins/beos/vout_beos.o
296
297 PLUGIN_DSP =    plugins/dsp/dsp.o \
298                 plugins/dsp/aout_dsp.o
299
300 PLUGIN_DUMMY =  plugins/dummy/dummy.o \
301                 plugins/dummy/aout_dummy.o \
302                 plugins/dummy/intf_dummy.o \
303                 plugins/dummy/vout_dummy.o
304
305 PLUGIN_ESD =    plugins/esd/esd.o \
306                 plugins/esd/aout_esd.o
307
308 PLUGIN_FB =     plugins/fb/fb.o \
309                 plugins/fb/intf_fb.o \
310                 plugins/fb/vout_fb.o
311
312 PLUGIN_GGI =    plugins/ggi/ggi.o \
313                 plugins/ggi/intf_ggi.o \
314                 plugins/ggi/vout_ggi.o
315
316 PLUGIN_SDL =    plugins/sdl/sdl.o \
317                 plugins/sdl/vout_sdl.o \
318                 plugins/sdl/aout_sdl.o 
319
320 PLUGIN_GLIDE =  plugins/glide/glide.o \
321                 plugins/glide/intf_glide.o \
322                 plugins/glide/vout_glide.o
323
324 PLUGIN_GNOME =  plugins/gnome/gnome.o \
325                 plugins/gnome/intf_gnome.o \
326                 plugins/gnome/gnome_callbacks.o \
327                 plugins/gnome/gnome_interface.o \
328                 plugins/gnome/gnome_support.o
329
330 PLUGIN_MGA =    plugins/mga/mga.o \
331                 plugins/mga/intf_mga.o \
332                 plugins/mga/vout_mga.o
333
334 PLUGIN_X11=     plugins/x11/x11.o \
335                 plugins/x11/intf_x11.o \
336                 plugins/x11/vout_x11.o
337
338 PLUGIN_YUV =    plugins/yuv/yuv.o \
339                 plugins/yuv/video_yuv.o \
340                 plugins/yuv/transforms_yuv.o
341
342 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
343                 plugins/yuv/video_yuvmmx.o \
344                 plugins/yuv/transforms_yuvmmx.o
345
346 PLUGIN_MOTION = plugins/motion/motion.o \
347                 plugins/motion/vdec_motion_common.o \
348                 plugins/motion/vdec_motion_inner.o
349
350 PLUGIN_MOTIONMMX =      plugins/motion/motionmmx.o \
351                         plugins/motion/vdec_motion_common.o \
352                         plugins/motion/vdec_motion_inner_mmx.o
353
354 PLUGIN_MOTIONMMXEXT =   plugins/motion/motionmmxext.o \
355                         plugins/motion/vdec_motion_common.o \
356                         plugins/motion/vdec_motion_inner_mmxext.o
357
358 PLUGIN_IDCT =   plugins/idct/idct.o \
359                 plugins/idct/idct_common.o
360
361 PLUGIN_IDCTCLASSIC =    plugins/idct/idctclassic.o \
362                         plugins/idct/idct_common.o
363
364 PLUGIN_IDCTMMX =        plugins/idct/idctmmx.o \
365                         plugins/idct/idct_common.o
366
367 PLUGIN_IDCTMMXEXT =     plugins/idct/idctmmxext.o \
368                         plugins/idct/idct_common.o
369
370 PLUGIN_ALSA =   plugins/alsa/alsa.o \
371                 plugins/alsa/aout_alsa.o
372
373 STD_PLUGIN_OBJ =$(PLUGIN_BEOS) \
374                 $(PLUGIN_DSP) \
375                 $(PLUGIN_DUMMY) \
376                 $(PLUGIN_ESD) \
377                 $(PLUGIN_FB) \
378                 $(PLUGIN_GGI) \
379                 $(PLUGIN_MGA) \
380                 $(PLUGIN_X11) \
381                 $(PLUGIN_YUV) \
382                 $(PLUGIN_YUVMMX) \
383                 $(PLUGIN_MOTION) \
384                 $(PLUGIN_MOTIONMMX) \
385                 $(PLUGIN_MOTIONMMXEXT) \
386                 $(PLUGIN_IDCT) \
387                 $(PLUGIN_IDCTCLASSIC) \
388                 $(PLUGIN_IDCTMMX) \
389                 $(PLUGIN_IDCTMMXEXT) \
390                 $(PLUGIN_SDL) \
391                 $(PLUGIN_ALSA) \
392                 $(PLUGIN_NULL)
393
394 # list duplicates
395 STD_PLUGIN_COMMON =     plugins/idct/idct_common.o \
396                         plugins/motion/vdec_motion_common.o
397
398 # filter out duplicates from the plugin object lists
399 STD_PLUGIN_OBJ :=       $(filter-out $(STD_PLUGIN_COMMON) $(STD_PLUGIN_ASM), \
400                                  $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
401
402 #
403 # Other lists of files
404 #
405 objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(STD_PLUGIN_ASM)
406 dependancies := $(objects:%.o=.dep/%.d)
407
408 # All symbols must be exported
409 export
410
411 ################################################################################
412 # Targets
413 ################################################################################
414
415 #
416 # Virtual targets
417 #
418 all: vlc @ALIASES@ plugins
419
420 clean:
421         rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
422         rm -f plugins/*/*.o src/*/*.o lib/*.so
423         rm -f vlc @ALIASES@
424
425 distclean: clean
426         rm -f src/*/*.o plugins/*/*.o **/*~ *.log
427         rm -f Makefile include/defs.h include/config.h
428         rm -f config.status config.cache config.log
429         rm -f gmon.out core build-stamp
430         rm -rf .dep
431
432 install:
433         mkdir -p $(prefix)/bin
434         $(INSTALL) vlc $(prefix)/bin
435 # ugly
436         for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
437         mkdir -p $(prefix)/lib/videolan/vlc
438         $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
439         mkdir -p $(prefix)/share/videolan
440         $(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
441         $(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
442
443 show:
444         @echo CC: $(CC)
445         @echo CFLAGS: $(CFLAGS)
446         @echo DCFLAGS: $(DCFLAGS)
447         @echo LCFLAGS: $(LCFLAGS)
448         @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
449
450 # ugliest of all, but I have no time to do it -- sam
451 snapshot:
452         rm -rf /tmp/vlc-@VLC_VERSION@ /tmp/vlc-@VLC_VERSION@nocss
453         # copy archive in /tmp
454         find -type d | while read i ; \
455                 do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
456         done
457         find debian -mindepth 1 -maxdepth 1 -type d | grep -v CVS | \
458                 while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
459         # CVS entries
460         find . -type f | grep CVS | while read i ; \
461                 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
462         done
463         # .c .h .in .cpp
464         find include src plugins -type f -name '*.[chi]*' | while read i ; \
465                 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
466         done
467         # copy misc files
468         cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
469                 Makefile.in Makefile.dep configure configure.in install-sh \
470                 config.sub config.guess todo.pl \
471                         /tmp/vlc-@VLC_VERSION@/
472         for file in control vlc-gnome.menu vlc.copyright vlc.docs changelog \
473                 rules vlc.1 vlc.dirs vlc.menu ; do \
474                         cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
475         for file in default8x16.psf default8x9.psf gvlc.png vlc.png ; do \
476                 cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
477
478         # build css-enabled archives
479         (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
480                 bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
481                         > vlc-@VLC_VERSION@.tar.bz2 ; \
482                 gzip -f -9 vlc-@VLC_VERSION@.tar )
483         mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
484
485         # removing CSS stuff
486         find /tmp/vlc-@VLC_VERSION@ -type f -name '*css*' | xargs rm -f
487         for x in Makefile.in src/input/input_dvd.c src/input/input_dvd.h ; do \
488         rm -f /tmp/vlc-@VLC_VERSION@/$$x ; \
489         perl -ne 'if (/^#e(lse|ndif)/) { $$i=0; } \
490                         if (/^#if.*DVD/) { $$i=1; print "#if 0\n"; } \
491                         elsif (!$$i || /^#/) { print $$_; }' \
492                 < $$x | grep -vi css >| /tmp/vlc-@VLC_VERSION@/$$x ; \
493         done
494         rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
495         sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
496                 > /tmp/vlc-@VLC_VERSION@/debian/changelog
497
498         # build nocss archives
499         (cd /tmp ; mv vlc-@VLC_VERSION@ vlc-@VLC_VERSION@nocss ; \
500                 tar cf vlc-@VLC_VERSION@nocss.tar vlc-@VLC_VERSION@nocss ; \
501                 bzip2 -f -9 < vlc-@VLC_VERSION@nocss.tar \
502                         > vlc-@VLC_VERSION@nocss.tar.bz2 ; \
503                 gzip -f -9 vlc-@VLC_VERSION@nocss.tar )
504         mv /tmp/vlc-@VLC_VERSION@nocss.tar.gz \
505                 /tmp/vlc-@VLC_VERSION@nocss.tar.bz2 ..
506
507         # clean up
508         rm -rf /tmp/vlc-@VLC_VERSION@nocss
509
510 plugins: $(PLUGINS:%=lib/%.so)
511
512 FORCE:
513
514 #
515 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
516 # the namespace
517 #
518 gvlc fbvlc: vlc
519         rm -f $@ && ln -s vlc $@
520
521
522 #
523 # Generic rules (see below)
524 #
525 $(dependancies): %.d: FORCE
526         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
527
528 $(C_OBJ): %.o: Makefile.dep
529 $(C_OBJ): %.o: .dep/%.d
530 $(C_OBJ): %.o: %.c
531         $(CC) $(CFLAGS) -c -o $@ $<
532
533 $(CPP_OBJ): %.o: %.cpp
534         $(CC) $(CFLAGS) -c -o $@ $<
535
536 $(ASM_OBJ): %.o: Makefile.dep
537 $(ASM_OBJ): %.o: %.S
538         $(CC) $(CFLAGS) -c -o $@ $<
539
540 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
541 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
542 $(STD_PLUGIN_OBJ): %.o: %.c
543         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
544
545 $(STD_PLUGIN_ASM): %.o: Makefile.dep
546 $(STD_PLUGIN_ASM): %.o: %.S
547         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
548
549 $(PLUGIN_GNOME): %.o: Makefile.dep
550 $(PLUGIN_GNOME): %.o: %.c
551         $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
552
553 $(PLUGIN_GLIDE): %.o: Makefile.dep
554 $(PLUGIN_GLIDE): %.o: %.c
555         $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
556
557 #
558 # Main application target
559 #
560
561 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
562 ifeq ($(SYS),beos)
563         $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
564         rm -f ./plugins/_APP_
565         ln -s ../vlc ./plugins/_APP_
566 else
567         $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) 
568 endif
569
570 #
571 # Plugin targets
572 #
573
574 lib/beos.so: $(PLUGIN_BEOS)
575         $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
576
577 lib/esd.so: $(PLUGIN_ESD)
578 ifneq (,$(findstring bsd,$(SYS)))
579         $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
580 else
581         $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
582 endif
583
584 lib/dsp.so: $(PLUGIN_DSP)
585         $(CC) $(PCFLAGS) -shared -o $@ $^
586
587 lib/alsa.so: $(PLUGIN_ALSA)
588         $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
589
590 lib/fb.so: $(PLUGIN_FB)
591         $(CC) $(PCFLAGS) -shared -o $@ $^
592
593 lib/x11.so: $(PLUGIN_X11)
594         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
595
596 lib/mga.so: $(PLUGIN_MGA)
597         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
598
599 lib/gnome.so: $(PLUGIN_GNOME)
600         $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
601
602 lib/glide.so: $(PLUGIN_GLIDE)
603         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
604
605 lib/ggi.so: $(PLUGIN_GGI)
606         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
607
608 lib/sdl.so: $(PLUGIN_SDL)
609         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
610
611 ifeq ($(SYS),beos)
612 lib/null.so: $(PLUGIN_NULL)
613         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
614
615 lib/ps.so: $(PLUGIN_PS)
616         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
617
618 lib/ts.so: $(PLUGIN_TS)
619         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
620
621 lib/dvd.so: $(PLUGIN_DVD)
622         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
623
624 lib/dummy.so: $(PLUGIN_DUMMY)
625         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
626
627 lib/yuv.so: $(PLUGIN_YUV)
628         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
629
630 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
631         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
632
633 lib/motion.so: $(PLUGIN_MOTION)
634         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
635
636 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
637         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
638
639 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
640         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
641
642 lib/idct.so: $(PLUGIN_IDCT)
643         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
644
645 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
646         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
647
648 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
649         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
650
651 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
652         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
653 else
654 lib/null.so: $(PLUGIN_NULL)
655         $(CC) $(PCFLAGS) -shared -o $@ $^
656
657 lib/ps.so: $(PLUGIN_PS)
658         $(CC) $(PCFLAGS) -shared -o $@ $^
659
660 lib/ts.so: $(PLUGIN_TS)
661         $(CC) $(PCFLAGS) -shared -o $@ $^
662
663 lib/dvd.so: $(PLUGIN_DVD)
664         $(CC) $(PCFLAGS) -shared -o $@ $^
665
666 lib/dummy.so: $(PLUGIN_DUMMY)
667         $(CC) $(PCFLAGS) -shared -o $@ $^
668
669 lib/yuv.so: $(PLUGIN_YUV)
670         $(CC) $(PCFLAGS) -shared -o $@ $^
671
672 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
673         $(CC) $(PCFLAGS) -shared -o $@ $^
674
675 lib/motion.so: $(PLUGIN_MOTION)
676         $(CC) $(PCFLAGS) -shared -o $@ $^
677
678 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
679         $(CC) $(PCFLAGS) -shared -o $@ $^
680
681 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
682         $(CC) $(PCFLAGS) -shared -o $@ $^
683
684 lib/idct.so: $(PLUGIN_IDCT)
685         $(CC) $(PCFLAGS) -shared -o $@ $^
686
687 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
688         $(CC) $(PCFLAGS) -shared -o $@ $^
689
690 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
691         $(CC) $(PCFLAGS) -shared -o $@ $^
692
693 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
694         $(CC) $(PCFLAGS) -shared -o $@ $^
695 endif
696
697 ################################################################################
698 # Note on generic rules and dependancies
699 ################################################################################
700
701 # Note on dependancies: each .c file is associated with a .d file, which
702 # depends of it. The .o file associated with a .c file depends of the .d, of the
703 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
704 # directory.
705 # The dep directory should be ignored by CVS.
706
707 # Note on inclusions: depending of the target, the dependancies files must
708 # or must not be included. The problem is that if we ask make to include a file,
709 # and this file does not exist, it is made before it can be included. In a
710 # general way, a .d file should be included if and only if the corresponding .o
711 # needs to be re-made.
712
713 # Two makefiles are used: the main one (this one) has regular generic rules,
714 # except for .o files, for which it calls the object Makefile. Dependancies
715 # are not included in this file.
716 # The object Makefile known how to make a .o from a .c, and includes
717 # dependancies for the target, but only those required.