SYS=@SYS@
PLUGINS=@PLUGINS@
-SNAPSHOTDIR=vlc-@VLC_VERSION@
INSTALL=@INSTALL@
ARCH=@ARCH@
+
+exec_prefix=@exec_prefix@
prefix=@prefix@
+bindir=@bindir@
+datadir=@datadir@
+libdir=@libdir@
+
+CC=@CC@
+SHELL=@SHELL@
+
+LIB_SDL=@LIB_SDL@
+LIB_GLIDE=@LIB_GLIDE@
+LIB_GGI=@LIB_GGI@
#----------------- do not change anything below this line ----------------------
endif
# PROGRAM_BUILD is a complete identification of the build
-# ( we can't use fancy options with date since OSes like Solaris
-# or FreeBSD have strange date implementations )
+# (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
+# XXX: beos does not support hostname (how lame...)
#PROGRAM_BUILD = `date` $(USER)@`hostname`
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
-DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z A-Z)
+DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr a-z. A-Z_)
+
+# On Linux activate 64-bit off_t (by default under BSD)
+ifneq (,$(findstring linux,$(SYS)))
+DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
+endif
################################################################################
# Tuning and other variables - do not change anything except if you know
#
# Libraries
#
-
ifeq ($(SYS),gnu)
LIB += -lthreads -ldl
endif
LIB += -lpthread -ldl
endif
+ifneq (,$(findstring solaris,$(SYS)))
+LIB += -ldl -lsocket -lnsl -lpthread
+endif
+
ifeq ($(SYS),beos)
LIB += -lbe -lroot -lgame
else
endif
#
-# C compiler flags: compilation
+# C compiler flags: mainstream compilation
#
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
# Optimizations : don't compile debug versions with them
ifeq ($(OPTIMS),1)
-CFLAGS += -O6
-CFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
+CFLAGS += -O3
+CFLAGS += -ffast-math -funroll-loops
CFLAGS += -fomit-frame-pointer
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
-CFLAGS += -malign-double
# Optional Pentium Pro optimizations
ifneq (,$(findstring ppro,$(ARCH)))
-ifneq ($(SYS), BSD)
-CFLAGS += -march=pentiumpro
-endif
+CFLAGS += -march=pentiumpro -mcpu=pentiumpro
else
-CFLAGS += -march=pentium
+CFLAGS += -march=pentium -mcpu=pentium
endif
endif
CFLAGS += -mhard-float
endif
-# /debug
+#end of optimisations
endif
# Optional MMX optimizations for x86
CFLAGS += -DHAVE_MMX
endif
-# End of optimizations
+#
+# C compiler flags: plugin compilation
+#
+PCFLAGS += -fPIC
#
# C compiler flags: dependancies
#LCFLAGS += -s
#
-# Additionnal debugging flags
+# Debugging and profiling support (unless optimisations are active)
#
-
-# Debugging and profiling support
-ifneq ($(OPTIMS),0)
+ifneq ($(OPTIMS),1)
CFLAGS += -g
endif
#
# C Objects
#
-interface_obj = interface/main.o \
- interface/interface.o \
- interface/intf_msg.o \
- interface/intf_cmd.o \
- interface/intf_ctrl.o \
- interface/intf_console.o
-
-input_obj = input/input_vlan.o \
- input/input_file.o \
- input/input_netlist.o \
- input/input_network.o \
- input/input_ctrl.o \
- input/input_pcr.o \
- input/input_psi.o \
- input/input.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_spu.o \
- video_output/video_yuv.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 \
- ac3_decoder/ac3_mantissa.o \
- ac3_decoder/ac3_rematrix.o \
- ac3_decoder/ac3_imdct.o \
- ac3_decoder/ac3_downmix.o
-
-lpcm_decoder_obj = lpcm_decoder/lpcm_decoder_thread.o \
- lpcm_decoder/lpcm_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
-
-#??generic_decoder_obj = generic_decoder/generic_decoder.o
-# remeber to add it to OBJ
-
-video_parser_obj = video_parser/video_parser.o \
- video_parser/vpar_headers.o \
- video_parser/vpar_blocks.o \
- video_parser/vpar_synchro.o \
- video_parser/video_fifo.o
+INTERFACE = src/interface/main.o \
+ src/interface/interface.o \
+ src/interface/intf_msg.o \
+ src/interface/intf_cmd.o \
+ src/interface/intf_ctrl.o \
+ src/interface/intf_playlist.o \
+ src/interface/intf_channels.o \
+ src/interface/intf_console.o \
+ src/interface/intf_urldecode.o \
+
+INPUT = src/input/input_ext-dec.o \
+ src/input/input_ext-intf.o \
+ src/input/input_dec.o \
+ src/input/input_programs.o \
+ src/input/input_netlist.o \
+ src/input/input_clock.o \
+ src/input/input.o \
+ src/input/mpeg_system.o
+
+AUDIO_OUTPUT = src/audio_output/audio_output.o
+
+VIDEO_OUTPUT = src/video_output/video_output.o \
+ src/video_output/video_text.o \
+ src/video_output/video_spu.o \
+ src/video_output/video_yuv.o
+
+AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
+ src/ac3_decoder/ac3_decoder.o \
+ src/ac3_decoder/ac3_parse.o \
+ src/ac3_decoder/ac3_exponent.o \
+ src/ac3_decoder/ac3_bit_allocate.o \
+ src/ac3_decoder/ac3_mantissa.o \
+ src/ac3_decoder/ac3_rematrix.o \
+ src/ac3_decoder/ac3_imdct.o \
+ src/ac3_decoder/ac3_downmix.o \
+ src/ac3_decoder/ac3_downmix_c.o
+
+LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
+ src/lpcm_decoder/lpcm_decoder.o
+
+AUDIO_DECODER = src/audio_decoder/audio_decoder.o \
+ src/audio_decoder/adec_generic.o \
+ src/audio_decoder/adec_layer1.o \
+ src/audio_decoder/adec_layer2.o \
+ src/audio_decoder/adec_math.o
+
+SPU_DECODER = src/spu_decoder/spu_decoder.o
+
+#GEN_DECODER = src/generic_decoder/generic_decoder.o
+
+VIDEO_PARSER = src/video_parser/video_parser.o \
+ src/video_parser/vpar_headers.o \
+ src/video_parser/vpar_blocks.o \
+ src/video_parser/vpar_synchro.o \
+ src/video_parser/video_fifo.o
+
+VIDEO_DECODER = src/video_decoder/video_decoder.o
+
+MISC = src/misc/mtime.o \
+ src/misc/tests.o \
+ src/misc/rsc_files.o \
+ src/misc/modules.o \
+ src/misc/netutils.o
+
+
+C_OBJ = $(INTERFACE) \
+ $(INPUT) \
+ $(VIDEO_OUTPUT) \
+ $(AUDIO_OUTPUT) \
+ $(AC3_DECODER) \
+ $(LPCM_DECODER) \
+ $(AUDIO_DECODER) \
+ $(SPU_DECODER) \
+ $(GEN_DECODER) \
+ $(VIDEO_PARSER) \
+ $(VIDEO_DECODER) \
+ $(MISC)
-ifneq (,$(findstring mmx,$(ARCH)))
- vdec_motion_inner = video_decoder/vdec_motion_inner_mmx.o
-else
- vdec_motion_inner = video_decoder/vdec_motion_inner.o
-endif
-
-video_decoder_obj = video_decoder/video_decoder.o \
- video_decoder/vdec_motion.o \
- video_decoder/vdec_idct.o \
- $(vdec_motion_inner)
-
-misc_obj = misc/mtime.o \
- misc/tests.o \
- misc/rsc_files.o \
- misc/netutils.o \
- misc/playlist.o \
- misc/plugins.o \
- misc/decoder_fifo.o
-
-
-C_OBJ = $(interface_obj) \
- $(input_obj) \
- $(audio_output_obj) \
- $(video_output_obj) \
- $(ac3_decoder_obj) \
- $(lpcm_decoder_obj) \
- $(audio_decoder_obj) \
- $(spu_decoder_obj) \
- $(generic_decoder_obj) \
- $(video_parser_obj) \
- $(video_decoder_obj) \
- $(vlan_obj) \
- $(misc_obj)
+#
+# CPP Objects
+#
ifeq ($(SYS),beos)
-CPP_OBJ = misc/beos_specific.o
+CPP_OBJ = src/misc/beos_specific.o
endif
#
#
ifneq (,$(findstring 86,$(ARCH)))
ifneq (,$(findstring mmx,$(ARCH)))
-ASM_OBJ = video_decoder/vdec_idctmmx.o \
- video_output/video_yuv_mmx.o
+ASM_OBJ =
endif
endif
#
# Plugins
#
-PLUGINS := $(PLUGINS:%=lib/%.so)
+PLUGIN_ALSA = plugins/alsa/alsa.o \
+ plugins/alsa/aout_alsa.o
-PLUGIN_BEOS = plugins/beos/beos.o \
+PLUGIN_BEOS = plugins/beos/beos.o \
plugins/beos/aout_beos.o \
plugins/beos/intf_beos.o \
- plugins/beos/vout_beos.o
+ plugins/beos/vout_beos.o \
+ plugins/beos/DrawingTidbits.o \
+ plugins/beos/TransportButton.o
-PLUGIN_DSP = plugins/dsp/dsp.o \
- plugins/dsp/aout_dsp.o \
+PLUGIN_DSP = plugins/dsp/dsp.o \
+ plugins/dsp/aout_dsp.o
-PLUGIN_DUMMY = plugins/dummy/dummy.o \
+PLUGIN_DUMMY = plugins/dummy/dummy.o \
plugins/dummy/aout_dummy.o \
plugins/dummy/intf_dummy.o \
plugins/dummy/vout_dummy.o
-PLUGIN_ESD = plugins/esd/esd.o \
+PLUGIN_DVD = plugins/dvd/dvd.o \
+ plugins/dvd/input_dvd.o \
+ plugins/dvd/dvd_netlist.o \
+ plugins/dvd/dvd_ioctl.o \
+ plugins/dvd/dvd_ifo.o \
+ plugins/dvd/dvd_udf.o \
+ plugins/dvd/dvd_css.o
+
+PLUGIN_ESD = plugins/esd/esd.o \
plugins/esd/aout_esd.o
-PLUGIN_FB = plugins/fb/fb.o \
- plugins/fb/intf_fb.o \
+PLUGIN_FB = plugins/fb/fb.o \
plugins/fb/vout_fb.o
-PLUGIN_GGI = plugins/ggi/ggi.o \
- plugins/ggi/intf_ggi.o \
+PLUGIN_GGI = plugins/ggi/ggi.o \
plugins/ggi/vout_ggi.o
-PLUGIN_SDL = plugins/sdl/sdl.o \
- plugins/sdl/intf_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 \
+PLUGIN_GLIDE = plugins/glide/glide.o \
plugins/glide/vout_glide.o
-PLUGIN_GNOME = plugins/gnome/gnome.o \
+PLUGIN_GTK = plugins/gtk/gtk.o \
+ plugins/gtk/intf_gtk.o \
+ plugins/gtk/gtk_callbacks.o \
+ plugins/gtk/gtk_interface.o \
+ plugins/gtk/gtk_support.o \
+ plugins/gtk/gtk_playlist.o
+
+PLUGIN_GNOME = plugins/gnome/gnome.o \
plugins/gnome/intf_gnome.o \
- plugins/gnome/intf_gnome_callbacks.o \
- plugins/gnome/intf_gnome_interface.o \
- plugins/gnome/intf_gnome_support.o \
- plugins/gnome/vout_gnome.o
+ plugins/gnome/gnome_callbacks.o \
+ plugins/gnome/gnome_interface.o \
+ plugins/gnome/gnome_support.o
+
+PLUGIN_QT = plugins/qt/qt.o \
+ plugins/qt/intf_qt.o
-PLUGIN_MGA = plugins/mga/mga.o \
- plugins/mga/intf_mga.o \
+PLUGIN_KDE = plugins/kde/kde.o \
+ plugins/kde/intf_kde.o
+
+PLUGIN_IDCT = plugins/idct/idct.o \
+ plugins/idct/idct_common.o
+
+PLUGIN_IDCTCLASSIC = plugins/idct/idctclassic.o \
+ plugins/idct/idct_common.o
+
+PLUGIN_IDCTMMX = plugins/idct/idctmmx.o \
+ plugins/idct/idct_common.o
+
+PLUGIN_IDCTMMXEXT = plugins/idct/idctmmxext.o \
+ plugins/idct/idct_common.o
+
+PLUGIN_MGA = plugins/mga/mga.o \
plugins/mga/vout_mga.o
-PLUGIN_X11 = plugins/x11/x11.o \
- plugins/x11/intf_x11.o \
+PLUGIN_MOTION = plugins/motion/motion.o \
+ plugins/motion/vdec_motion_common.o \
+ plugins/motion/vdec_motion_inner.o
+
+PLUGIN_MOTIONMMX = plugins/motion/motionmmx.o \
+ plugins/motion/vdec_motion_common.o \
+ plugins/motion/vdec_motion_inner_mmx.o
+
+PLUGIN_MOTIONMMXEXT = plugins/motion/motionmmxext.o \
+ plugins/motion/vdec_motion_common.o \
+ plugins/motion/vdec_motion_inner_mmxext.o
+
+PLUGIN_NCURSES = plugins/text/ncurses.o \
+ plugins/text/intf_ncurses.o
+
+PLUGIN_NULL = plugins/null/null.o
+
+PLUGIN_PS = plugins/mpeg/ps.o \
+ plugins/mpeg/input_ps.o
+
+PLUGIN_SDL = plugins/sdl/sdl.o \
+ plugins/sdl/vout_sdl.o \
+ plugins/sdl/aout_sdl.o
+
+PLUGIN_TS = plugins/mpeg/ts.o \
+ plugins/mpeg/input_ts.o
+
+PLUGIN_X11= plugins/x11/x11.o \
plugins/x11/vout_x11.o
-PLUGIN_YUV = plugins/yuv/yuv.o \
+PLUGIN_YUV = plugins/yuv/yuv.o \
plugins/yuv/video_yuv.o \
- plugins/yuv/video_yuv8.o \
- plugins/yuv/video_yuv15.o \
- plugins/yuv/video_yuv16.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_yuv15.o \
- plugins/yuvmmx/video_yuv16.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_ALSA)
+ plugins/yuv/transforms_yuv.o
+
+PLUGIN_YUVMMX = plugins/yuv/yuvmmx.o \
+ plugins/yuv/video_yuvmmx.o \
+ plugins/yuv/transforms_yuvmmx.o
+
+STD_PLUGIN_OBJ = \
+ $(PLUGIN_ALSA) \
+ $(PLUGIN_DSP) \
+ $(PLUGIN_DUMMY) \
+ $(PLUGIN_DVD) \
+ $(PLUGIN_ESD) \
+ $(PLUGIN_FB) \
+ $(PLUGIN_GGI) \
+ $(PLUGIN_IDCT) \
+ $(PLUGIN_IDCTCLASSIC) \
+ $(PLUGIN_IDCTMMX) \
+ $(PLUGIN_IDCTMMXEXT) \
+ $(PLUGIN_MGA) \
+ $(PLUGIN_MOTION) \
+ $(PLUGIN_MOTIONMMX) \
+ $(PLUGIN_MOTIONMMXEXT) \
+ $(PLUGIN_NCURSES) \
+ $(PLUGIN_NULL) \
+ $(PLUGIN_PS) \
+ $(PLUGIN_SDL) \
+ $(PLUGIN_TS) \
+ $(PLUGIN_X11) \
+ $(PLUGIN_YUV) \
+ $(PLUGIN_YUVMMX)
+
+# list duplicates
+STD_PLUGIN_COMMON = plugins/idct/idct_common.o \
+ plugins/motion/vdec_motion_common.o
+
+# filter out duplicates from the plugin object lists
+STD_PLUGIN_OBJ := $(filter-out $(STD_PLUGIN_COMMON), \
+ $(STD_PLUGIN_OBJ)) $(STD_PLUGIN_COMMON)
+
+NONSTD_PLUGIN_OBJ = \
+ $(PLUGIN_GLIDE) \
+ $(PLUGIN_GTK) \
+ $(PLUGIN_GNOME)
+
+NONSTD_CPP_PLUGIN_OBJ = \
+ $(PLUGIN_BEOS) \
+ $(PLUGIN_QT) \
+ $(PLUGIN_KDE)
+
#
# Other lists of files
#
-C_OBJ := $(C_OBJ:%.o=src/%.o)
-CPP_OBJ := $(CPP_OBJ:%.o=src/%.o)
-ASM_OBJ := $(ASM_OBJ:%.o=src/%.o)
-sources_c := $(C_OBJ:%.o=%.c)
-dependancies := $(sources_c:%.c=.dep/%.d)
+objects := $(C_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ) $(NONSTD_PLUGIN_OBJ)
+cdependancies := $(objects:%.o=.dep/%.d)
+cppobjects := $(CPP_OBJ) $(NONSTD_CPP_PLUGIN_OBJ)
+cppdependancies := $(cppobjects:%.o=.dep/%.dpp)
# All symbols must be exported
export
all: vlc @ALIASES@ plugins
clean:
- rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
- rm -f vlc @ALIASES@ lib/*.so
+ rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
+ rm -f plugins/*/*.o src/*/*.o lib/*.so
+ rm -f vlc gvlc kvlc qvlc
distclean: clean
rm -f src/*/*.o plugins/*/*.o **/*~ *.log
rm -f config.status config.cache config.log
rm -f gmon.out core build-stamp
rm -rf .dep
- 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
- # 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
- $(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
- $(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
+ mkdir -p $(DESTDIR)$(bindir)
+ $(INSTALL) vlc $(DESTDIR)$(bindir)
+# ugly
+ for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
+ mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
+ $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
+ mkdir -p $(DESTDIR)$(datadir)/videolan
+ $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
+ $(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
+ $(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
show:
@echo CC: $(CC)
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
+ @echo C_OBJ: $(C_OBJ)
+ @echo CPP_OBJ: $(CPP_OBJ)
+ @echo STD_PLUGIN_OBJ: $(STD_PLUGIN_OBJ)
+ @echo NONSTD_PLUGIN_OBJ: $(NONSTD_PLUGIN_OBJ)
+ @echo NONSTD_CPP_PLUGIN_OBJ: $(NONSTD_CPP_PLUGIN_OBJ)
+ @echo objects: $(objects)
+ @echo cppobjects: $(cppobjects)
# ugliest of all, but I have no time to do it -- sam
snapshot:
- rm -rf /tmp/${SNAPSHOTDIR}
- mkdir /tmp/${SNAPSHOTDIR}
- cp -a * /tmp/${SNAPSHOTDIR}
- (cd /tmp/${SNAPSHOTDIR} ; \
- make distclean ; \
- find . -type d -name CVS | xargs rm -rf ; \
- find . -type f -name '.*.swp' | xargs rm -f ; \
- find . -type f -name '.cvsignore' | xargs rm -f ; \
- cd .. ; \
- tar czvf ${SNAPSHOTDIR}.tar.gz ${SNAPSHOTDIR} ; \
- tar cIvf ${SNAPSHOTDIR}.tar.bz2 ${SNAPSHOTDIR} )
- rm -rf /tmp/${SNAPSHOTDIR}
- mv /tmp/${SNAPSHOTDIR}.tar.gz ..
- mv /tmp/${SNAPSHOTDIR}.tar.bz2 ..
- @echo "Sources are in ../${SNAPSHOTDIR}.tar.[gz,bz2]"
+ rm -rf /tmp/vlc-@VLC_VERSION@* /tmp/vlc-@VLC_VERSION@nocss*
+ # copy archive in /tmp
+ find -type d | grep -v CVS | grep -v '\.dep' | while read i ; \
+ do mkdir -p /tmp/vlc-@VLC_VERSION@/$$i ; \
+ done
+ find debian -mindepth 1 -maxdepth 1 -type d | \
+ while read i ; do rm -rf /tmp/vlc-@VLC_VERSION@/$$i ; done
+ # .c .h .in .cpp
+ find include src plugins -type f -name '*.[chi]*' | while read i ; \
+ do cp $$i /tmp/vlc-@VLC_VERSION@/$$i ; \
+ done
+ # copy misc files
+ cp vlc.spec AUTHORS COPYING ChangeLog INSTALL README TODO \
+ Makefile.in Makefile.dep configure configure.in install-sh \
+ config.sub config.guess todo.pl \
+ /tmp/vlc-@VLC_VERSION@/
+ for file in control control-css vlc-gtk.menu vlc.copyright vlc.docs \
+ changelog changelog-css rules rules-css vlc.1 vlc.dirs \
+ vlc.menu ; do \
+ cp debian/$$file /tmp/vlc-@VLC_VERSION@/debian/ ; done
+ for file in default8x16.psf default8x9.psf gvlc.png vlc.png \
+ gvlc.xpm vlc.xpm ; do \
+ cp share/$$file /tmp/vlc-@VLC_VERSION@/share/ ; done
+
+ # build css-enabled archives
+ (cd /tmp ; tar cf vlc-@VLC_VERSION@.tar vlc-@VLC_VERSION@ ; \
+ bzip2 -f -9 < vlc-@VLC_VERSION@.tar \
+ > vlc-@VLC_VERSION@.tar.bz2 ; \
+ gzip -f -9 vlc-@VLC_VERSION@.tar )
+ mv /tmp/vlc-@VLC_VERSION@.tar.gz /tmp/vlc-@VLC_VERSION@.tar.bz2 ..
+
+ # clean up
+ rm -rf /tmp/vlc-@VLC_VERSION@*
+
+plugins: $(PLUGINS:%=lib/%.so)
FORCE:
#
-# Real targets
-#
-vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
-ifeq ($(SYS),beos)
- $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
- rm -f ./plugins/_APP_
- ln -s ../vlc ./plugins/_APP_
-else
- $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
-endif
-
-#
-# Gnome and Framebuffer aliases - don't add new aliases which could bloat
+# GTK/Gnome and Framebuffer aliases - don't add new aliases which could bloat
# the namespace
#
-gvlc fbvlc: vlc
+gvlc kvlc qvlc: vlc
rm -f $@ && ln -s vlc $@
-plugins: $(PLUGINS)
#
# Generic rules (see below)
#
-$(dependancies): %.d: FORCE
+$(cdependancies): %.d: FORCE
+ @$(MAKE) -s --no-print-directory -f Makefile.dep $@
+
+$(cppdependancies): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(C_OBJ): %.o: Makefile.dep
$(C_OBJ): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+$(CPP_OBJ): %.o: Makefile.dep
+$(CPP_OBJ): %.o: .dep/%.dpp
$(CPP_OBJ): %.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
$(ASM_OBJ): %.o: %.S
$(CC) $(CFLAGS) -c -o $@ $<
-#$(PLUGIN_OBJ): %.so: Makefile.dep
-#$(PLUGIN_OBJ): %.so: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: Makefile.dep
+$(STD_PLUGIN_OBJ): %.o: .dep/%.d
+$(STD_PLUGIN_OBJ): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
-lib/beos.so: $(PLUGIN_BEOS)
- $(CC) $(CFLAGS) $(LCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+$(PLUGIN_GTK): %.o: Makefile.dep
+$(PLUGIN_GTK): %.o: .dep/%.d
+$(PLUGIN_GTK): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<
+
+$(PLUGIN_GNOME): %.o: Makefile.dep
+$(PLUGIN_GNOME): %.o: .dep/%.d
+$(PLUGIN_GNOME): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) `gnome-config --cflags gtk gnomeui` -c -o $@ $<
+
+$(PLUGIN_GLIDE): %.o: Makefile.dep
+$(PLUGIN_GLIDE): %.o: .dep/%.d
+$(PLUGIN_GLIDE): %.o: %.c
+ $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/glide -c -o $@ $<
+
+$(PLUGIN_QT): %.o: Makefile.dep
+$(PLUGIN_QT): %.o: .dep/%.dpp
+$(PLUGIN_QT): %.o: %.moc
+ $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/qt -c -o $@ $(<:%.moc=%.cpp)
+$(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
+ moc -i $< -o $@
+
+$(PLUGIN_KDE): %.o: Makefile.dep
+$(PLUGIN_KDE): %.o: .dep/%.dpp
+$(PLUGIN_KDE): %.o: %.cpp
+ $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -fno-rtti -c -o $@ $<
+
+$(PLUGIN_BEOS): %.o: Makefile.dep
+$(PLUGIN_BEOS): %.o: .dep/%.dpp
$(PLUGIN_BEOS): %.o: %.cpp
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
+
+#
+# Main application target
+#
+
+vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
+ifeq ($(SYS),beos)
+ $(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
+ rm -f ./plugins/_APP_
+ ln -s ../vlc ./plugins/_APP_
+else
+ $(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic @DYNAMIC_FLAG@ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
+endif
+
+#
+# Plugin targets
+#
+
+lib/beos.so: $(PLUGIN_BEOS)
+ $(CC) $(PCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_ -lbe -lgame -lroot -ltracker
lib/esd.so: $(PLUGIN_ESD)
ifneq (,$(findstring bsd,$(SYS)))
- ld -shared -lesd -o $@ $^
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -lesd
else
- ld -shared -laudiofile -lesd -o $@ $^
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -laudiofile -lesd
endif
-$(PLUGIN_ESD): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
lib/dsp.so: $(PLUGIN_DSP)
- ld -shared -o $@ $^
-$(PLUGIN_DSP): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^
-lib/alsa.so: $(PLUGIN_ALSA)
- ld -shared -o $@ $^
-$(PLUGIN_ALSA): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+lib/qt.so: $(PLUGIN_QT)
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -lqt
-lib/dummy.so: $(PLUGIN_DUMMY)
- ld -shared -o $@ $^
-$(PLUGIN_DUMMY): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+lib/kde.so: $(PLUGIN_KDE)
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -lkdeui -lkdecore -lqt -ldl
+
+lib/alsa.so: $(PLUGIN_ALSA)
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -lasound
lib/fb.so: $(PLUGIN_FB)
- ld -shared -o $@ $^
-$(PLUGIN_FB): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^
lib/x11.so: $(PLUGIN_X11)
- ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
-$(PLUGIN_X11): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
lib/mga.so: $(PLUGIN_MGA)
- ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
-$(PLUGIN_MGA): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -L/usr/X11R6/lib -lX11 -lXext
+
+lib/gtk.so: $(PLUGIN_GTK)
+ $(CC) $(PCFLAGS) -shared -o $@ $^ `gtk-config --libs gtk | sed 's,-rdynamic,,'`
lib/gnome.so: $(PLUGIN_GNOME)
- ld -shared `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` -o $@ $^
-$(PLUGIN_GNOME): %.o: %.c
- $(CC) $(CFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^ `gnome-config --libs gnomeui | sed 's,-rdynamic,,'`
lib/glide.so: $(PLUGIN_GLIDE)
- ld -shared -lglide2x -o $@ $^
-$(PLUGIN_GLIDE): %.o: %.c
- $(CC) $(CFLAGS) -I/usr/include/glide -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GLIDE)
lib/ggi.so: $(PLUGIN_GGI)
- ld -shared -lggi -o $@ $^
-$(PLUGIN_GGI): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_GGI)
lib/sdl.so: $(PLUGIN_SDL)
- ld -shared -lSDL -o $@ $^
-$(PLUGIN_SDL): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(CC) $(PCFLAGS) -shared -o $@ $^ $(LIB_SDL)
+
+lib/ncurses.so: $(PLUGIN_NCURSES)
+ $(CC) $(PCFLAGS) -shared -o $@ $^ -lncurses
-lib/yuv.so: $(PLUGIN_YUV)
ifeq ($(SYS),beos)
- $(CC) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
-else
- ld -shared -o $@ $^
-endif
-$(PLUGIN_YUV): %.o: %.c
- $(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
+lib/null.so: $(PLUGIN_NULL)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/ps.so: $(PLUGIN_PS)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/ts.so: $(PLUGIN_TS)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/dvd.so: $(PLUGIN_DVD)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/dummy.so: $(PLUGIN_DUMMY)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/yuv.so: $(PLUGIN_YUV)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
lib/yuvmmx.so: $(PLUGIN_YUVMMX)
-ifeq ($(SYS),beos)
- $(CC) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/motion.so: $(PLUGIN_MOTION)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/idct.so: $(PLUGIN_IDCT)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/idctmmx.so: $(PLUGIN_IDCTMMX)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
+
+lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
+ $(CC) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
else
- ld -shared -o $@ $^
+lib/null.so: $(PLUGIN_NULL)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/ps.so: $(PLUGIN_PS)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/ts.so: $(PLUGIN_TS)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/dvd.so: $(PLUGIN_DVD)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/dummy.so: $(PLUGIN_DUMMY)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/yuv.so: $(PLUGIN_YUV)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/yuvmmx.so: $(PLUGIN_YUVMMX)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/motion.so: $(PLUGIN_MOTION)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/motionmmx.so: $(PLUGIN_MOTIONMMX)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/idct.so: $(PLUGIN_IDCT)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/idctmmx.so: $(PLUGIN_IDCTMMX)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
+
+lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT)
+ $(CC) $(PCFLAGS) -shared -o $@ $^
endif
-$(PLUGIN_YUVMMX): %.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
################################################################################
# Note on generic rules and dependancies