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