X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Makefile;h=2def78fcb6fd20853c1477332e4e27411b241e8b;hb=8a035a9590e7f10ff5bd4a094ff20f26ec0a6fb7;hp=362303d0aa651a80143189f735182b1fb5851be8;hpb=89a64c6143da74ed12d625b7eb01baca52687f2f;p=vlc diff --git a/Makefile b/Makefile index 362303d0aa..2def78fcb6 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# Generated automatically from Makefile.in by configure. +# Generated automatically from Makefile.in by configure. ################################################################################ # vlc (VideoLAN Client) main makefile # (c)1998 VideoLAN @@ -5,25 +7,41 @@ # This makefile is the main makefile for the VideoLAN client. ################################################################################ +CC = egcc + ################################################################################ # Configuration ################################################################################ -# Environment -#CC=gcc -#SHELL=/bin/sh +# Audio output settings +AOUT = dsp +#AOUT += esd +# Not yet supported +#AOUT += alsa +# Fallback method that should always work +AOUT += dummy # Video output settings -VIDEO_X11=YES -VIDEO_FB=YES -#VIDEO_GGI=YES - -# Highly experimental -#VIDEO_GLIDE=YES - +VOUT = x11 +#VOUT += fb +#VOUT += ggi +#VOUT += glide # Not yet supported -#VIDEO_BEOS=YES -#VIDEO_DGA=YES +#VOUT = beos +#VOUT += dga +# Fallback method that should always work +VOUT += dummy + +# Interface settings +INTF = x11 +#INTF += fb +#INTF += ggi +#INTF += glide +# Not yet supported +#INTF = beos +#INTF += dga +# Fallback method that should always work +INTF += dummy # Target architecture ARCH=X86 @@ -32,19 +50,22 @@ ARCH=X86 # Target operating system SYS=LINUX +#SYS=GNU #SYS=BSD #SYS=BEOS # For x86 architecture, choose MMX support -MMX=YES -#MMX=NO +ARCH += MMX +# For x86 architecture, optimize for Pentium Pro +# (choose NO if you get `Invalid instruction' errors) +ARCH += PPRO # Decoder choice - ?? old decoder will be removed soon #DECODER=old DECODER=new # Debugging mode on or off (set to 1 to activate) -DEBUG=1 +DEBUG=0 #----------------- do not change anything below this line ---------------------- @@ -52,74 +73,32 @@ DEBUG=1 # Configuration pre-processing ################################################################################ -# Program version - may only be changed by the project leader -PROGRAM_VERSION = 1.0-dev - -# VIDEO_OPTIONS describes all used video options -VIDEO_OPTIONS = dummy -intf_method = interface/intf_dummy.o -vout_method = video_output/vout_dummy.o -ifeq ($(VIDEO_GLIDE), YES) -VIDEO_OPTIONS += glide -DEFINE += -DVIDEO_GLIDE -intf_method += interface/intf_glide.o -vout_method += video_output/vout_glide.o -endif -ifeq ($(VIDEO_X11), YES) -VIDEO_OPTIONS += x11 -DEFINE += -DVIDEO_X11 -intf_method += interface/intf_x11.o -vout_method += video_output/vout_x11.o -endif -ifeq ($(VIDEO_GGI), YES) -VIDEO_OPTIONS += ggi -DEFINE += -DVIDEO_GGI -intf_method += interface/intf_ggi.o -vout_method += video_output/vout_ggi.o -endif -ifeq ($(VIDEO_FB), YES) -VIDEO_OPTIONS += fb -DEFINE += -DVIDEO_FB -intf_method += interface/intf_fb.o -vout_method += video_output/vout_fb.o -endif -ifeq ($(VIDEO_BEOS), YES) -VIDEO_OPTIONS += beos -DEFINE += -DVIDEO_BEOS -intf_method += interface/intf_beos.o -vout_method += video_output/vout_beos.o -endif -ifeq ($(VIDEO_DGA), YES) -VIDEO_OPTIONS += dga -DEFINE += -DVIDEO_DGA -intf_method += interface/intf_dga.o -vout_method += video_output/vout_dga.o -endif - # PROGRAM_OPTIONS is an identification string of the compilation options -PROGRAM_OPTIONS = $(ARCH) $(SYS) +PROGRAM_OPTIONS = $(SYS) $(ARCH) ifeq ($(DEBUG),1) PROGRAM_OPTIONS += DEBUG endif # PROGRAM_BUILD is a complete identification of the build -PROGRAM_BUILD = `date -R` $(USER)@`hostname` +# ( we can't use fancy options with date since OSes like Solaris +# or FreeBSD have strange date implementations ) +PROGRAM_BUILD = `date` $(USER) +# XXX: beos does not support hostname +#PROGRAM_BUILD = `date` $(USER)@`hostname` # DEFINE will contain some of the constants definitions decided in Makefile, # including ARCH_xx and SYS_xx. It will be passed to C compiler. -DEFINE += -DARCH_$(ARCH) +DEFINE += -DARCH_$(shell echo $(ARCH) | cut -f1 -d' ') DEFINE += -DSYS_$(SYS) -DEFINE += -DVIDEO_OPTIONS="\"$(VIDEO_OPTIONS)\"" -DEFINE += -DPROGRAM_VERSION="\"$(PROGRAM_VERSION)\"" -DEFINE += -DPROGRAM_OPTIONS="\"$(PROGRAM_OPTIONS)\"" -DEFINE += -DPROGRAM_BUILD="\"$(PROGRAM_BUILD)\"" +DEFINE += -DPLUGIN_PATH="\"$(PREFIX)/lib/videolan/vlc\"" +DEFINE += -DPROGRAM_VERSION="\"0.1.99\"" +DEFINE += -DPROGRAM_CODENAME="\"Onatopp\"" +#DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\"" +#DEFINE += -DPROGRAM_BUILD="\"$(PROGRAM_BUILD)\"" ifeq ($(DEBUG),1) DEFINE += -DDEBUG endif -# video is a lowercase version of VIDEO used for filenames -video = $(shell echo $(VIDEO) | tr 'A-Z' 'a-z') - ################################################################################ # Tuning and other variables - do not change anything except if you know # exactly what you are doing @@ -128,34 +107,31 @@ video = $(shell echo $(VIDEO) | tr 'A-Z' 'a-z') # # C headers directories # -INCLUDE += -Iinclude - -ifeq ($(VIDEO_X11),YES) -INCLUDE += -I/usr/X11R6/include -endif - -ifeq ($(VIDEO_GLIDE),YES) -INCLUDE += -I/usr/include/glide -endif +INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include # # Libraries # -LIB += -lpthread -LIN += -lm -ifeq ($(VIDEO_X11),YES) -LIB += -L/usr/X11R6/lib -LIB += -lX11 -LIB += -lXext +ifeq ($(SYS),GNU) +LIB += -lthreads -ldl endif -ifeq ($(VIDEO_GGI),YES) -LIB += -lggi + +ifeq ($(SYS),BSD) +LIB += -pthread -lgnugetopt +LIB += -L/usr/local/lib endif -ifeq ($(VIDEO_GLIDE),YES) -LIB += -lglide2x + +ifeq ($(SYS),LINUX) +LIB += -lpthread -ldl +endif + +ifeq ($SYS),BEOS) +LIB += -llibroot -llibgame -llibbe endif +LIB += -lm + # # C compiler flags: compilation # @@ -170,19 +146,28 @@ CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global CCFLAGS += -fomit-frame-pointer # Optimizations for x86 familiy -ifeq ($(ARCH),X86) +ifneq (,$(findstring X86,$(ARCH))) CCFLAGS += -malign-double -CCFLAGS += -march=pentiumpro #CCFLAGS += -march=pentium +# Eventual Pentium Pro optimizations +ifneq (,$(findstring PPRO,$(ARCH))) +ifneq ($(SYS), BSD) +CCFLAGS += -march=pentiumpro +endif +endif +# Eventual MMX optimizations for x86 +ifneq (,$(findstring MMX,$(ARCH))) +CFLAGS += -DHAVE_MMX +endif endif # Optimizations for PowerPC -ifeq ($(ARCH),PPC) +ifneq (,$(findstring PPC,$(ARCH))) CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring endif # Optimizations for Sparc -ifeq ($(ARCH),SPARC) +ifneq (,$(findstring SPARC,$(ARCH))) CCFLAGS += -mhard-float endif @@ -199,17 +184,6 @@ LCFLAGS += $(LIB) LCFLAGS += -Wall #LCFLAGS += -s -# -# C compiler flags: common flags -# - -# Eventual MMX optimizations for x86 -ifeq ($(ARCH),X86) -ifeq ($(MMX), YES) # MMX is YES or AUTO -CFLAGS += -DHAVE_MMX -endif -endif - # # Additionnal debugging flags # @@ -232,9 +206,7 @@ interface_obj = interface/main.o \ interface/intf_msg.o \ interface/intf_cmd.o \ interface/intf_ctrl.o \ - interface/control.o \ - interface/intf_console.o \ - $(intf_method) + interface/intf_console.o input_obj = input/input_vlan.o \ input/input_file.o \ @@ -245,15 +217,14 @@ input_obj = input/input_vlan.o \ input/input_psi.o \ input/input.o -audio_output_obj = audio_output/audio_output.o \ - audio_output/audio_dsp.o +audio_output_obj = audio_output/audio_output.o video_output_obj = video_output/video_output.o \ video_output/video_text.o \ - video_output/video_yuv.o \ - $(vout_method) + video_output/video_yuv.o -ac3_decoder_obj = ac3_decoder/ac3_decoder.o \ +ac3_decoder_obj = ac3_decoder/ac3_decoder_thread.o \ + ac3_decoder/ac3_decoder.o \ ac3_decoder/ac3_parse.o \ ac3_decoder/ac3_exponent.o \ ac3_decoder/ac3_bit_allocate.o \ @@ -262,7 +233,8 @@ ac3_decoder_obj = ac3_decoder/ac3_decoder.o \ ac3_decoder/ac3_imdct.o \ ac3_decoder/ac3_downmix.o -audio_decoder_obj = audio_decoder/audio_decoder.o \ +audio_decoder_obj = audio_decoder/audio_decoder_thread.o \ + audio_decoder/audio_decoder.o \ audio_decoder/audio_math.o spu_decoder_obj = spu_decoder/spu_decoder.o @@ -292,12 +264,15 @@ video_parser_obj = video_parser/video_parser.o \ video_decoder_obj = video_decoder/video_decoder.o \ video_decoder/vdec_motion.o \ + video_decoder/vdec_motion_inner.o \ video_decoder/vdec_idct.o endif misc_obj = misc/mtime.o \ misc/rsc_files.o \ - misc/netutils.o + misc/netutils.o \ + misc/plugins.o \ + misc/decoder_fifo.o C_OBJ = $(interface_obj) \ $(input_obj) \ @@ -315,23 +290,34 @@ C_OBJ = $(interface_obj) \ # # Assembler Objects # -ifeq ($(ARCH),X86) -ifeq ($(MMX), YES) +ifneq (,$(findstring X86,$(ARCH))) +ifneq (,$(findstring MMX,$(ARCH))) ifeq ($(DECODER),new) -ASM_OBJ = video_decoder/idctmmx.o \ +ASM_OBJ = video_decoder/vdec_idctmmx.o \ video_output/video_yuv_mmx.o else -ASM_OBJ = video_decoder_ref/idctmmx.o \ +ASM_OBJ = video_decoder_ref/vdec_idctmmx.o \ video_output/video_yuv_mmx.o endif endif endif +# +# Plugins +# +intf_plugin = $(INTF:%=plugins/intf/intf_%.so) +aout_plugin = $(AOUT:%=plugins/aout/aout_%.so) +vout_plugin = $(VOUT:%=plugins/vout/vout_%.so) + +PLUGIN_OBJ = $(intf_plugin) $(aout_plugin) $(vout_plugin) + # # Other lists of files # -sources := $(C_OBJ:%.o=%.c) -dependancies := $(sources:%.c=dep/%.d) +C_OBJ := $(C_OBJ:%.o=src/%.o) +ASM_OBJ := $(ASM_OBJ:%.o=src/%.o) +sources := $(C_OBJ:%.o=%.c) $(PLUGIN_OBJ:%.so=%.c) +dependancies := $(sources:%.c=.dep/%.d) # All symbols must be exported export @@ -346,12 +332,18 @@ export all: vlc clean: - rm -f $(C_OBJ) $(ASM_OBJ) + rm -f $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ) distclean: clean - rm -f **/*.o **/*~ *.log + rm -f **/*.o **/*.so **/*~ *.log + rm -f Makefile include/defs.h config.cache config.log rm -f vlc gmon.out core - rm -rf dep + rm -rf .dep + +install: + $(INSTALL) vlc $(PREFIX)/bin + mkdir -p $(PREFIX)/lib/videolan/vlc + $(INSTALL) $(PLUGIN_OBJ) $(PREFIX)/lib/videolan/vlc show: @echo "Command line for C objects:" @@ -365,8 +357,8 @@ FORCE: # # Real targets # -vlc: $(C_OBJ) $(ASM_OBJ) - $(CC) $(LCFLAGS) $(CFLAGS) -o $@ $(C_OBJ) $(ASM_OBJ) +vlc: $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ) + $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(ASM_OBJ) # # Generic rules (see below) @@ -374,31 +366,74 @@ vlc: $(C_OBJ) $(ASM_OBJ) $(dependancies): %.d: FORCE @$(MAKE) -s --no-print-directory -f Makefile.dep $@ -$(C_OBJ): %.o: Makefile Makefile.dep -$(C_OBJ): %.o: dep/%.d +$(C_OBJ): %.o: Makefile.dep +$(C_OBJ): %.o: .dep/%.d $(C_OBJ): %.o: %.c - @echo "compiling $*.c" + @echo "compiling $*.o from $*.c" @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $< -$(ASM_OBJ): %.o: Makefile Makefile.dep +$(ASM_OBJ): %.o: Makefile.dep $(ASM_OBJ): %.o: %.S - @echo "assembling $*.S" + @echo "assembling $*.o from $*.S" @$(CC) $(CFLAGS) -c -o $@ $< +$(PLUGIN_OBJ): %.so: Makefile.dep +$(PLUGIN_OBJ): %.so: .dep/%.d + +# audio plugins +plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c + @echo "compiling $*.so from $*.c" +ifeq ($(SYS), BEOS) + @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $< +else + @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $< +endif + +plugins/aout/aout_esd.so: %.so: %.c + @echo "compiling $*.so from $*.c" +ifeq ($(SYS), BSD) + @$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $< +else + @$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $< +endif + +# video plugins +plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \ + plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c + @echo "compiling $*.so from $*.c" +ifeq ($(SYS), BEOS) + @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $< +else + @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $< +endif + +plugins/intf/intf_x11.so plugins/vout/vout_x11.so: %.so: %.c + @echo "compiling $*.so from $*.c" + @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $< + +plugins/intf/intf_glide.so plugins/vout/vout_glide.so: %.so: %.c + @echo "compiling $*.so from $*.c" + @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/include/glide -lglide2x -shared -o $@ $< + +plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c + @echo "compiling $*.so from $*.c" + @$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $< + + ################################################################################ # Note on generic rules and dependancies ################################################################################ # Note on dependancies: each .c file is associated with a .d file, which -# depends of it. The .o file associated with a .c file depends of the .d, of the -# .c itself, and of Makefile. The .d files are stored in a separate dep/ +# depends of it. The .o file associated with a .c file depends of the .d, of the +# .c itself, and of Makefile. The .d files are stored in a separate .dep/ # directory. # The dep directory should be ignored by CVS. -# Note on inclusions: depending of the target, the dependancies files must +# Note on inclusions: depending of the target, the dependancies files must # or must not be included. The problem is that if we ask make to include a file, -# and this file does not exist, it is made before it can be included. In a -# general way, a .d file should be included if and only if the corresponding .o +# and this file does not exist, it is made before it can be included. In a +# general way, a .d file should be included if and only if the corresponding .o # needs to be re-made. # Two makefiles are used: the main one (this one) has regular generic rules,