]> git.sesse.net Git - vlc/blob - Makefile.in
Quelques ajustements pour beos. Les plugins ne compilent toujours pas.
[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 = beos
28 #VOUT += dga
29 # Fallback method that should always work
30 VOUT += dummy
31
32 # Interface settings
33 INTF = x11
34 #INTF += fb
35 #INTF += ggi
36 #INTF += glide
37 # Not yet supported
38 #INTF = beos
39 #INTF += dga
40 # Fallback method that should always work
41 INTF += dummy
42
43 # Target architecture
44 ARCH=X86
45 #ARCH=PPC
46 #ARCH=SPARC
47
48 # Target operating system
49 SYS=LINUX
50 #SYS=GNU
51 #SYS=BSD
52 #SYS=BEOS
53
54 # For x86 architecture, choose MMX support
55 ARCH += MMX
56 # For x86 architecture, optimize for Pentium Pro
57 # (choose NO if you get `Invalid instruction' errors)
58 ARCH += PPRO
59
60 # Decoder choice - ?? old decoder will be removed soon
61 #DECODER=old
62 DECODER=new
63
64 # Debugging mode on or off (set to 1 to activate)
65 DEBUG=0
66
67 #----------------- do not change anything below this line ----------------------
68
69 ################################################################################
70 # Configuration pre-processing
71 ################################################################################
72
73 # PROGRAM_OPTIONS is an identification string of the compilation options
74 PROGRAM_OPTIONS = $(SYS) $(ARCH)
75 ifeq ($(DEBUG),1)
76 PROGRAM_OPTIONS += DEBUG
77 endif
78
79 # PROGRAM_BUILD is a complete identification of the build
80 # ( we can't use fancy options with date since OSes like Solaris
81 # or FreeBSD have strange date implementations )
82 PROGRAM_BUILD = `date` $(USER)
83 # XXX: beos does not support hostname
84 #PROGRAM_BUILD = `date` $(USER)@`hostname`
85
86 # DEFINE will contain some of the constants definitions decided in Makefile, 
87 # including ARCH_xx and SYS_xx. It will be passed to C compiler.
88 DEFINE += -DARCH_$(shell echo $(ARCH) | cut -f1 -d' ')
89 DEFINE += -DSYS_$(SYS)
90 DEFINE += -DPLUGIN_PATH="\"$(PREFIX)/lib/videolan/vlc\""
91 DEFINE += -DPROGRAM_VERSION="\"0.1.99\""
92 DEFINE += -DPROGRAM_CODENAME="\"Onatopp\""
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.o \
234                                                 audio_decoder/audio_math.o
235
236 spu_decoder_obj =               spu_decoder/spu_decoder.o
237
238 #??generic_decoder_obj =                generic_decoder/generic_decoder.o
239 # remeber to add it to OBJ 
240
241 ifeq ($(DECODER),old)
242 CFLAGS += -DOLD_DECODER
243 video_decoder_obj =             video_decoder_ref/video_decoder.o \
244                                                 video_decoder_ref/display.o \
245                                                 video_decoder_ref/getblk.o \
246                                                 video_decoder_ref/gethdr.o \
247                                                 video_decoder_ref/getpic.o \
248                                                 video_decoder_ref/getvlc.o \
249                                                 video_decoder_ref/idct.o \
250                                                 video_decoder_ref/motion.o \
251                                                 video_decoder_ref/mpeg2dec.o \
252                                                 video_decoder_ref/recon.o \
253                                                 video_decoder_ref/spatscal.o
254 else
255 video_parser_obj =              video_parser/video_parser.o \
256                                                 video_parser/vpar_headers.o \
257                                                 video_parser/vpar_blocks.o \
258                                                 video_parser/vpar_synchro.o \
259                                                 video_parser/video_fifo.o
260
261 video_decoder_obj =             video_decoder/video_decoder.o \
262                                                 video_decoder/vdec_motion.o \
263                                                 video_decoder/vdec_motion_inner.o \
264                                                 video_decoder/vdec_idct.o
265 endif
266
267 misc_obj =                      misc/mtime.o \
268                                                 misc/rsc_files.o \
269                                                 misc/netutils.o \
270                                                 misc/plugins.o \
271                                                 misc/decoder_fifo.o
272
273 C_OBJ = $(interface_obj) \
274                 $(input_obj) \
275                 $(audio_output_obj) \
276                 $(video_output_obj) \
277                 $(ac3_decoder_obj) \
278                 $(audio_decoder_obj) \
279                 $(spu_decoder_obj) \
280                 $(generic_decoder_obj) \
281                 $(video_parser_obj) \
282                 $(video_decoder_obj) \
283                 $(vlan_obj) \
284                 $(misc_obj)
285
286 #
287 # Assembler Objects
288
289 ifneq (,$(findstring X86,$(ARCH)))
290 ifneq (,$(findstring MMX,$(ARCH)))
291 ifeq ($(DECODER),new)
292 ASM_OBJ =                       video_decoder/vdec_idctmmx.o \
293                                                 video_output/video_yuv_mmx.o
294 else
295 ASM_OBJ =                       video_decoder_ref/vdec_idctmmx.o \
296                                                 video_output/video_yuv_mmx.o
297 endif
298 endif
299 endif
300
301 #
302 # Plugins
303 #
304 intf_plugin =           $(INTF:%=plugins/intf/intf_%.so)
305 aout_plugin =           $(AOUT:%=plugins/aout/aout_%.so)
306 vout_plugin =           $(VOUT:%=plugins/vout/vout_%.so)
307
308 PLUGIN_OBJ = $(intf_plugin) $(aout_plugin) $(vout_plugin)
309
310 #
311 # Other lists of files
312 #
313 C_OBJ := $(C_OBJ:%.o=src/%.o)
314 ASM_OBJ := $(ASM_OBJ:%.o=src/%.o)
315 sources := $(C_OBJ:%.o=%.c) $(PLUGIN_OBJ:%.so=%.c)
316 dependancies := $(sources:%.c=.dep/%.d)
317
318 # All symbols must be exported
319 export
320
321 ################################################################################
322 # Targets
323 ################################################################################
324
325 #
326 # Virtual targets
327 #
328 all: vlc
329
330 clean:
331         rm -f $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
332
333 distclean: clean
334         rm -f **/*.o **/*.so **/*~ *.log
335         rm -f Makefile include/defs.h config.cache config.log
336         rm -f vlc gmon.out core
337         rm -rf .dep
338
339 install:
340         $(INSTALL) vlc $(PREFIX)/bin
341         mkdir -p $(PREFIX)/lib/videolan/vlc
342         $(INSTALL) $(PLUGIN_OBJ) $(PREFIX)/lib/videolan/vlc
343
344 show:
345         @echo "Command line for C objects:"
346         @echo $(CC) $(CCFLAGS) $(CFLAGS) -c -o "<dest.o>" "<src.c>"
347         @echo
348         @echo "Command line for assembler objects:"
349         @echo $(CC) $(CFLAGS) -c -o "<dest.o>" "<src.S>"
350
351 FORCE:
352
353 #
354 # Real targets
355 #
356 vlc: $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
357         $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(ASM_OBJ)      
358
359 #
360 # Generic rules (see below)
361 #
362 $(dependancies): %.d: FORCE
363         @$(MAKE) -s --no-print-directory -f Makefile.dep $@
364
365 $(C_OBJ): %.o: Makefile.dep
366 $(C_OBJ): %.o: .dep/%.d
367 $(C_OBJ): %.o: %.c
368         @echo "compiling $*.o from $*.c"
369         @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
370
371 $(ASM_OBJ): %.o: Makefile.dep
372 $(ASM_OBJ): %.o: %.S
373         @echo "assembling $*.o from $*.S"
374         @$(CC) $(CFLAGS) -c -o $@ $<
375
376 $(PLUGIN_OBJ): %.so: Makefile.dep
377 $(PLUGIN_OBJ): %.so: .dep/%.d
378
379 # audio plugins
380 plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
381                 @echo "compiling $*.so from $*.c"
382 ifeq ($(SYS), BEOS)
383                 @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $<
384 else
385                 @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
386 endif
387
388 plugins/aout/aout_esd.so: %.so: %.c
389                 @echo "compiling $*.so from $*.c"
390 ifeq ($(SYS), BSD)
391                 @$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
392 else
393                 @$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
394 endif
395
396 # video plugins
397 plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
398         plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
399                 @echo "compiling $*.so from $*.c"
400 ifeq ($(SYS), BEOS)
401                 @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $<
402 else
403                 @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
404 endif
405
406 plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c
407                 @echo "compiling $*.so from $*.c"
408                 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
409
410 plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c
411                 @echo "compiling $*.so from $*.c"
412                 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
413
414 plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
415                 @echo "compiling $*.so from $*.c"
416                 @$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
417
418
419 ################################################################################
420 # Note on generic rules and dependancies
421 ################################################################################
422
423 # Note on dependancies: each .c file is associated with a .d file, which
424 # depends of it. The .o file associated with a .c file depends of the .d, of the
425 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
426 # directory.
427 # The dep directory should be ignored by CVS.
428
429 # Note on inclusions: depending of the target, the dependancies files must
430 # or must not be included. The problem is that if we ask make to include a file,
431 # and this file does not exist, it is made before it can be included. In a
432 # general way, a .d file should be included if and only if the corresponding .o
433 # needs to be re-made.
434
435 # Two makefiles are used: the main one (this one) has regular generic rules,
436 # except for .o files, for which it calls the object Makefile. Dependancies
437 # are not included in this file.
438 # The object Makefile known how to make a .o from a .c, and includes
439 # dependancies for the target, but only those required.