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