X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Makefile;h=01373b35358bf5cc8740154c06e2b7e7219c5b02;hb=2f2ce6f4d1d67057c2db76a5463e6f9870e7cbe9;hp=d0fcbfd5c4b36d132adb49b067de3fa6a786278d;hpb=1e6848bd70868d317cf2173ef4cab9273f536add;p=vlc diff --git a/Makefile b/Makefile index d0fcbfd5c4..01373b3535 100644 --- a/Makefile +++ b/Makefile @@ -10,19 +10,29 @@ ################################################################################ # Environment -#CC=gcc -#SHELL=/bin/sh +CC=egcc +SHELL=/bin/sh + +# Audio output settings +AUDIO = dsp +# Not yet supported +#AUDIO += esd +# Fallback method that should always work +AUDIO += dummy # Video output settings -VIDEO=X11 -#VIDEO=DGA (not yet supported) -#VIDEO=FB -#VIDEO=GGI -#VIDEO=BEOS (not yet supported) - -# Target architecture and optimization -#ARCH= -ARCH=MMX +VIDEO = x11 +VIDEO += fb +#VIDEO += ggi +#VIDEO += glide +# Not yet supported +#VIDEO += beos +#VIDEO += dga +# Fallback method that should always work +VIDEO += dummy + +# Target architecture +ARCH=X86 #ARCH=PPC #ARCH=SPARC @@ -31,11 +41,15 @@ SYS=LINUX #SYS=BSD #SYS=BEOS +# For x86 architecture, choose MMX support +MMX=YES +#MMX=NO + # Decoder choice - ?? old decoder will be removed soon #DECODER=old DECODER=new -# Debugging mode on or off +# Debugging mode on or off (set to 1 to activate) DEBUG=1 #----------------- do not change anything below this line ---------------------- @@ -45,11 +59,21 @@ DEBUG=1 ################################################################################ # Program version - may only be changed by the project leader -PROGRAM_VERSION = 1.0-dev +PROGRAM_VERSION = 0.95.0 + +# audio options +audio := $(shell echo $(AUDIO) | tr 'A-Z' 'a-z') +AUDIO := $(shell echo $(AUDIO) | tr 'a-z' 'A-Z') +DEFINE += $(AUDIO:%=-DAUDIO_%) + +# video options +video := $(shell echo $(VIDEO) | tr 'A-Z' 'a-z') +VIDEO := $(shell echo $(VIDEO) | tr 'a-z' 'A-Z') +DEFINE += $(VIDEO:%=-DVIDEO_%) # PROGRAM_OPTIONS is an identification string of the compilation options -PROGRAM_OPTIONS = $(VIDEO) $(ARCH) $(SYS) -ifneq ($(DEBUG),) +PROGRAM_OPTIONS = $(ARCH) $(SYS) +ifeq ($(DEBUG),1) PROGRAM_OPTIONS += DEBUG endif @@ -57,22 +81,20 @@ endif PROGRAM_BUILD = `date -R` $(USER)@`hostname` # DEFINE will contain some of the constants definitions decided in Makefile, -# including VIDEO_xx and ARCH_xx. It will be passed to C compiler. -DEFINE += -DVIDEO_$(VIDEO) +# including ARCH_xx and SYS_xx. It will be passed to C compiler. DEFINE += -DARCH_$(ARCH) DEFINE += -DSYS_$(SYS) +DEFINE += -DAUDIO_OPTIONS="\"$(audio)\"" +DEFINE += -DVIDEO_OPTIONS="\"$(video)\"" DEFINE += -DPROGRAM_VERSION="\"$(PROGRAM_VERSION)\"" DEFINE += -DPROGRAM_OPTIONS="\"$(PROGRAM_OPTIONS)\"" DEFINE += -DPROGRAM_BUILD="\"$(PROGRAM_BUILD)\"" -ifneq ($(DEBUG),) +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') - ################################################################################ -# Tunning and other variables - do not change anything except if you know +# Tuning and other variables - do not change anything except if you know # exactly what you are doing ################################################################################ @@ -81,24 +103,31 @@ video = $(shell echo $(VIDEO) | tr 'A-Z' 'a-z') # INCLUDE += -Iinclude -ifeq ($(VIDEO),X11) +ifneq (,$(findstring x11,$(video))) INCLUDE += -I/usr/X11R6/include endif +ifneq (,$(findstring glide,$(video))) +INCLUDE += -I/usr/include/glide +endif + # # Libraries # LIB += -lpthread LIB += -lm -ifeq ($(VIDEO),X11) +ifneq (,$(findstring x11,$(video))) LIB += -L/usr/X11R6/lib LIB += -lX11 LIB += -lXext endif -ifeq ($(VIDEO),GGI) +ifneq (,$(findstring ggi,$(video))) LIB += -lggi endif +ifneq (,$(findstring glide,$(video))) +LIB += -lglide2x +endif # # C compiler flags: compilation @@ -111,21 +140,15 @@ CCFLAGS += -D_GNU_SOURCE # Optimizations : don't compile debug versions with them CCFLAGS += -O6 CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global -CCFLAGS += -fomit-frame-pointer +#CCFLAGS += -fomit-frame-pointer -# Optimizations for x86 familiy, without MMX -ifeq ($(ARCH),) +# Optimizations for x86 familiy +ifeq ($(ARCH),X86) CCFLAGS += -malign-double CCFLAGS += -march=pentiumpro #CCFLAGS += -march=pentium endif -# Optimization for x86 with MMX support -ifeq ($(ARCH),MMX) -CCFLAGS += -malign-double -CCFLAGS += -march=pentiumpro -endif - # Optimizations for PowerPC ifeq ($(ARCH),PPC) CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring @@ -153,17 +176,19 @@ LCFLAGS += -Wall # C compiler flags: common flags # -# Optimizations for x86 with MMX support -ifeq ($(ARCH),MMX) +# Eventual MMX optimizations for x86 +ifeq ($(ARCH),X86) +ifeq ($(MMX), YES) # MMX is YES or AUTO CFLAGS += -DHAVE_MMX endif +endif # # Additionnal debugging flags # # Debugging support -ifneq ($(DEBUG),) +ifeq ($(DEBUG),1) CFLAGS += -g #CFLAGS += -pg endif @@ -182,7 +207,7 @@ interface_obj = interface/main.o \ interface/intf_ctrl.o \ interface/control.o \ interface/intf_console.o \ - interface/intf_$(video).o + $(video:%=interface/intf_%.o) input_obj = input/input_vlan.o \ input/input_file.o \ @@ -194,11 +219,12 @@ input_obj = input/input_vlan.o \ input/input.o audio_output_obj = audio_output/audio_output.o \ - audio_output/audio_dsp.o + $(audio:%=audio_output/aout_%.o) video_output_obj = video_output/video_output.o \ - video_output/video_$(video).o \ - video_output/video_yuv.o + video_output/video_text.o \ + video_output/video_yuv.o \ + $(video:%=video_output/vout_%.o) ac3_decoder_obj = ac3_decoder/ac3_decoder.o \ ac3_decoder/ac3_parse.o \ @@ -212,7 +238,7 @@ ac3_decoder_obj = ac3_decoder/ac3_decoder.o \ audio_decoder_obj = audio_decoder/audio_decoder.o \ audio_decoder/audio_math.o -subtitle_decoder_obj = subtitle_decoder/subtitle_decoder.o +spu_decoder_obj = spu_decoder/spu_decoder.o #??generic_decoder_obj = generic_decoder/generic_decoder.o # remeber to add it to OBJ @@ -244,7 +270,8 @@ endif misc_obj = misc/mtime.o \ misc/rsc_files.o \ - misc/netutils.o + misc/netutils.o \ + misc/decoder_fifo.o C_OBJ = $(interface_obj) \ $(input_obj) \ @@ -252,7 +279,7 @@ C_OBJ = $(interface_obj) \ $(video_output_obj) \ $(ac3_decoder_obj) \ $(audio_decoder_obj) \ - $(subtitle_decoder_obj) \ + $(spu_decoder_obj) \ $(generic_decoder_obj) \ $(video_parser_obj) \ $(video_decoder_obj) \ @@ -262,15 +289,17 @@ C_OBJ = $(interface_obj) \ # # Assembler Objects # -ifeq ($(ARCH),MMX) -ifeq ($(DECODER),old) -ASM_OBJ = video_decoder_ref/idctmmx.o \ +ifeq ($(ARCH),X86) +ifeq ($(MMX), YES) +ifeq ($(DECODER),new) +ASM_OBJ = video_decoder/vdec_idctmmx.o \ video_output/video_yuv_mmx.o else -ASM_OBJ = video_decoder/idctmmx.o \ +ASM_OBJ = video_decoder_ref/vdec_idctmmx.o \ video_output/video_yuv_mmx.o endif endif +endif # # Other lists of files @@ -319,13 +348,13 @@ 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: Makefile.dep $(C_OBJ): %.o: dep/%.d $(C_OBJ): %.o: %.c @echo "compiling $*.c" @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $< -$(ASM_OBJ): %.o: Makefile Makefile.dep +$(ASM_OBJ): %.o: Makefile.dep $(ASM_OBJ): %.o: %.S @echo "assembling $*.S" @$(CC) $(CFLAGS) -c -o $@ $<