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