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