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)))
278 PLUGIN_ALSA = plugins/alsa/alsa.o \
279 plugins/alsa/aout_alsa.o
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
286 PLUGIN_DSP = plugins/dsp/dsp.o \
287 plugins/dsp/aout_dsp.o
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
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
299 PLUGIN_ESD = plugins/esd/esd.o \
300 plugins/esd/aout_esd.o
302 PLUGIN_FB = plugins/fb/fb.o \
303 plugins/fb/intf_fb.o \
306 PLUGIN_GGI = plugins/ggi/ggi.o \
307 plugins/ggi/intf_ggi.o \
308 plugins/ggi/vout_ggi.o
310 PLUGIN_GLIDE = plugins/glide/glide.o \
311 plugins/glide/intf_glide.o \
312 plugins/glide/vout_glide.o
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
320 PLUGIN_IDCT = plugins/idct/idct.o \
321 plugins/idct/idct_common.o
323 PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o \
324 plugins/idct/idct_common.o
326 PLUGIN_IDCTMMX = plugins/idct/idctmmx.o \
327 plugins/idct/idct_common.o
329 PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o \
330 plugins/idct/idct_common.o
332 PLUGIN_MGA = plugins/mga/mga.o \
333 plugins/mga/intf_mga.o \
334 plugins/mga/vout_mga.o
336 PLUGIN_MOTION = plugins/motion/motion.o \
337 plugins/motion/vdec_motion_common.o \
338 plugins/motion/vdec_motion_inner.o
340 PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
341 plugins/motion/vdec_motion_common.o \
342 plugins/motion/vdec_motion_inner_mmx.o
344 PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
345 plugins/motion/vdec_motion_common.o \
346 plugins/motion/vdec_motion_inner_mmxext.o
348 PLUGIN_NCURSES = plugins/text/ncurses.o \
349 plugins/text/intf_ncurses.o
351 PLUGIN_NULL = plugins/null/null.o
353 PLUGIN_PS = plugins/mpeg/ps.o \
354 plugins/mpeg/input_ps.o
356 PLUGIN_SDL = plugins/sdl/sdl.o \
357 plugins/sdl/vout_sdl.o \
358 plugins/sdl/aout_sdl.o
360 PLUGIN_TS = plugins/mpeg/ts.o \
361 plugins/mpeg/input_ts.o
363 PLUGIN_X11= plugins/x11/x11.o \
364 plugins/x11/vout_x11.o
366 PLUGIN_YUV = plugins/yuv/yuv.o \
367 plugins/yuv/video_yuv.o \
368 plugins/yuv/transforms_yuv.o
370 PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
371 plugins/yuv/video_yuvmmx.o \
372 plugins/yuv/transforms_yuvmmx.o
384 $(PLUGIN_IDCTCLASSIC) \
386 $(PLUGIN_IDCTMMXEXT) \
389 $(PLUGIN_MOTIONMMX) \
390 $(PLUGIN_MOTIONMMXEXT) \
400 NONSTD_PLUGIN_OBJ = \
405 STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
406 plugins/motion/vdec_motion_common.o
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)
413 # Other lists of files
415 objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
416 dependancies := $(objects:%.o=.dep/%.d)
418 # All symbols must be exported
421 ################################################################################
423 ################################################################################
428 all: vlc @ALIASES@ plugins
431 rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
432 rm -f plugins/*/*.o src/*/*.o lib/*.so
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
443 mkdir -p $(prefix)/bin
444 $(INSTALL) vlc $(prefix)/bin
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
455 @echo CFLAGS: $(CFLAGS)
456 @echo DCFLAGS: $(DCFLAGS)
457 @echo LCFLAGS: $(LCFLAGS)
458 @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
460 # ugliest of all, but I have no time to do it -- sam
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 ; \
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
470 find . -type f | grep CVS | while read i ; \
471 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
474 find include src plugins -type f -name '*.[chi]*' | while read i ; \
475 do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
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
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 ..
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 ; \
504 # rm -f /tmp/vlc-@VLC_VERSION@/debian/changelog
505 # sed 's/\(^vlc ([^-]*\)-/\1nocss-/' < debian/changelog \
506 # > /tmp/vlc-@VLC_VERSION@/debian/changelog
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 ..
518 rm -rf /tmp/vlc-@VLC_VERSION@*
520 plugins: $(PLUGINS:%=lib/%.so)
525 # Gnome and Framebuffer aliases - don't add new aliases which could bloat
529 rm -f $@ && ln -s vlc $@
533 # Generic rules (see below)
535 $(dependancies): %.d: FORCE
536 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
538 $(C_OBJ): %.o: Makefile.dep
539 $(C_OBJ): %.o: .dep/%.d
541 $(CC) $(CFLAGS) -c -o $@ $<
543 $(CPP_OBJ): %.o: %.cpp
544 $(CC) $(CFLAGS) -c -o $@ $<
546 $(ASM_OBJ): %.o: Makefile.dep
548 $(CC) $(CFLAGS) -c -o $@ $<
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 $@ $<
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 $@ $<
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 $@ $<
566 # Main application target
569 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
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_
575 $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
582 lib/beos.so: $(PLUGIN_BEOS)
583 $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
585 lib/esd.so: $(PLUGIN_ESD)
586 ifneq (,$(findstring bsd,$(SYS)))
587 $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
589 $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
592 lib/dsp.so: $(PLUGIN_DSP)
593 $(CC) $(PCFLAGS) -shared -o $@ $^
595 lib/alsa.so: $(PLUGIN_ALSA)
596 $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
598 lib/fb.so: $(PLUGIN_FB)
599 $(CC) $(PCFLAGS) -shared -o $@ $^
601 lib/x11.so: $(PLUGIN_X11)
602 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
604 lib/mga.so: $(PLUGIN_MGA)
605 $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
607 lib/gnome.so: $(PLUGIN_GNOME)
608 $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
610 lib/glide.so: $(PLUGIN_GLIDE)
611 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
613 lib/ggi.so: $(PLUGIN_GGI)
614 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
616 lib/sdl.so: $(PLUGIN_SDL)
617 $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
619 lib/ncurses.so: $(PLUGIN_NCURSES)
620 $(CC) $(PCFLAGS) -shared -o $@ $^ -lcurses
623 lib/null.so: $(PLUGIN_NULL)
624 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
626 lib/ps.so: $(PLUGIN_PS)
627 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
629 lib/ts.so: $(PLUGIN_TS)
630 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
632 lib/dvd.so: $(PLUGIN_DVD)
633 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
635 lib/dummy.so: $(PLUGIN_DUMMY)
636 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
638 lib/yuv.so: $(PLUGIN_YUV)
639 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
641 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
642 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
644 lib/motion.so: $(PLUGIN_MOTION)
645 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
647 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
648 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
650 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
651 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
653 lib/idct.so: $(PLUGIN_IDCT)
654 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
656 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
657 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
659 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
660 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
662 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
663 $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
665 lib/null.so: $(PLUGIN_NULL)
666 $(CC) $(PCFLAGS) -shared -o $@ $^
668 lib/ps.so: $(PLUGIN_PS)
669 $(CC) $(PCFLAGS) -shared -o $@ $^
671 lib/ts.so: $(PLUGIN_TS)
672 $(CC) $(PCFLAGS) -shared -o $@ $^
674 lib/dvd.so: $(PLUGIN_DVD)
675 $(CC) $(PCFLAGS) -shared -o $@ $^
677 lib/dummy.so: $(PLUGIN_DUMMY)
678 $(CC) $(PCFLAGS) -shared -o $@ $^
680 lib/yuv.so: $(PLUGIN_YUV)
681 $(CC) $(PCFLAGS) -shared -o $@ $^
683 lib/yuvmmx.so: $(PLUGIN_YUVMMX)
684 $(CC) $(PCFLAGS) -shared -o $@ $^
686 lib/motion.so: $(PLUGIN_MOTION)
687 $(CC) $(PCFLAGS) -shared -o $@ $^
689 lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
690 $(CC) $(PCFLAGS) -shared -o $@ $^
692 lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
693 $(CC) $(PCFLAGS) -shared -o $@ $^
695 lib/idct.so: $(PLUGIN_IDCT)
696 $(CC) $(PCFLAGS) -shared -o $@ $^
698 lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
699 $(CC) $(PCFLAGS) -shared -o $@ $^
701 lib/idctmmx.so: $(PLUGIN_IDCTMMX)
702 $(CC) $(PCFLAGS) -shared -o $@ $^
704 lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
705 $(CC) $(PCFLAGS) -shared -o $@ $^
708 ################################################################################
709 # Note on generic rules and dependancies
710 ################################################################################
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/
716 # The dep directory should be ignored by CVS.
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.
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.