. corrections de fautes d'orthographe je ne sais plus trop o�
[vlc.git] / Makefile.in
1 # Generated automatically from Makefile.in by configure.
2 # Generated automatically from Makefile.in by configure.
3 ################################################################################
4 # vlc (VideoLAN Client) main makefile
5 # (c)1998 VideoLAN
6 ################################################################################
7 # This makefile is the main makefile for the VideoLAN client.
8 ################################################################################
9
10 ################################################################################
11 # Configuration
12 ################################################################################
13
14 # Audio output settings
15 AOUT += dsp
16 #AOUT += esd
17 # Not yet supported
18 #AOUT += alsa
19 # Fallback method that should always work
20 AOUT += dummy
21
22 # Video output settings
23 VOUT += x11
24 #VOUT += fb
25 #VOUT += ggi
26 #VOUT += glide
27 #VOUT += gnome
28 # Not yet supported
29 #VOUT += mga
30 #VOUT += beos
31 #VOUT += dga
32 # Fallback method that should always work
33 VOUT += dummy
34
35 # Interface settings
36 INTF += x11
37 #INTF += fb
38 #INTF += ggi
39 #INTF += glide
40 #INTF += gnome
41 # Not yet supported
42 #INTF += mga
43 #INTF += beos
44 #INTF += dga
45 # Fallback method that should always work
46 INTF += dummy
47
48 # Target architecture
49 ARCH=X86
50 #ARCH=PPC
51 #ARCH=SPARC
52
53 # Target operating system
54 SYS=LINUX
55 #SYS=GNU
56 #SYS=BSD
57 #SYS=BEOS
58
59 # For x86 architecture, choose MMX support
60 ARCH += MMX
61 # For x86 architecture, optimize for Pentium Pro
62 # (choose NO if you get `Invalid instruction' errors)
63 ARCH += PPRO
64
65 # Decoder choice - ?? old decoder will be removed soon
66 #DECODER=old
67 DECODER=new
68
69 # Debugging mode on or off (set to 1 to activate)
70 DEBUG=0
71
72 #----------------- do not change anything below this line ----------------------
73
74 prefix=/usr/local
75 INSTALL=/bin/install -c
76
77 ################################################################################
78 # Configuration pre-processing
79 ################################################################################
80
81 # PROGRAM_OPTIONS is an identification string of the compilation options
82 PROGRAM_OPTIONS = $(SYS) $(ARCH)
83 ifeq ($(DEBUG),1)
84 PROGRAM_OPTIONS += DEBUG
85 endif
86
87 # PROGRAM_BUILD is a complete identification of the build
88 # ( we can't use fancy options with date since OSes like Solaris
89 # or FreeBSD have strange date implementations )
90 PROGRAM_BUILD = `date` $(USER)
91 # XXX: beos does not support hostname
92 #PROGRAM_BUILD = `date` $(USER)@`hostname`
93
94 # DEFINE will contain some of the constants definitions decided in Makefile, 
95 # including ARCH_xx and SYS_xx. It will be passed to C compiler.
96 DEFINE += -DARCH_$(shell echo $(ARCH) | cut -f1 -d' ')
97 DEFINE += -DSYS_$(SYS)
98 DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\""
99 DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\""
100 #DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\""
101 #DEFINE += -DPROGRAM_BUILD="\"$(PROGRAM_BUILD)\""
102 ifeq ($(DEBUG),1)
103 DEFINE += -DDEBUG
104 endif
105
106 ################################################################################
107 # Tuning and other variables - do not change anything except if you know
108 # exactly what you are doing
109 ################################################################################
110
111 #
112 # C headers directories
113 #
114 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
115
116 #
117 # Libraries
118 #
119
120 ifeq ($(SYS),GNU)
121 LIB += -lthreads -ldl
122 endif
123
124 ifeq ($(SYS),BSD)
125 LIB += -pthread -lgnugetopt
126 LIB += -L/usr/local/lib
127 endif
128
129 ifeq ($(SYS),LINUX)
130 LIB += -lpthread -ldl
131 endif
132
133 ifeq ($(SYS),BEOS)
134 LIB += -lbe -lroot -lgame
135 else
136 LIB += -lm
137 endif
138
139 #
140 # C compiler flags: compilation
141 #
142 CCFLAGS += $(DEFINE) $(INCLUDE)
143 CCFLAGS += -Wall
144 CCFLAGS += -D_REENTRANT
145 CCFLAGS += -D_GNU_SOURCE
146
147 # flags needed for clean beos compilation
148 CCFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
149
150 # Optimizations : don't compile debug versions with them
151 CCFLAGS += -O6
152 CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
153 CCFLAGS += -fomit-frame-pointer
154
155 # Optimizations for x86 familiy
156 ifneq (,$(findstring X86,$(ARCH)))
157 CCFLAGS += -malign-double
158 #CCFLAGS += -march=pentium
159 # Eventual Pentium Pro optimizations
160 ifneq (,$(findstring PPRO,$(ARCH)))
161 ifneq ($(SYS), BSD)
162 CCFLAGS += -march=pentiumpro
163 endif
164 endif
165 # Eventual MMX optimizations for x86
166 ifneq (,$(findstring MMX,$(ARCH)))
167 CFLAGS += -DHAVE_MMX
168 endif
169 endif
170
171 # Optimizations for PowerPC
172 ifneq (,$(findstring PPC,$(ARCH)))
173 CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
174 endif
175
176 # Optimizations for Sparc
177 ifneq (,$(findstring SPARC,$(ARCH)))
178 CCFLAGS += -mhard-float
179 endif
180
181 #
182 # C compiler flags: dependancies
183 #
184 DCFLAGS += $(INCLUDE)
185 DCFLAGS += -MM
186
187 #
188 # C compiler flags: linking
189 #
190 LCFLAGS += $(LIB)
191 LCFLAGS += -Wall
192 #LCFLAGS += -s
193
194 #
195 # Additionnal debugging flags
196 #
197
198 # Debugging support
199 ifeq ($(DEBUG),1)
200 CFLAGS += -g
201 CFLAGS += -pg
202 endif
203
204 #################################################################################
205 # Objects and files
206 #################################################################################
207
208 #
209 # C Objects
210
211 interface_obj =                 interface/main.o \
212                                                 interface/interface.o \
213                                                 interface/intf_msg.o \
214                                                 interface/intf_cmd.o \
215                                                 interface/intf_ctrl.o \
216                                                 interface/intf_console.o
217
218 input_obj =                     input/input_vlan.o \
219                                                 input/input_file.o \
220                                                 input/input_netlist.o \
221                                                 input/input_network.o \
222                                                 input/input_ctrl.o \
223                                                 input/input_pcr.o \
224                                                 input/input_psi.o \
225                                                 input/input.o
226
227 audio_output_obj =              audio_output/audio_output.o
228
229 video_output_obj =              video_output/video_output.o \
230                                                 video_output/video_text.o \
231                                                 video_output/video_spu.o \
232                                                 video_output/video_yuv.o
233
234 ac3_decoder_obj =               ac3_decoder/ac3_decoder_thread.o \
235                                                 ac3_decoder/ac3_decoder.o \
236                                                 ac3_decoder/ac3_parse.o \
237                                                 ac3_decoder/ac3_exponent.o \
238                                                 ac3_decoder/ac3_bit_allocate.o \
239                                                 ac3_decoder/ac3_mantissa.o \
240                                                 ac3_decoder/ac3_rematrix.o \
241                                                 ac3_decoder/ac3_imdct.o \
242                                                 ac3_decoder/ac3_downmix.o
243
244 audio_decoder_obj =             audio_decoder/audio_decoder_thread.o \
245                                                 audio_decoder/audio_decoder.o \
246                                                 audio_decoder/audio_math.o
247
248 spu_decoder_obj =               spu_decoder/spu_decoder.o
249
250 #??generic_decoder_obj =                generic_decoder/generic_decoder.o
251 # remeber to add it to OBJ 
252
253 ifeq ($(DECODER),old)
254 CFLAGS += -DOLD_DECODER
255 video_decoder_obj =             video_decoder_ref/video_decoder.o \
256                                                 video_decoder_ref/display.o \
257                                                 video_decoder_ref/getblk.o \
258                                                 video_decoder_ref/gethdr.o \
259                                                 video_decoder_ref/getpic.o \
260                                                 video_decoder_ref/getvlc.o \
261                                                 video_decoder_ref/idct.o \
262                                                 video_decoder_ref/motion.o \
263                                                 video_decoder_ref/mpeg2dec.o \
264                                                 video_decoder_ref/recon.o \
265                                                 video_decoder_ref/spatscal.o
266 else
267 video_parser_obj =              video_parser/video_parser.o \
268                                                 video_parser/vpar_headers.o \
269                                                 video_parser/vpar_blocks.o \
270                                                 video_parser/vpar_synchro.o \
271                                                 video_parser/video_fifo.o
272
273 video_decoder_obj =             video_decoder/video_decoder.o \
274                                                 video_decoder/vdec_motion.o \
275                                                 video_decoder/vdec_motion_inner.o \
276                                                 video_decoder/vdec_idct.o
277 endif
278
279 misc_obj =                      misc/mtime.o \
280                                                 misc/rsc_files.o \
281                                                 misc/netutils.o \
282                                                 misc/plugins.o \
283                                                 misc/decoder_fifo.o
284
285
286 C_OBJ = $(interface_obj) \
287                 $(input_obj) \
288                 $(audio_output_obj) \
289                 $(video_output_obj) \
290                 $(ac3_decoder_obj) \
291                 $(audio_decoder_obj) \
292                 $(spu_decoder_obj) \
293                 $(generic_decoder_obj) \
294                 $(video_parser_obj) \
295                 $(video_decoder_obj) \
296                 $(vlan_obj) \
297                 $(misc_obj)
298
299 ifeq ($(SYS), BEOS)
300 CPP_OBJ =                       misc/beos_specific.o
301 endif
302
303 #
304 # Assembler Objects
305
306 ifneq (,$(findstring X86,$(ARCH)))
307 ifneq (,$(findstring MMX,$(ARCH)))
308 ifeq ($(DECODER),new)
309 ASM_OBJ =                       video_decoder/vdec_idctmmx.o \
310                                                 video_output/video_yuv_mmx.o
311 else
312 ASM_OBJ =                       video_decoder_ref/vdec_idctmmx.o \
313                                                 video_output/video_yuv_mmx.o
314 endif
315 endif
316 endif
317
318 #
319 # Plugins
320 #
321 intf_plugin =           $(INTF:%=plugins/intf/intf_%.so)
322 aout_plugin =           $(AOUT:%=plugins/aout/aout_%.so)
323 vout_plugin =           $(VOUT:%=plugins/vout/vout_%.so)
324
325 PLUGIN_OBJ = $(intf_plugin) $(aout_plugin) $(vout_plugin)
326
327 #
328 # Other lists of files
329 #
330 C_OBJ := $(C_OBJ:%.o=src/%.o)
331 CPP_OBJ := $(CPP_OBJ:%.o=src/%.o)
332 ASM_OBJ := $(ASM_OBJ:%.o=src/%.o)
333 sources_c := $(C_OBJ:%.o=%.c)
334 dependancies := $(sources_c:%.c=.dep/%.d)
335
336 # All symbols must be exported
337 export
338
339 ################################################################################
340 # Targets
341 ################################################################################
342
343 #
344 # Virtual targets
345 #
346 all: vlc plugins
347
348 clean:
349         rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
350
351 distclean: clean
352         rm -f **/*.o **/*.so **/*~ *.log
353         rm -f Makefile include/defs.h config.cache config.log
354         rm -f vlc gmon.out core
355         rm -rf .dep
356
357 install:
358         $(INSTALL) vlc $(prefix)/bin
359         mkdir -p $(prefix)/lib/videolan/vlc
360         $(INSTALL) $(PLUGIN_OBJ) $(prefix)/lib/videolan/vlc
361         $(INSTALL) share/*.psf $(prefix)/share/videolan/vlc
362         $(INSTALL) share/*.png $(prefix)/share/videolan/vlc
363
364 show:
365         @echo "Command line for C objects:"
366         @echo $(CC) $(CCFLAGS) $(CFLAGS) -c -o "<dest.o>" "<src.c>"
367         @echo
368         @echo "Command line for assembler objects:"
369         @echo $(CC) $(CFLAGS) -c -o "<dest.o>" "<src.S>"
370
371 # ugliest of all, but I have no time to do it -- sam
372 snapshot:
373         rm -rf /tmp/${SNAPSHOTDIR}
374         mkdir /tmp/${SNAPSHOTDIR}
375         cp -a * /tmp/${SNAPSHOTDIR}
376                 (cd /tmp/${SNAPSHOTDIR} ; \
377                 make distclean ; \
378                 find . -type d -name CVS | xargs rm -rf ; \
379                 find . -type f -name '.*.swp' | xargs rm -f ; \
380                 cd .. ; \
381                 tar czvf ${SNAPSHOTDIR}.tar.gz ${SNAPSHOTDIR} )
382         rm -rf /tmp/${SNAPSHOTDIR}
383         mv /tmp/${SNAPSHOTDIR}.tar.gz ..
384         @echo "Sources are in ../${SNAPSHOTDIR}.tar.gz"
385
386 FORCE:
387
388 #
389 # Real targets
390 #
391 vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
392 ifeq ($(SYS), BEOS)
393         $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
394 #       ln -s ../vlc ./plugins/_APP_
395 else
396         $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)   
397 endif
398
399 plugins: $(PLUGIN_OBJ)
400
401 #
402 # Generic rules (see below)
403 #
404 $(dependancies): %.d: FORCE
405         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
406
407 $(C_OBJ): %.o: Makefile.dep
408 $(C_OBJ): %.o: .dep/%.d
409 $(C_OBJ): %.o: %.c
410         @echo "compiling $*.o from $*.c"
411         @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
412
413 $(CPP_OBJ): %.o: %.cpp
414         @echo "compiling $*.o from $*.cpp"
415         @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
416
417 $(ASM_OBJ): %.o: Makefile.dep
418 $(ASM_OBJ): %.o: %.S
419         @echo "assembling $*.o from $*.S"
420         @$(CC) $(CFLAGS) -c -o $@ $<
421
422 #$(PLUGIN_OBJ): %.so: Makefile.dep
423 #$(PLUGIN_OBJ): %.so: .dep/%.d
424
425 # audio plugins
426 plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
427                 @echo "compiling $*.so from $*.c"
428 ifeq ($(SYS), BEOS)
429                 @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
430 else
431                 @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
432 endif
433
434 plugins/aout/aout_esd.so: %.so: %.c
435                 @echo "compiling $*.so from $*.c"
436 ifeq ($(SYS), BSD)
437                 @$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
438 else
439                 @$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
440 endif
441
442 # video plugins
443 plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
444         plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
445                 @echo "compiling $*.so from $*.c"
446 ifeq ($(SYS), BEOS)
447                 @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
448 else
449                 @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
450 endif
451
452 plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c
453                 @echo "compiling $*.so from $*.c"
454                 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
455
456 plugins/intf/intf_mga.so plugins/vout/vout_mga.so: %.so: %.c
457                 @echo "compiling $*.so from $*.c"
458                 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
459
460 plugins/intf/intf_gnome.so: %.so: %.c
461                 @echo "compiling $*.so from $*.c"
462                 @$(CC) $(CCFLAGS) $(CFLAGS) $(LCFLAGS) `gnome-config --libs --cflags gnomeui` -shared -o $@ $< plugins/intf/intf_gnome_callbacks.c plugins/intf/intf_gnome_interface.c plugins/intf/intf_gnome_support.c
463
464 plugins/vout/vout_gnome.so: %.so: %.c
465                 @echo "compiling $*.so from $*.c"
466                 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
467
468 plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c
469                 @echo "compiling $*.so from $*.c"
470                 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
471
472 plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
473                 @echo "compiling $*.so from $*.c"
474                 @$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
475
476 plugins/intf/intf_beos.so: %.so: %.cpp
477                 @echo "compiling $*.so from $*.cpp"
478                 @$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
479
480 plugins/vout/vout_beos.so: %.so: %.cpp
481                 @echo "compiling $*.so from $*.cpp"
482                 @$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
483                 
484
485 ################################################################################
486 # Note on generic rules and dependancies
487 ################################################################################
488
489 # Note on dependancies: each .c file is associated with a .d file, which
490 # depends of it. The .o file associated with a .c file depends of the .d, of the
491 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
492 # directory.
493 # The dep directory should be ignored by CVS.
494
495 # Note on inclusions: depending of the target, the dependancies files must
496 # or must not be included. The problem is that if we ask make to include a file,
497 # and this file does not exist, it is made before it can be included. In a
498 # general way, a .d file should be included if and only if the corresponding .o
499 # needs to be re-made.
500
501 # Two makefiles are used: the main one (this one) has regular generic rules,
502 # except for .o files, for which it calls the object Makefile. Dependancies
503 # are not included in this file.
504 # The object Makefile known how to make a .o from a .c, and includes
505 # dependancies for the target, but only those required.