1 ################################################################################
2 # vlc (VideoLAN Client) main makefile
4 ################################################################################
5 # This makefile is the main makefile for the VideoLAN client.
6 ################################################################################
8 ################################################################################
10 ################################################################################
12 # Debugging mode on or off (set to 1 to activate)
29 #----------------- do not change anything below this line ----------------------
31 ################################################################################
32 # Configuration pre-processing
33 ################################################################################
35 # PROGRAM_OPTIONS is an identification string of the compilation options
36 PROGRAM_OPTIONS = $(SYS) $(ARCH)
38 PROGRAM_OPTIONS += DEBUG
42 PROGRAM_OPTIONS += DEBUG
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`
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_)
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
62 ################################################################################
63 # Tuning and other variables - do not change anything except if you know
64 # exactly what you are doing
65 ################################################################################
68 # C headers directories
70 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
79 ifneq (,$(findstring bsd,$(SYS)))
80 LIB += -pthread -lgnugetopt
81 LIB += -L/usr/local/lib
84 ifneq (,$(findstring linux,$(SYS)))
88 ifneq (,$(findstring solaris,$(SYS)))
89 LIB += -ldl -lsocket -lnsl -lpthread
93 LIB += -lbe -lroot -lgame
99 # C compiler flags: mainstream compilation
101 CFLAGS += $(DEFINE) $(INCLUDE)
102 CFLAGS += -Wall -Winline
103 CFLAGS += -D_REENTRANT
104 CFLAGS += -D_GNU_SOURCE
106 # flags needed for clean beos compilation
108 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
111 # Optimizations : don't compile debug versions with them
114 CFLAGS += -ffast-math -funroll-loops
115 CFLAGS += -fomit-frame-pointer
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
123 CFLAGS += -march=pentium -mcpu=pentium
127 # Optimizations for PowerPC
128 ifneq (,$(findstring powerpc,$(ARCH)))
130 CFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
132 #CFLAGS += -mcpu=750 -mmultiple -mhard-float -mstring
134 #CFLAGS += -mcpu=7400 -mmultiple -mhard-float -mstring
137 # Optimizations for Sparc
138 ifneq (,$(findstring sparc,$(ARCH)))
139 CFLAGS += -mhard-float
142 #end of optimisations
145 # Optional MMX optimizations for x86
146 ifneq (,$(findstring mmx,$(ARCH)))
151 # C compiler flags: plugin compilation
156 # C compiler flags: dependancies
158 DCFLAGS += $(INCLUDE)
162 # C compiler flags: linking
169 # Debugging and profiling support (unless optimisations are active)
175 #################################################################################
177 #################################################################################
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
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 \
198 src/input/mpeg_system.o
200 AUDIO_OUTPUT = src/audio_output/audio_output.o
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
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
217 LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
218 src/lpcm_decoder/lpcm_decoder.o
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
226 SPU_DECODER = src/spu_decoder/spu_decoder.o
228 #GEN_DECODER = src/generic_decoder/generic_decoder.o
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
236 VIDEO_DECODER = src/video_decoder/video_decoder.o
238 MISC = src/misc/mtime.o \
240 src/misc/rsc_files.o \
245 C_OBJ = $(INTERFACE) \
263 CPP_OBJ = src/misc/beos_specific.o
269 ifneq (,$(findstring 86,$(ARCH)))
270 ifneq (,$(findstring mmx,$(ARCH)))
279 PLUGIN_NULL = plugins/null/null.o
281 PLUGIN_PS = plugins/mpeg/ps.o \
282 plugins/mpeg/input_ps.o
284 PLUGIN_TS = plugins/mpeg/ts.o \
285 plugins/mpeg/input_ts.o
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
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
297 PLUGIN_DSP = plugins/dsp/dsp.o \
298 plugins/dsp/aout_dsp.o
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
305 PLUGIN_ESD = plugins/esd/esd.o \
306 plugins/esd/aout_esd.o
308 PLUGIN_FB = plugins/fb/fb.o \
309 plugins/fb/intf_fb.o \
312 PLUGIN_GGI = plugins/ggi/ggi.o \
313 plugins/ggi/intf_ggi.o \
314 plugins/ggi/vout_ggi.o
316 PLUGIN_SDL = plugins/sdl/sdl.o \
317 plugins/sdl/vout_sdl.o \
318 plugins/sdl/aout_sdl.o
320 PLUGIN_GLIDE = plugins/glide/glide.o \
321 plugins/glide/intf_glide.o \
322 plugins/glide/vout_glide.o
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
330 PLUGIN_MGA = plugins/mga/mga.o \
331 plugins/mga/intf_mga.o \
332 plugins/mga/vout_mga.o
334 PLUGIN_X11= plugins/x11/x11.o \
335 plugins/x11/intf_x11.o \
336 plugins/x11/vout_x11.o
338 PLUGIN_YUV = plugins/yuv/yuv.o \
339 plugins/yuv/video_yuv.o \
340 plugins/yuv/transforms_yuv.o
342 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
343 plugins/yuv/video_yuvmmx.o \
344 plugins/yuv/transforms_yuvmmx.o
346 PLUGIN_MOTION = plugins/motion/motion.o \
347 plugins/motion/vdec_motion_common.o \
348 plugins/motion/vdec_motion_inner.o
350 PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
351 plugins/motion/vdec_motion_common.o \
352 plugins/motion/vdec_motion_inner_mmx.o
354 PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
355 plugins/motion/vdec_motion_common.o \
356 plugins/motion/vdec_motion_inner_mmxext.o
358 PLUGIN_IDCT = plugins/idct/idct.o \
359 plugins/idct/idct_common.o
361 PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o \
362 plugins/idct/idct_common.o
364 PLUGIN_IDCTMMX = plugins/idct/idctmmx.o \
365 plugins/idct/idct_common.o
367 PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o \
368 plugins/idct/idct_common.o
370 PLUGIN_ALSA = plugins/alsa/alsa.o \
371 plugins/alsa/aout_alsa.o
373 STD_PLUGIN_OBJ =$(PLUGIN_BEOS) \
384 $(PLUGIN_MOTIONMMX) \
385 $(PLUGIN_MOTIONMMXEXT) \
387 $(PLUGIN_IDCTCLASSIC) \
389 $(PLUGIN_IDCTMMXEXT) \
395 STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
396 plugins/motion/vdec_motion_common.o
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)
403 # Other lists of files
405 objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(STD_PLUGIN_ASM)
406 dependancies := $(objects:%.o=.dep/%.d)
408 # All symbols must be exported
411 ################################################################################
413 ################################################################################
418 all: vlc @ALIASES@ plugins
421 rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
422 rm -f plugins/*/*.o src/*/*.o lib/*.so
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
433 mkdir -p $(prefix)/bin
434 $(INSTALL) vlc $(prefix)/bin
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
445 @echo CFLAGS: $(CFLAGS)
446 @echo DCFLAGS: $(DCFLAGS)
447 @echo LCFLAGS: $(LCFLAGS)
448 @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
450 # ugliest of all, but I have no time to do it -- sam
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 ; \
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
460 find . -type f | grep CVS | while read i ; \
461 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
464 find include src plugins -type f -name '*.[chi]*' | while read i ; \
465 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
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
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 ..
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 ; \
494 rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
495 sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
496 > /tmp/vlc-@VLC_VERSION@/debian/changelog
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 ..
508 rm -rf /tmp/vlc-@VLC_VERSION@nocss
510 plugins: $(PLUGINS:%=lib/%.so)
515 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
519 rm -f $@ && ln -s vlc $@
523 # Generic rules (see below)
525 $(dependancies): %.d: FORCE
526 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
528 $(C_OBJ): %.o: Makefile.dep
529 $(C_OBJ): %.o: .dep/%.d
531 $(CC) $(CFLAGS) -c -o $@ $<
533 $(CPP_OBJ): %.o: %.cpp
534 $(CC) $(CFLAGS) -c -o $@ $<
536 $(ASM_OBJ): %.o: Makefile.dep
538 $(CC) $(CFLAGS) -c -o $@ $<
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 $@ $<
545 $(STD_PLUGIN_ASM): %.o: Makefile.dep
546 $(STD_PLUGIN_ASM): %.o: %.S
547 $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
549 $(PLUGIN_GNOME): %.o: Makefile.dep
550 $(PLUGIN_GNOME): %.o: %.c
551 $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
553 $(PLUGIN_GLIDE): %.o: Makefile.dep
554 $(PLUGIN_GLIDE): %.o: %.c
555 $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
558 # Main application target
561 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
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_
567 $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
574 lib/beos.so: $(PLUGIN_BEOS)
575 $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
577 lib/esd.so: $(PLUGIN_ESD)
578 ifneq (,$(findstring bsd,$(SYS)))
579 $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
581 $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
584 lib/dsp.so: $(PLUGIN_DSP)
585 $(CC) $(PCFLAGS) -shared -o $@ $^
587 lib/alsa.so: $(PLUGIN_ALSA)
588 $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
590 lib/fb.so: $(PLUGIN_FB)
591 $(CC) $(PCFLAGS) -shared -o $@ $^
593 lib/x11.so: $(PLUGIN_X11)
594 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
596 lib/mga.so: $(PLUGIN_MGA)
597 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
599 lib/gnome.so: $(PLUGIN_GNOME)
600 $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
602 lib/glide.so: $(PLUGIN_GLIDE)
603 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
605 lib/ggi.so: $(PLUGIN_GGI)
606 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
608 lib/sdl.so: $(PLUGIN_SDL)
609 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
612 lib/null.so: $(PLUGIN_NULL)
613 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
615 lib/ps.so: $(PLUGIN_PS)
616 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
618 lib/ts.so: $(PLUGIN_TS)
619 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
621 lib/dvd.so: $(PLUGIN_DVD)
622 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
624 lib/dummy.so: $(PLUGIN_DUMMY)
625 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
627 lib/yuv.so: $(PLUGIN_YUV)
628 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
630 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
631 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
633 lib/motion.so: $(PLUGIN_MOTION)
634 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
636 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
637 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
639 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
640 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
642 lib/idct.so: $(PLUGIN_IDCT)
643 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
645 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
646 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
648 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
649 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
651 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
652 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
654 lib/null.so: $(PLUGIN_NULL)
655 $(CC) $(PCFLAGS) -shared -o $@ $^
657 lib/ps.so: $(PLUGIN_PS)
658 $(CC) $(PCFLAGS) -shared -o $@ $^
660 lib/ts.so: $(PLUGIN_TS)
661 $(CC) $(PCFLAGS) -shared -o $@ $^
663 lib/dvd.so: $(PLUGIN_DVD)
664 $(CC) $(PCFLAGS) -shared -o $@ $^
666 lib/dummy.so: $(PLUGIN_DUMMY)
667 $(CC) $(PCFLAGS) -shared -o $@ $^
669 lib/yuv.so: $(PLUGIN_YUV)
670 $(CC) $(PCFLAGS) -shared -o $@ $^
672 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
673 $(CC) $(PCFLAGS) -shared -o $@ $^
675 lib/motion.so: $(PLUGIN_MOTION)
676 $(CC) $(PCFLAGS) -shared -o $@ $^
678 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
679 $(CC) $(PCFLAGS) -shared -o $@ $^
681 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
682 $(CC) $(PCFLAGS) -shared -o $@ $^
684 lib/idct.so: $(PLUGIN_IDCT)
685 $(CC) $(PCFLAGS) -shared -o $@ $^
687 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
688 $(CC) $(PCFLAGS) -shared -o $@ $^
690 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
691 $(CC) $(PCFLAGS) -shared -o $@ $^
693 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
694 $(CC) $(PCFLAGS) -shared -o $@ $^
697 ################################################################################
698 # Note on generic rules and dependancies
699 ################################################################################
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/
705 # The dep directory should be ignored by CVS.
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.
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.