# Configuration
################################################################################
-# Audio output settings
-AOUT += dsp
-#AOUT += esd
-# Not yet supported
-#AOUT += alsa
-# Fallback method that should always work
-AOUT += dummy
-
-# Video output settings
-VOUT += x11
-#VOUT += fb
-#VOUT += ggi
-#VOUT += glide
-#VOUT += gnome
-# Not yet supported
-#VOUT += mga
-#VOUT += beos
-#VOUT += dga
-# Fallback method that should always work
-VOUT += dummy
-
-# Interface settings
-INTF += x11
-#INTF += fb
-#INTF += ggi
-#INTF += glide
-#INTF += gnome
-# Not yet supported
-#INTF += mga
-#INTF += beos
-#INTF += dga
-# Fallback method that should always work
-INTF += dummy
-
-# Target architecture
-ARCH=X86
-#ARCH=PPC
-#ARCH=SPARC
-
-# Target operating system
-SYS=LINUX
-#SYS=GNU
-#SYS=BSD
-#SYS=BEOS
-
-# For x86 architecture, choose MMX support
-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=0
-#----------------- do not change anything below this line ----------------------
-
-prefix=@prefix@
+SYS=@SYS@
+ARCH=@ARCH@
+AOUT=@AOUT@
+VOUT=@VOUT@
+INTF=@VOUT@
+SNAPSHOTDIR=vlc-@VLC_VERSION@
INSTALL=@INSTALL@
+prefix=@prefix@
+
+#----------------- do not change anything below this line ----------------------
################################################################################
# Configuration pre-processing
################################################################################
-SNAPSHOTDIR=vlc-@VLC_VERSION@
-
# PROGRAM_OPTIONS is an identification string of the compilation options
PROGRAM_OPTIONS = $(SYS) $(ARCH)
ifeq ($(DEBUG),1)
#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_$(shell echo $(ARCH) | cut -f1 -d' ')
-DEFINE += -DSYS_$(SYS)
+# including SYS_xx. It will be passed to C compiler.
+DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z A-Z)
DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\""
DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\""
#DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\""
# Libraries
#
-ifeq ($(SYS),GNU)
+ifeq ($(SYS),gnu)
LIB += -lthreads -ldl
endif
-ifeq ($(SYS),BSD)
+ifneq (,$(findstring bsd,$(SYS)))
LIB += -pthread -lgnugetopt
LIB += -L/usr/local/lib
endif
-ifeq ($(SYS),LINUX)
+ifneq (,$(findstring linux,$(SYS)))
LIB += -lpthread -ldl
endif
-ifeq ($(SYS),BEOS)
+ifeq ($(SYS),beos)
LIB += -lbe -lroot -lgame
else
LIB += -lm
CCFLAGS += -fomit-frame-pointer
# Optimizations for x86 familiy
-ifneq (,$(findstring X86,$(ARCH)))
+ifneq (,$(findstring 86,$(ARCH)))
CCFLAGS += -malign-double
#CCFLAGS += -march=pentium
# Eventual Pentium Pro optimizations
-ifneq (,$(findstring PPRO,$(ARCH)))
+ifneq (,$(findstring pentiumpro,$(ARCH)))
ifneq ($(SYS), BSD)
CCFLAGS += -march=pentiumpro
endif
endif
# Eventual MMX optimizations for x86
-ifneq (,$(findstring MMX,$(ARCH)))
+ifneq (,$(findstring mmx,$(ARCH)))
CFLAGS += -DHAVE_MMX
endif
endif
# Optimizations for PowerPC
-ifneq (,$(findstring PPC,$(ARCH)))
+ifneq (,$(findstring ppc,$(ARCH)))
CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
endif
# Optimizations for Sparc
-ifneq (,$(findstring SPARC,$(ARCH)))
+ifneq (,$(findstring sparc,$(ARCH)))
CCFLAGS += -mhard-float
endif
#??generic_decoder_obj = generic_decoder/generic_decoder.o
# remeber to add it to OBJ
-ifeq ($(DECODER),old)
-CFLAGS += -DOLD_DECODER
-video_decoder_obj = video_decoder_ref/video_decoder.o \
- video_decoder_ref/display.o \
- video_decoder_ref/getblk.o \
- video_decoder_ref/gethdr.o \
- video_decoder_ref/getpic.o \
- video_decoder_ref/getvlc.o \
- video_decoder_ref/idct.o \
- video_decoder_ref/motion.o \
- video_decoder_ref/mpeg2dec.o \
- video_decoder_ref/recon.o \
- video_decoder_ref/spatscal.o
-else
video_parser_obj = video_parser/video_parser.o \
video_parser/vpar_headers.o \
video_parser/vpar_blocks.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 \
$(vlan_obj) \
$(misc_obj)
-ifeq ($(SYS), BEOS)
+ifeq ($(SYS),beos)
CPP_OBJ = misc/beos_specific.o
endif
#
# Assembler Objects
#
-ifneq (,$(findstring X86,$(ARCH)))
-ifneq (,$(findstring MMX,$(ARCH)))
-ifeq ($(DECODER),new)
+ifneq (,$(findstring 86,$(ARCH)))
+ifneq (,$(findstring mmx,$(ARCH)))
ASM_OBJ = video_decoder/vdec_idctmmx.o \
video_output/video_yuv_mmx.o
-else
-ASM_OBJ = video_decoder_ref/vdec_idctmmx.o \
- video_output/video_yuv_mmx.o
-endif
endif
endif
rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
distclean: clean
- rm -f **/*.o **/*.so **/*~ *.log
- rm -f Makefile include/defs.h config.cache config.log
- rm -f vlc gmon.out core
+ rm -f */*/*.o plugins/*/*.so **/*~ *.log
+ rm -f Makefile include/defs.h include/config.h
+ rm -f config.status config.cache config.log
+ rm -f vlc gvlc gmon.out core
rm -rf .dep
install:
$(INSTALL) vlc $(prefix)/bin
+ $(INSTALL) gvlc $(prefix)/bin
mkdir -p $(prefix)/lib/videolan/vlc
$(INSTALL) $(PLUGIN_OBJ) $(prefix)/lib/videolan/vlc
$(INSTALL) share/*.psf $(prefix)/share/videolan/vlc
# Real targets
#
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
-ifeq ($(SYS), BEOS)
+ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
# ln -s ../vlc ./plugins/_APP_
else
$(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c
- @echo "compiling $*.o from $*.c"
- @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(CPP_OBJ): %.o: %.cpp
- @echo "compiling $*.o from $*.cpp"
- @$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
$(ASM_OBJ): %.o: Makefile.dep
$(ASM_OBJ): %.o: %.S
- @echo "assembling $*.o from $*.S"
- @$(CC) $(CFLAGS) -c -o $@ $<
+ $(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 -Xlinker -soname=$@ -o $@ $< plugins/_APP_
+ifeq ($(SYS),beos)
+ $(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else
- @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
+ $(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 $@ $<
+ifneq (,$(findstring bsd,$(SYS)))
+ $(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
else
- @$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
+ $(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 -Xlinker -soname=$@ -o $@ $< plugins/_APP_
+ifeq ($(SYS),beos)
+ $(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else
- @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
+ $(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 $@ $<
+ $(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_mga.so plugins/vout/vout_mga.so: %.so: %.c
- @echo "compiling $*.so from $*.c"
- @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
+ $(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
plugins/intf/intf_gnome.so: %.so: %.c
- @echo "compiling $*.so from $*.c"
- @$(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
+ $(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
plugins/vout/vout_gnome.so: %.so: %.c
- @echo "compiling $*.so from $*.c"
- @$(CC) $(CCFLAGS) $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXext -shared -o $@ $<
+ $(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 $@ $<
+ $(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 $@ $<
+ $(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
plugins/intf/intf_beos.so: %.so: %.cpp
- @echo "compiling $*.so from $*.cpp"
- @$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
+ $(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
plugins/vout/vout_beos.so: %.so: %.cpp
- @echo "compiling $*.so from $*.cpp"
- @$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
+ $(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
################################################################################