################################################################################
# Debugging mode on or off (set to 1 to activate)
-DEBUG=0
+DEBUG=@DEBUG@
+STATS=@STATS@
+OPTIMS=@OPTIMS@
SYS=@SYS@
PLUGINS=@PLUGINS@
PROGRAM_OPTIONS += DEBUG
DEFINE += -DDEBUG
endif
+ifeq ($(STATS),1)
+PROGRAM_OPTIONS += DEBUG
+DEFINE += -DSTATS
+endif
# PROGRAM_BUILD is a complete identification of the build
# ( we can't use fancy options with date since OSes like Solaris
endif
# Optimizations : don't compile debug versions with them
-ifeq ($(DEBUG),0)
+ifeq ($(OPTIMS),1)
CFLAGS += -O6
CFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
CFLAGS += -fomit-frame-pointer
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
CFLAGS += -malign-double
-# Eventual Pentium Pro optimizations
+# Optional Pentium Pro optimizations
ifneq (,$(findstring ppro,$(ARCH)))
ifneq ($(SYS), BSD)
CFLAGS += -march=pentiumpro
else
CFLAGS += -march=pentium
endif
-# Eventual MMX optimizations for x86
-ifneq (,$(findstring mmx,$(ARCH)))
-CFLAGS += -DHAVE_MMX
-endif
endif
# Optimizations for PowerPC
CFLAGS += -mhard-float
endif
-# End of optimizations
+# /debug
endif
+# Optional MMX optimizations for x86
+ifneq (,$(findstring mmx,$(ARCH)))
+CFLAGS += -DHAVE_MMX
+endif
+
+# End of optimizations
+
#
# C compiler flags: dependancies
#
#
# Debugging and profiling support
-ifneq ($(DEBUG),0)
-ifeq ($(SYS),beos)
+ifneq ($(OPTIMS),0)
CFLAGS += -g
-else
-CFLAGS += -pg
-endif
endif
#################################################################################
PLUGIN_SDL = plugins/sdl/sdl.o \
plugins/sdl/intf_sdl.o \
- plugins/sdl/vout_sdl.o
+ plugins/sdl/vout_sdl.o
+# plugins/sdl/video_yuv.o \
+# plugins/sdl/video_yuvall.o
+
PLUGIN_GLIDE = plugins/glide/glide.o \
plugins/glide/intf_glide.o \
plugins/yuv/video_yuv24.o \
plugins/yuv/video_yuv32.o
+
PLUGIN_YUVMMX = plugins/yuvmmx/yuvmmx.o \
plugins/yuvmmx/video_yuv.o \
plugins/yuvmmx/video_yuv8.o \
plugins/yuvmmx/video_yuv24.o \
plugins/yuvmmx/video_yuv32.o
+PLUGIN_ALSA = plugins/alsa/alsa.o \
+ plugins/alsa/aout_alsa.o
+
PLUGIN_OBJ = $(PLUGIN_BEOS) $(PLUGIN_DSP) $(PLUGIN_DUMMY) $(PLUGIN_ESD) \
$(PLUGIN_FB) $(PLUGIN_GGI) $(PLUGIN_GLIDE) $(PLUGIN_GNOME) \
$(PLUGIN_MGA) $(PLUGIN_X11) $(PLUGIN_YUV) $(PLUGIN_YUVMMX) \
- $(PLUGIN_SDL)
+ $(PLUGIN_SDL) $(PLUGIN_ALSA)
#
# Other lists of files
#
rm -f config.status config.cache config.log
rm -f gmon.out core build-stamp
rm -rf .dep
- rm -rf debian/tmp debian/*.debhelper debian/*.substvars
+ rm -rf debian/tmp debian/files debian/*.debhelper debian/*.substvars
find debian/* -type d -maxdepth 0 -name 'vlc-*' | xargs rm -rf
install:
mkdir -p $(prefix)/bin
$(INSTALL) vlc $(prefix)/bin
- for alias in @ALIASES@ ; do ln -s vlc $(prefix)/bin/$$alias ; done
+ # ugly
+ for alias in "" @ALIASES@ ; do if test $$alias ; then ln -s vlc $(prefix)/bin/$$alias ; fi ; done
mkdir -p $(prefix)/lib/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS) $(prefix)/lib/videolan/vlc
mkdir -p $(prefix)/share/videolan
snapshot:
rm -rf /tmp/${SNAPSHOTDIR}
mkdir /tmp/${SNAPSHOTDIR}
- cp -r * /tmp/${SNAPSHOTDIR}
+ cp -a * /tmp/${SNAPSHOTDIR}
(cd /tmp/${SNAPSHOTDIR} ; \
make distclean ; \
find . -type d -name CVS | xargs rm -rf ; \
$(PLUGIN_DSP): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+lib/alsa.so: $(PLUGIN_ALSA)
+ ld -shared -o $@ $^
+$(PLUGIN_ALSA): %.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
lib/dummy.so: $(PLUGIN_DUMMY)
ld -shared -o $@ $^
$(PLUGIN_DUMMY): %.o: %.c
ld -shared -o $@ $^
endif
$(PLUGIN_YUV): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
lib/yuvmmx.so: $(PLUGIN_YUVMMX)
ifeq ($(SYS),beos)