]> git.sesse.net Git - vlc/blob - Makefile.in
. added files for the SSE (MMX on steroids) IDCT. Meuuh, you should just
[vlc] / Makefile.in
1 ################################################################################
2 # vlc (VideoLAN Client) main makefile
3 # (c)1998 VideoLAN
4 ################################################################################
5 # This makefile is the main makefile for the VideoLAN client.
6 ################################################################################
7
8 ################################################################################
9 # Configuration
10 ################################################################################
11
12 # Debugging mode on or off (set to 1 to activate)
13 DEBUG=@DEBUG@
14 STATS=@STATS@
15 OPTIMS=@OPTIMS@
16
17 SYS=@SYS@
18 PLUGINS=@PLUGINS@
19 SNAPSHOTDIR=vlc-@VLC_VERSION@
20 INSTALL=@INSTALL@
21 ARCH=@ARCH@
22 prefix=@prefix@
23 CC=@CC@
24 SHELL=@SHELL@
25
26 LIB_SDL=@LIB_SDL@
27 LIB_GLIDE=@LIB_GLIDE@
28 LIB_GGI=@LIB_GGI@
29
30 #----------------- do not change anything below this line ----------------------
31
32 ################################################################################
33 # Configuration pre-processing
34 ################################################################################
35
36 # PROGRAM_OPTIONS is an identification string of the compilation options
37 PROGRAM_OPTIONS = $(SYS) $(ARCH)
38 ifeq ($(DEBUG),1)
39 PROGRAM_OPTIONS += DEBUG
40 DEFINE += -DDEBUG
41 endif
42 ifeq ($(STATS),1)
43 PROGRAM_OPTIONS += DEBUG
44 DEFINE += -DSTATS
45 endif
46
47 # PROGRAM_BUILD is a complete identification of the build
48 # ( we can't use fancy options with date since OSes like Solaris
49 # or FreeBSD have strange date implementations )
50 PROGRAM_BUILD = `date` $(USER)
51 # XXX: beos does not support hostname
52 #PROGRAM_BUILD = `date` $(USER)@`hostname`
53
54 # DEFINE will contain some of the constants definitions decided in Makefile, 
55 # including SYS_xx. It will be passed to C compiler.
56 DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_)
57
58 ################################################################################
59 # Tuning and other variables - do not change anything except if you know
60 # exactly what you are doing
61 ################################################################################
62
63 #
64 # C headers directories
65 #
66 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
67
68 #
69 # Libraries
70 #
71 ifeq ($(SYS),gnu)
72 LIB += -lthreads -ldl
73 endif
74
75 ifneq (,$(findstring bsd,$(SYS)))
76 LIB += -pthread -lgnugetopt
77 LIB += -L/usr/local/lib
78 endif
79
80 ifneq (,$(findstring linux,$(SYS)))
81 LIB += -lpthread -ldl
82 endif
83
84 ifneq (,$(findstring solaris,$(SYS)))
85 LIB += -ldl -lsocket -lnsl -lpthread
86 endif
87
88 ifeq ($(SYS),beos)
89 LIB += -lbe -lroot -lgame
90 else
91 LIB += -lm
92 endif
93
94 #
95 # C compiler flags: mainstream compilation
96 #
97 CFLAGS += $(DEFINE) $(INCLUDE)
98 CFLAGS += -Wall -Winline
99 CFLAGS += -D_REENTRANT
100 CFLAGS += -D_GNU_SOURCE
101
102 # flags needed for clean beos compilation
103 ifeq ($(SYS),beos)
104 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
105 endif
106
107 # Optimizations : don't compile debug versions with them
108 ifeq ($(OPTIMS),1)
109 CFLAGS += -O6
110 CFLAGS += -ffast-math -funroll-loops -funroll-all-loops
111 CFLAGS += -fomit-frame-pointer
112 CFLAGS += @BIZARRE_OPTIMS@
113
114 # Optimizations for x86 familiy
115 ifneq (,$(findstring 86,$(ARCH)))
116 CFLAGS += -malign-double
117 # Optional Pentium Pro optimizations
118 ifneq (,$(findstring ppro,$(ARCH)))
119 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
120 else
121 CFLAGS += -march=pentium -mcpu=pentium
122 endif
123 endif
124
125 # Optimizations for PowerPC
126 ifneq (,$(findstring powerpc,$(ARCH)))
127 # 604e
128 CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
129 # G3
130 #CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
131 # G4
132 #CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
133 endif
134
135 # Optimizations for Sparc
136 ifneq (,$(findstring sparc,$(ARCH)))
137 CFLAGS += -mhard-float
138 endif
139
140 #end of optimisations
141 endif
142
143 # Optional MMX optimizations for x86
144 ifneq (,$(findstring mmx,$(ARCH)))
145 CFLAGS += -DHAVE_MMX
146 endif
147
148 #
149 # C compiler flags: plugin compilation
150 #
151 PCFLAGS += -fPIC
152
153 #
154 # C compiler flags: dependancies
155 #
156 DCFLAGS += $(INCLUDE)
157 DCFLAGS += -MM
158
159 #
160 # C compiler flags: linking
161 #
162 LCFLAGS += $(LIB)
163 LCFLAGS += -Wall
164 #LCFLAGS += -s
165
166 #
167 # Debugging and profiling support (unless optimisations are active)
168 #
169 ifneq ($(OPTIMS),1)
170 CFLAGS += -g
171 endif
172
173 #################################################################################
174 # Objects and files
175 #################################################################################
176
177 #
178 # C Objects
179
180 INTERFACE =     src/interface/main.o \
181                 src/interface/interface.o \
182                 src/interface/intf_msg.o \
183                 src/interface/intf_cmd.o \
184                 src/interface/intf_ctrl.o \
185                 src/interface/intf_console.o
186
187 INPUT =         src/input/input_ps.o \
188                 src/input/input_ts.o \
189                 src/input/dvd_ifo.o \
190                 src/input/input_dvd.o \
191                 src/input/mpeg_system.o \
192                 src/input/input_ext-dec.o \
193                 src/input/input_dec.o \
194                 src/input/input_programs.o \
195                 src/input/input_netlist.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
229 VIDEO_PARSER =  src/video_parser/video_parser.o \
230                 src/video_parser/vpar_headers.o \
231                 src/video_parser/vpar_blocks.o \
232                 src/video_parser/vpar_synchro.o \
233                 src/video_parser/video_fifo.o
234
235 ifneq (,$(findstring mmx,$(ARCH)))
236         vdec_motion_inner = src/video_decoder/vdec_motion_inner_mmx.o
237 else
238         vdec_motion_inner = src/video_decoder/vdec_motion_inner.o
239 endif
240
241 VIDEO_DECODER = src/video_decoder/video_decoder.o \
242                 src/video_decoder/vdec_motion.o \
243                 $(vdec_motion_inner)
244
245 MISC =          src/misc/mtime.o \
246                 src/misc/tests.o \
247                 src/misc/rsc_files.o \
248                 src/misc/modules.o \
249                 src/misc/netutils.o \
250                 src/misc/playlist.o \
251                 src/misc/plugins.o
252
253
254 C_OBJ =         $(INTERFACE) \
255                 $(INPUT) \
256                 $(VIDEO_OUTPUT) \
257                 $(AUDIO_OUTPUT) \
258                 $(AC3_DECODER) \
259                 $(LPCM_DECODER) \
260                 $(AUDIO_DECODER) \
261                 $(SPU_DECODER) \
262                 $(GEN_DECODER) \
263                 $(VIDEO_PARSER) \
264                 $(VIDEO_DECODER) \
265                 $(MISC)
266
267
268 #
269 # CPP Objects
270
271 ifeq ($(SYS),beos)
272 CPP_OBJ =       src/misc/beos_specific.o
273 endif
274
275 #
276 # Assembler Objects
277
278 ifneq (,$(findstring 86,$(ARCH)))
279 ifneq (,$(findstring mmx,$(ARCH)))
280 ASM_OBJ =               
281 STD_PLUGIN_ASM =        plugins/idct/idctmmx_asm.o
282 endif
283 endif
284
285 #
286 # Plugins
287 #
288 PLUGIN_BEOS =   plugins/beos/beos.o \
289                 plugins/beos/aout_beos.o \
290                 plugins/beos/intf_beos.o \
291                 plugins/beos/vout_beos.o
292
293 PLUGIN_DSP =    plugins/dsp/dsp.o \
294                 plugins/dsp/aout_dsp.o \
295
296 PLUGIN_DUMMY =  plugins/dummy/dummy.o \
297                 plugins/dummy/aout_dummy.o \
298                 plugins/dummy/intf_dummy.o \
299                 plugins/dummy/vout_dummy.o
300
301 PLUGIN_ESD =    plugins/esd/esd.o \
302                 plugins/esd/aout_esd.o
303
304 PLUGIN_FB =     plugins/fb/fb.o \
305                 plugins/fb/intf_fb.o \
306                 plugins/fb/vout_fb.o
307
308 PLUGIN_GGI =    plugins/ggi/ggi.o \
309                 plugins/ggi/intf_ggi.o \
310                 plugins/ggi/vout_ggi.o
311
312 PLUGIN_SDL =    plugins/sdl/sdl.o \
313                 plugins/sdl/intf_sdl.o \
314                 plugins/sdl/vout_sdl.o 
315 #               plugins/sdl/video_yuv.o \
316 #               plugins/sdl/video_yuvall.o
317
318 PLUGIN_NULL =   plugins/null/null.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/intf_gnome_callbacks.o \
327                 plugins/gnome/intf_gnome_interface.o \
328                 plugins/gnome/intf_gnome_support.o \
329                 plugins/gnome/vout_gnome.o
330
331 PLUGIN_MGA =    plugins/mga/mga.o \
332                 plugins/mga/intf_mga.o \
333                 plugins/mga/vout_mga.o
334
335 PLUGIN_X11=     plugins/x11/x11.o \
336                 plugins/x11/intf_x11.o \
337                 plugins/x11/vout_x11.o
338
339 PLUGIN_YUV =    plugins/yuv/yuv.o \
340                 plugins/yuv/video_yuv.o \
341                 plugins/yuv/transforms_yuv.o
342
343 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
344                 plugins/yuv/video_yuvmmx.o \
345                 plugins/yuv/transforms_yuvmmx.o
346
347 PLUGIN_IDCT =   plugins/idct/idct.o \
348                 plugins/idct/idct_common.o
349
350 PLUGIN_IDCTCLASSIC =    plugins/idct/idctclassic.o \
351                         plugins/idct/idct_common.o
352
353 PLUGIN_IDCTMMX =        plugins/idct/idctmmx.o \
354                         plugins/idct/idct_common.o \
355                         plugins/idct/idctmmx_asm.o
356
357 PLUGIN_IDCTMMXEXT =     plugins/idct/idctmmxext.o \
358                         plugins/idct/idct_mmxext.o
359
360 PLUGIN_ALSA =   plugins/alsa/alsa.o \
361                 plugins/alsa/aout_alsa.o
362
363 STD_PLUGIN_OBJ =$(PLUGIN_BEOS) \
364                 $(PLUGIN_DSP) \
365                 $(PLUGIN_DUMMY) \
366                 $(PLUGIN_ESD) \
367                 $(PLUGIN_FB) \
368                 $(PLUGIN_GGI) \
369                 $(PLUGIN_MGA) \
370                 $(PLUGIN_X11) \
371                 $(PLUGIN_YUV) \
372                 $(PLUGIN_YUVMMX) \
373                 $(PLUGIN_IDCT) \
374                 $(PLUGIN_IDCTCLASSIC) \
375                 $(PLUGIN_IDCTMMX) \
376                 $(PLUGIN_IDCTMMXEXT) \
377                 $(PLUGIN_SDL) \
378                 $(PLUGIN_ALSA) \
379                 $(PLUGIN_NULL)
380
381 # list duplicates
382 STD_PLUGIN_COMMON =     plugins/idct/idct_common.o
383
384 # filter out duplicates from the plugin object lists
385 STD_PLUGIN_OBJ :=       $(filter-out $(STD_PLUGIN_COMMON) $(STD_PLUGIN_ASM), \
386                                  $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
387
388 #
389 # Other lists of files
390 #
391 objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(STD_PLUGIN_ASM)
392 dependancies := $(objects:%.o=.dep/%.d)
393
394 # All symbols must be exported
395 export
396
397 ################################################################################
398 # Targets
399 ################################################################################
400
401 #
402 # Virtual targets
403 #
404 all: vlc @ALIASES@ plugins
405
406 clean:
407         rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
408         rm -f plugins/*/*.o src/*/*.o
409         rm -f vlc @ALIASES@ lib/*.so
410
411 distclean: clean
412         rm -f src/*/*.o plugins/*/*.o **/*~ *.log
413         rm -f Makefile include/defs.h include/config.h
414         rm -f config.status config.cache config.log
415         rm -f gmon.out core build-stamp
416         rm -rf .dep
417
418 install:
419         mkdir -p $(prefix)/bin
420         $(INSTALL) vlc $(prefix)/bin
421 # ugly
422         for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
423         mkdir -p $(prefix)/lib/videolan/vlc
424         $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
425         mkdir -p $(prefix)/share/videolan
426         $(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
427         $(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
428
429 show:
430         @echo CC: $(CC)
431         @echo CFLAGS: $(CFLAGS)
432         @echo DCFLAGS: $(DCFLAGS)
433         @echo LCFLAGS: $(LCFLAGS)
434         @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
435
436 # ugliest of all, but I have no time to do it -- sam
437 snapshot:
438         rm -rf /tmp/${SNAPSHOTDIR}
439         mkdir /tmp/${SNAPSHOTDIR}
440         cp -a * /tmp/${SNAPSHOTDIR}
441                 (cd /tmp/${SNAPSHOTDIR} ; \
442                 make distclean ; \
443                 find . -type d -name CVS | xargs rm -rf ; \
444                 find . -type f -name '.*.swp' | xargs rm -f ; \
445                 find . -type f -name '.cvsignore' | xargs rm -f ; \
446                 cd .. ; \
447                 tar czvf ${SNAPSHOTDIR}.tar.gz ${SNAPSHOTDIR} ; \
448                 tar cIvf ${SNAPSHOTDIR}.tar.bz2 ${SNAPSHOTDIR} )
449         rm -rf /tmp/${SNAPSHOTDIR}
450         mv /tmp/${SNAPSHOTDIR}.tar.gz ..
451         mv /tmp/${SNAPSHOTDIR}.tar.bz2 ..
452         @echo "Sources are in ../${SNAPSHOTDIR}.tar.[gz,bz2]"
453
454 plugins: $(PLUGINS:%=lib/%.so)
455
456 FORCE:
457
458 #
459 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
460 # the namespace
461 #
462 gvlc fbvlc: vlc
463         rm -f $@ && ln -s vlc $@
464
465
466 #
467 # Generic rules (see below)
468 #
469 $(dependancies): %.d: FORCE
470         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
471
472 $(C_OBJ): %.o: Makefile.dep
473 $(C_OBJ): %.o: .dep/%.d
474 $(C_OBJ): %.o: %.c
475         $(CC) $(CFLAGS) -c -o $@ $<
476
477 $(CPP_OBJ): %.o: %.cpp
478         $(CC) $(CFLAGS) -c -o $@ $<
479
480 $(ASM_OBJ): %.o: Makefile.dep
481 $(ASM_OBJ): %.o: %.S
482         $(CC) $(CFLAGS) -c -o $@ $<
483
484 $(STD_PLUGIN_OBJ): %.o: Makefile.dep
485 $(STD_PLUGIN_OBJ): %.o: .dep/%.d
486 $(STD_PLUGIN_OBJ): %.o: %.c
487         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
488
489 $(STD_PLUGIN_ASM): %.o: Makefile.dep
490 $(STD_PLUGIN_ASM): %.o: %.S
491         $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
492
493 $(PLUGIN_GNOME): %.o: Makefile.dep
494 $(PLUGIN_GNOME): %.o: %.c
495         $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
496
497 $(PLUGIN_GLIDE): %.o: Makefile.dep
498 $(PLUGIN_GLIDE): %.o: %.c
499         $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
500
501 #
502 # Main application target
503 #
504
505 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
506 ifeq ($(SYS),beos)
507         $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
508         rm -f ./plugins/_APP_
509         ln -s ../vlc ./plugins/_APP_
510 else
511         $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) 
512 endif
513
514 #
515 # Plugin targets
516 #
517
518 lib/beos.so: $(PLUGIN_BEOS)
519         $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
520
521 lib/esd.so: $(PLUGIN_ESD)
522 ifneq (,$(findstring bsd,$(SYS)))
523         $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
524 else
525         $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
526 endif
527
528 lib/dsp.so: $(PLUGIN_DSP)
529         $(CC) $(PCFLAGS) -shared -o $@ $^
530
531 lib/alsa.so: $(PLUGIN_ALSA)
532         $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
533
534 lib/fb.so: $(PLUGIN_FB)
535         $(CC) $(PCFLAGS) -shared -o $@ $^
536
537 lib/x11.so: $(PLUGIN_X11)
538         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
539
540 lib/mga.so: $(PLUGIN_MGA)
541         $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
542
543 lib/gnome.so: $(PLUGIN_GNOME)
544         $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
545
546 lib/glide.so: $(PLUGIN_GLIDE)
547         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
548
549 lib/ggi.so: $(PLUGIN_GGI)
550         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
551
552 lib/sdl.so: $(PLUGIN_SDL)
553         $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
554
555 ifeq ($(SYS),beos)
556 lib/null.so: $(PLUGIN_NULL)
557         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
558
559 lib/dummy.so: $(PLUGIN_DUMMY)
560         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
561
562 lib/idct.so: $(PLUGIN_IDCT)
563         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
564
565 lib/yuv.so: $(PLUGIN_YUV)
566         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
567
568 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
569         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
570
571 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
572         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
573
574 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
575         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
576
577 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
578         $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
579 else
580 lib/null.so: $(PLUGIN_NULL)
581         $(CC) $(PCFLAGS) -shared -o $@ $^
582
583 lib/dummy.so: $(PLUGIN_DUMMY)
584         $(CC) $(PCFLAGS) -shared -o $@ $^
585
586 lib/yuv.so: $(PLUGIN_YUV)
587         $(CC) $(PCFLAGS) -shared -o $@ $^
588
589 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
590         $(CC) $(PCFLAGS) -shared -o $@ $^
591
592 lib/idct.so: $(PLUGIN_IDCT)
593         $(CC) $(PCFLAGS) -shared -o $@ $^
594
595 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
596         $(CC) $(PCFLAGS) -shared -o $@ $^
597
598 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
599         $(CC) $(PCFLAGS) -shared -o $@ $^
600
601 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
602         $(CC) $(PCFLAGS) -shared -o $@ $^
603 endif
604
605 ################################################################################
606 # Note on generic rules and dependancies
607 ################################################################################
608
609 # Note on dependancies: each .c file is associated with a .d file, which
610 # depends of it. The .o file associated with a .c file depends of the .d, of the
611 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
612 # directory.
613 # The dep directory should be ignored by CVS.
614
615 # Note on inclusions: depending of the target, the dependancies files must
616 # or must not be included. The problem is that if we ask make to include a file,
617 # and this file does not exist, it is made before it can be included. In a
618 # general way, a .d file should be included if and only if the corresponding .o
619 # needs to be re-made.
620
621 # Two makefiles are used: the main one (this one) has regular generic rules,
622 # except for .o files, for which it calls the object Makefile. Dependancies
623 # are not included in this file.
624 # The object Makefile known how to make a .o from a .c, and includes
625 # dependancies for the target, but only those required.