1 # Generated automatically from Makefile.in by configure.
2 # Generated automatically from Makefile.in by configure.
3 ################################################################################
4 # vlc (VideoLAN Client) main makefile
6 ################################################################################
7 # This makefile is the main makefile for the VideoLAN client.
8 ################################################################################
12 ################################################################################
14 ################################################################################
16 # Audio output settings
21 # Fallback method that should always work
24 # Video output settings
32 # Fallback method that should always work
43 # Fallback method that should always work
51 # Target operating system
57 # For x86 architecture, choose MMX support
59 # For x86 architecture, optimize for Pentium Pro
60 # (choose NO if you get `Invalid instruction' errors)
63 # Decoder choice - ?? old decoder will be removed soon
67 # Debugging mode on or off (set to 1 to activate)
70 #----------------- do not change anything below this line ----------------------
72 ################################################################################
73 # Configuration pre-processing
74 ################################################################################
76 # PROGRAM_OPTIONS is an identification string of the compilation options
77 PROGRAM_OPTIONS = $(SYS) $(ARCH)
79 PROGRAM_OPTIONS += DEBUG
82 # PROGRAM_BUILD is a complete identification of the build
83 # ( we can't use fancy options with date since OSes like Solaris
84 # or FreeBSD have strange date implementations )
85 PROGRAM_BUILD = `date` $(USER)
86 # XXX: beos does not support hostname
87 #PROGRAM_BUILD = `date` $(USER)@`hostname`
89 # DEFINE will contain some of the constants definitions decided in Makefile,
90 # including ARCH_xx and SYS_xx. It will be passed to C compiler.
91 DEFINE += -DARCH_$(shell echo $(ARCH) | cut -f1 -d' ')
92 DEFINE += -DSYS_$(SYS)
93 DEFINE += -DPLUGIN_PATH="\"$(PREFIX)/lib/videolan/vlc\""
94 DEFINE += -DPROGRAM_VERSION="\"0.1.99\""
95 DEFINE += -DPROGRAM_CODENAME="\"Onatopp\""
96 #DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\""
97 #DEFINE += -DPROGRAM_BUILD="\"$(PROGRAM_BUILD)\""
102 ################################################################################
103 # Tuning and other variables - do not change anything except if you know
104 # exactly what you are doing
105 ################################################################################
108 # C headers directories
110 INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
117 LIB += -lthreads -ldl
121 LIB += -pthread -lgnugetopt
122 LIB += -L/usr/local/lib
126 LIB += -lpthread -ldl
130 LIB += -llibroot -llibgame -llibbe
136 # C compiler flags: compilation
138 CCFLAGS += $(DEFINE) $(INCLUDE)
140 CCFLAGS += -D_REENTRANT
141 CCFLAGS += -D_GNU_SOURCE
143 # Optimizations : don't compile debug versions with them
145 CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
146 CCFLAGS += -fomit-frame-pointer
148 # Optimizations for x86 familiy
149 ifneq (,$(findstring X86,$(ARCH)))
150 CCFLAGS += -malign-double
151 #CCFLAGS += -march=pentium
152 # Eventual Pentium Pro optimizations
153 ifneq (,$(findstring PPRO,$(ARCH)))
155 CCFLAGS += -march=pentiumpro
158 # Eventual MMX optimizations for x86
159 ifneq (,$(findstring MMX,$(ARCH)))
164 # Optimizations for PowerPC
165 ifneq (,$(findstring PPC,$(ARCH)))
166 CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
169 # Optimizations for Sparc
170 ifneq (,$(findstring SPARC,$(ARCH)))
171 CCFLAGS += -mhard-float
175 # C compiler flags: dependancies
177 DCFLAGS += $(INCLUDE)
181 # C compiler flags: linking
188 # Additionnal debugging flags
197 #################################################################################
199 #################################################################################
204 interface_obj = interface/main.o \
205 interface/interface.o \
206 interface/intf_msg.o \
207 interface/intf_cmd.o \
208 interface/intf_ctrl.o \
209 interface/intf_console.o
211 input_obj = input/input_vlan.o \
213 input/input_netlist.o \
214 input/input_network.o \
220 audio_output_obj = audio_output/audio_output.o
222 video_output_obj = video_output/video_output.o \
223 video_output/video_text.o \
224 video_output/video_yuv.o
226 ac3_decoder_obj = ac3_decoder/ac3_decoder_thread.o \
227 ac3_decoder/ac3_decoder.o \
228 ac3_decoder/ac3_parse.o \
229 ac3_decoder/ac3_exponent.o \
230 ac3_decoder/ac3_bit_allocate.o \
231 ac3_decoder/ac3_mantissa.o \
232 ac3_decoder/ac3_rematrix.o \
233 ac3_decoder/ac3_imdct.o \
234 ac3_decoder/ac3_downmix.o
236 audio_decoder_obj = audio_decoder/audio_decoder_thread.o \
237 audio_decoder/audio_decoder.o \
238 audio_decoder/audio_math.o
240 spu_decoder_obj = spu_decoder/spu_decoder.o
242 #??generic_decoder_obj = generic_decoder/generic_decoder.o
243 # remeber to add it to OBJ
245 ifeq ($(DECODER),old)
246 CFLAGS += -DOLD_DECODER
247 video_decoder_obj = video_decoder_ref/video_decoder.o \
248 video_decoder_ref/display.o \
249 video_decoder_ref/getblk.o \
250 video_decoder_ref/gethdr.o \
251 video_decoder_ref/getpic.o \
252 video_decoder_ref/getvlc.o \
253 video_decoder_ref/idct.o \
254 video_decoder_ref/motion.o \
255 video_decoder_ref/mpeg2dec.o \
256 video_decoder_ref/recon.o \
257 video_decoder_ref/spatscal.o
259 video_parser_obj = video_parser/video_parser.o \
260 video_parser/vpar_headers.o \
261 video_parser/vpar_blocks.o \
262 video_parser/vpar_synchro.o \
263 video_parser/video_fifo.o
265 video_decoder_obj = video_decoder/video_decoder.o \
266 video_decoder/vdec_motion.o \
267 video_decoder/vdec_motion_inner.o \
268 video_decoder/vdec_idct.o
271 misc_obj = misc/mtime.o \
277 C_OBJ = $(interface_obj) \
279 $(audio_output_obj) \
280 $(video_output_obj) \
282 $(audio_decoder_obj) \
284 $(generic_decoder_obj) \
285 $(video_parser_obj) \
286 $(video_decoder_obj) \
293 ifneq (,$(findstring X86,$(ARCH)))
294 ifneq (,$(findstring MMX,$(ARCH)))
295 ifeq ($(DECODER),new)
296 ASM_OBJ = video_decoder/vdec_idctmmx.o \
297 video_output/video_yuv_mmx.o
299 ASM_OBJ = video_decoder_ref/vdec_idctmmx.o \
300 video_output/video_yuv_mmx.o
308 intf_plugin = $(INTF:%=plugins/intf/intf_%.so)
309 aout_plugin = $(AOUT:%=plugins/aout/aout_%.so)
310 vout_plugin = $(VOUT:%=plugins/vout/vout_%.so)
312 PLUGIN_OBJ = $(intf_plugin) $(aout_plugin) $(vout_plugin)
315 # Other lists of files
317 C_OBJ := $(C_OBJ:%.o=src/%.o)
318 ASM_OBJ := $(ASM_OBJ:%.o=src/%.o)
319 sources := $(C_OBJ:%.o=%.c) $(PLUGIN_OBJ:%.so=%.c)
320 dependancies := $(sources:%.c=.dep/%.d)
322 # All symbols must be exported
325 ################################################################################
327 ################################################################################
335 rm -f $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
338 rm -f **/*.o **/*.so **/*~ *.log
339 rm -f Makefile include/defs.h config.cache config.log
340 rm -f vlc gmon.out core
344 $(INSTALL) vlc $(PREFIX)/bin
345 mkdir -p $(PREFIX)/lib/videolan/vlc
346 $(INSTALL) $(PLUGIN_OBJ) $(PREFIX)/lib/videolan/vlc
349 @echo "Command line for C objects:"
350 @echo $(CC) $(CCFLAGS) $(CFLAGS) -c -o "<dest.o>" "<src.c>"
352 @echo "Command line for assembler objects:"
353 @echo $(CC) $(CFLAGS) -c -o "<dest.o>" "<src.S>"
360 vlc: $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
361 $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(ASM_OBJ)
364 # Generic rules (see below)
366 $(dependancies): %.d: FORCE
367 @$(MAKE) -s --no-print-directory -f Makefile.dep $@
369 $(C_OBJ): %.o: Makefile.dep
370 $(C_OBJ): %.o: .dep/%.d
372 @echo "compiling $*.o from $*.c"
373 @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
375 $(ASM_OBJ): %.o: Makefile.dep
377 @echo "assembling $*.o from $*.S"
378 @$(CC) $(CFLAGS) -c -o $@ $<
380 $(PLUGIN_OBJ): %.so: Makefile.dep
381 $(PLUGIN_OBJ): %.so: .dep/%.d
384 plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
385 @echo "compiling $*.so from $*.c"
387 @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $<
389 @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
392 plugins/aout/aout_esd.so: %.so: %.c
393 @echo "compiling $*.so from $*.c"
395 @$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
397 @$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
401 plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
402 plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
403 @echo "compiling $*.so from $*.c"
405 @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $<
407 @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
410 plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c
411 @echo "compiling $*.so from $*.c"
412 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
414 plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c
415 @echo "compiling $*.so from $*.c"
416 @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $<
418 plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
419 @echo "compiling $*.so from $*.c"
420 @$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
423 ################################################################################
424 # Note on generic rules and dependancies
425 ################################################################################
427 # Note on dependancies: each .c file is associated with a .d file, which
428 # depends of it. The .o file associated with a .c file depends of the .d, of the
429 # .c itself, and of Makefile. The .d files are stored in a separate .dep/
431 # The dep directory should be ignored by CVS.
433 # Note on inclusions: depending of the target, the dependancies files must
434 # or must not be included. The problem is that if we ask make to include a file,
435 # and this file does not exist, it is made before it can be included. In a
436 # general way, a .d file should be included if and only if the corresponding .o
437 # needs to be re-made.
439 # Two makefiles are used: the main one (this one) has regular generic rules,
440 # except for .o files, for which it calls the object Makefile. Dependancies
441 # are not included in this file.
442 # The object Makefile known how to make a .o from a .c, and includes
443 # dependancies for the target, but only those required.