changeset 22528:8bcff5c7e387

Give more descriptive names to the source and library variables and split between common, MPlayer-specific and MEncoder-specific parts.
author diego
date Tue, 13 Mar 2007 12:10:57 +0000
parents 5dc92a83d58a
children 1f6b48b2abcd
files Gui/Makefile dvdread/Makefile input/Makefile liba52/Makefile libaf/Makefile libao2/Makefile libass/Makefile libdvdcss/Makefile libfaad2/Makefile libmenu/Makefile libmpcodecs/Makefile libmpdemux/Makefile libmpeg2/Makefile libvo/Makefile loader/Makefile mp3lib/Makefile mpcommon.mak osdep/Makefile stream/Makefile tremor/Makefile
diffstat 20 files changed, 177 insertions(+), 182 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/Gui/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,6 +1,6 @@
 include ../config.mak
 
-LIBNAME = libgui.a
+LIBNAME_MPLAYER = libgui.a
 
 CFLAGS = -I../loader -I./wm -I./skin
 #CFLAGS += -DDEBUG
@@ -8,7 +8,7 @@
 CFLAGS-$(CONFIG_LIBAVUTIL)   += -I../libavutil
 
 ifeq ($(TARGET_WIN32),yes)
-SRCS = win32/dialogs.c \
+SRCS_MPLAYER = win32/dialogs.c \
        win32/gui.c \
        win32/interface.c \
        win32/playlist.c \
@@ -18,7 +18,7 @@
        win32/wincfg.c \
 
 else
-SRCS = wm/ws.c \
+SRCS_MPLAYER = wm/ws.c \
        wm/wsxdnd.c \
        app.c \
        interface.c \
--- a/dvdread/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/dvdread/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,6 +1,8 @@
 include ../config.mak
 
-SRCS = dvd_input.c \
+LIBNAME_COMMON = libdvdread.a
+
+SRCS_COMMON = dvd_input.c \
        dvd_reader.c \
        dvd_udf.c \
        ifo_print.c \
@@ -9,8 +11,6 @@
        nav_read.c \
        md5.c \
 
-LIBNAME = libdvdread.a
-
 CFLAGS= -D__USE_UNIX98 -D_GNU_SOURCE -DSTDC_HEADERS \
 	-DHAVE_LIMITS_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
--- a/input/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/input/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,10 +1,10 @@
 
 include ../config.mak
 
-LIBNAME = libinput.a
+LIBNAME_MPLAYER = libinput.a
 
-SRCS=input.c
-SRCS-$(JOYSTICK) += joystick.c
-SRCS-$(LIRC)     += lirc.c
+SRCS_MPLAYER              = input.c
+SRCS_MPLAYER-$(JOYSTICK) += joystick.c
+SRCS_MPLAYER-$(LIRC)     += lirc.c
 
 include ../mpcommon.mak
--- a/liba52/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/liba52/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,9 @@
 
-LIBNAME = liba52.a
+LIBNAME_COMMON = liba52.a
 
 include ../config.mak
 
-SRCS    = crc.c \
+SRCS_COMMON = crc.c \
           resample.c \
           bit_allocate.c \
           bitstream.c \
@@ -13,7 +13,7 @@
 
 include ../mpcommon.mak
 
-test:        $(LIBNAME) test.c
+test: $(LIBNAME_COMMON) test.c
 	$(CC) $(CFLAGS)  test.c ../cpudetect.c -o test ../osdep/libosdep.a ./liba52.a -lm
 
 distclean::
--- a/libaf/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libaf/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,8 +1,8 @@
 include ../config.mak
 
-LIBNAME = libaf.a
+LIBNAME_COMMON = libaf.a
 
-SRCS=af.c \
+SRCS_COMMON = af.c \
      af_center.c \
      af_channels.c \
      af_comp.c \
@@ -29,8 +29,8 @@
      window.c \
      $(AF_SRCS) \
 
-SRCS-$(CONFIG_LIBAVCODEC)    += af_lavcresample.c
-SRCS-$(CONFIG_LIBAVCODEC_SO) += af_lavcresample.c
+SRCS_COMMON-$(CONFIG_LIBAVCODEC)    += af_lavcresample.c
+SRCS_COMMON-$(CONFIG_LIBAVCODEC_SO) += af_lavcresample.c
 
 CFLAGS-$(CONFIG_LIBAVUTIL)   += -I../libavutil
 CFLAGS-$(CONFIG_LIBAVCODEC)  += -I../libavcodec
--- a/libao2/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libao2/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,8 +1,8 @@
 include ../config.mak
 
-LIBNAME = libao2.a
+LIBNAME_MPLAYER = libao2.a
 
-SRCS=audio_out.c \
+SRCS_MPLAYER = audio_out.c \
      ao_mpegpes.c \
      ao_null.c \
      ao_pcm.c \
--- a/libass/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libass/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,9 @@
 
 include ../config.mak
 
-LIBNAME=libass.a
+LIBNAME_COMMON = libass.a
 
-SRCS = ass.c \
+SRCS_COMMON = ass.c \
        ass_cache.c \
        ass_fontconfig.c \
        ass_render.c \
--- a/libdvdcss/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libdvdcss/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,14 +1,14 @@
 include ../config.mak
 
-SRCS = css.c \
+LIBNAME_COMMON = libdvdcss.a
+
+SRCS_COMMON = css.c \
        device.c \
        error.c \
        ioctl.c \
        libdvdcss.c \
        #bsdi_ioctl \
 
-LIBNAME = libdvdcss.a
-
 CFLAGS= -D__USE_UNIX98 -D_GNU_SOURCE \
 	-DHAVE_LIMITS_H -DHAVE_ERRNO_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H \
 	-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"1.2.9\"
--- a/libfaad2/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libfaad2/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,8 @@
-
-LIBNAME = libfaad2.a
-
 include ../config.mak
 
-SRCS    = bits.c \
+LIBNAME_COMMON = libfaad2.a
+
+SRCS_COMMON = bits.c \
           cfft.c \
           common.c \
           decoder.c \
--- a/libmenu/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libmenu/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,9 @@
 
 include ../config.mak
 
-LIBNAME = libmenu.a
+LIBNAME_MPLAYER = libmenu.a
 
-SRCS= menu.c \
+SRCS_MPLAYER = menu.c \
       vf_menu.c \
       menu_cmdlist.c  \
       menu_pt.c \
@@ -13,6 +13,6 @@
       menu_console.c \
       menu_param.c \
 
-SRCS-$(DVBIN) += menu_dvbin.c
+SRCS_MPLAYER-$(DVBIN) += menu_dvbin.c
 
 include ../mpcommon.mak
--- a/libmpcodecs/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libmpcodecs/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,12 +1,10 @@
 
 include ../config.mak
 
-LIBNAME = libmpcodecs.a
-ifeq ($(MENCODER),yes)
-LIBNAME2 = libmpencoders.a
-endif
+LIBNAME_COMMON   = libmpcodecs.a
+LIBNAME_MENCODER = libmpencoders.a
 
-SRCS = native/nuppelvideo.c \
+SRCS_COMMON = native/nuppelvideo.c \
        native/RTjpegN.c \
        native/xa_gsm.c \
        img_format.c \
@@ -97,57 +95,57 @@
        vf_yuy2.c \
        vf_yvu9.c \
 
-SRCS-$(CONFIG_ASS)            += vf_ass.c
+SRCS_COMMON-$(CONFIG_ASS)            += vf_ass.c
 # These filters use private headers and do not work with shared libavcodec.
-SRCS-$(CONFIG_LIBAVCODEC)     += vf_fspp.c \
+SRCS_COMMON-$(CONFIG_LIBAVCODEC)     += vf_fspp.c \
                                  vf_geq.c \
                                  vf_mcdeint.c \
                                  vf_qp.c \
                                  vf_spp.c \
                                  vf_uspp.c \
 
-SRCS-$(CONFIG_LIBAVCODEC)     += ad_ffmpeg.c vd_ffmpeg.c vf_lavc.c vf_lavcdeint.c
-SRCS-$(CONFIG_LIBAVCODEC_SO)  += ad_ffmpeg.c vd_ffmpeg.c vf_lavc.c vf_lavcdeint.c
-SRCS-$(CONFIG_LIBPOSTPROC)    += vf_pp.c
-SRCS-$(CONFIG_LIBPOSTPROC_SO) += vf_pp.c
-SRCS-$(FAAD)                  += ad_faad.c
-SRCS-$(JPEG)                  += vd_ijpg.c
-SRCS-$(LIBA52)                += ad_liba52.c
-SRCS-$(LIBDV)                 += ad_libdv.c vd_libdv.c
-SRCS-$(LIBMAD)                += ad_libmad.c
-SRCS-$(LIBMPEG2)              += vd_libmpeg2.c
-SRCS-$(LIBTHEORA)             += vd_theora.c
-SRCS-$(LIBVORBIS)             += ad_libvorbis.c
-SRCS-$(MP3LIB)                += ad_mp3lib.c
-SRCS-$(MUSEPACK)              += ad_mpc.c
-SRCS-$(PNG)                   += vd_mpng.c vf_screenshot.c
-SRCS-$(QTX_CODECS)            += ad_qtaudio.c vd_qtvideo.c
-SRCS-$(REAL_CODECS)           += ad_realaud.c vd_realvid.c
-SRCS-$(SPEEX)                 += ad_speex.c
-SRCS-$(WIN32DLL)              += ad_acm.c ad_dmo.c ad_dshow.c ad_twin.c \
+SRCS_COMMON-$(CONFIG_LIBAVCODEC)     += ad_ffmpeg.c vd_ffmpeg.c vf_lavc.c vf_lavcdeint.c
+SRCS_COMMON-$(CONFIG_LIBAVCODEC_SO)  += ad_ffmpeg.c vd_ffmpeg.c vf_lavc.c vf_lavcdeint.c
+SRCS_COMMON-$(CONFIG_LIBPOSTPROC)    += vf_pp.c
+SRCS_COMMON-$(CONFIG_LIBPOSTPROC_SO) += vf_pp.c
+SRCS_COMMON-$(FAAD)                  += ad_faad.c
+SRCS_COMMON-$(JPEG)                  += vd_ijpg.c
+SRCS_COMMON-$(LIBA52)                += ad_liba52.c
+SRCS_COMMON-$(LIBDV)                 += ad_libdv.c vd_libdv.c
+SRCS_COMMON-$(LIBMAD)                += ad_libmad.c
+SRCS_COMMON-$(LIBMPEG2)              += vd_libmpeg2.c
+SRCS_COMMON-$(LIBTHEORA)             += vd_theora.c
+SRCS_COMMON-$(LIBVORBIS)             += ad_libvorbis.c
+SRCS_COMMON-$(MP3LIB)                += ad_mp3lib.c
+SRCS_COMMON-$(MUSEPACK)              += ad_mpc.c
+SRCS_COMMON-$(PNG)                   += vd_mpng.c vf_screenshot.c
+SRCS_COMMON-$(QTX_CODECS)            += ad_qtaudio.c vd_qtvideo.c
+SRCS_COMMON-$(REAL_CODECS)           += ad_realaud.c vd_realvid.c
+SRCS_COMMON-$(SPEEX)                 += ad_speex.c
+SRCS_COMMON-$(WIN32DLL)              += ad_acm.c ad_dmo.c ad_dshow.c ad_twin.c \
                                  vd_dmo.c vd_dshow.c vd_vfw.c vd_vfwex.c
-SRCS-$(XANIM_CODECS)          += vd_xanim.c
-SRCS-$(XVID4)                 += vd_xvid4.c
-SRCS-$(ZORAN)                 += vd_zrmjpeg.c vf_zrmjpeg.c
+SRCS_COMMON-$(XANIM_CODECS)          += vd_xanim.c
+SRCS_COMMON-$(XVID4)                 += vd_xvid4.c
+SRCS_COMMON-$(ZORAN)                 += vd_zrmjpeg.c vf_zrmjpeg.c
 
 
-SRCS2=ae.c \
+SRCS_MENCODER=ae.c \
              ae_pcm.c \
              ve.c \
              ve_raw.c \
 
-SRCS2-$(CONFIG_LIBAVCODEC)    += ae_lavc.c ve_lavc.c
-SRCS2-$(CONFIG_LIBAVCODEC_SO) += ae_lavc.c ve_lavc.c
-SRCS2-$(LIBDV)                += ve_libdv.c
-SRCS2-$(LIBLZO)               += ve_nuv.c
-SRCS2-$(QTX_CODECS)           += ve_qtvideo.c
-SRCS2-$(WIN32DLL)             += ve_vfw.c
-SRCS2-$(X264)                 += ve_x264.c
-SRCS2-$(XVID4)                += ve_xvid4.c
-SRCS2-$(FAAC)                 += ae_faac.c
-SRCS2-$(TOOLAME)              += ae_toolame.c
-SRCS2-$(TWOLAME)              += ae_twolame.c
-SRCS2-$(MP3LAME)              += ae_lame.c
+SRCS_MENCODER-$(CONFIG_LIBAVCODEC)    += ae_lavc.c ve_lavc.c
+SRCS_MENCODER-$(CONFIG_LIBAVCODEC_SO) += ae_lavc.c ve_lavc.c
+SRCS_MENCODER-$(LIBDV)                += ve_libdv.c
+SRCS_MENCODER-$(LIBLZO)               += ve_nuv.c
+SRCS_MENCODER-$(QTX_CODECS)           += ve_qtvideo.c
+SRCS_MENCODER-$(WIN32DLL)             += ve_vfw.c
+SRCS_MENCODER-$(X264)                 += ve_x264.c
+SRCS_MENCODER-$(XVID4)                += ve_xvid4.c
+SRCS_MENCODER-$(FAAC)                 += ae_faac.c
+SRCS_MENCODER-$(TOOLAME)              += ae_toolame.c
+SRCS_MENCODER-$(TWOLAME)              += ae_twolame.c
+SRCS_MENCODER-$(MP3LAME)              += ae_lame.c
 
 
 CFLAGS  = -Inative \
--- a/libmpdemux/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libmpdemux/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,12 +1,10 @@
 
 include ../config.mak
 
-LIBNAME = libmpdemux.a
-ifeq ($(MENCODER),yes)
-LIBNAME2 = libmpmux.a
-endif
+LIBNAME_COMMON   = libmpdemux.a
+LIBNAME_MENCODER = libmpmux.a
 
-SRCS  = asfheader.c \
+SRCS_COMMON  = asfheader.c \
         aviheader.c \
         aviprint.c \
         demuxer.c \
@@ -48,25 +46,25 @@
         yuv4mpeg.c \
         yuv4mpeg_ratio.c \
 
-SRCS-$(CONFIG_LIBAVFORMAT)      += demux_lavf.c
-SRCS-$(CONFIG_LIBAVFORMAT_SO)   += demux_lavf.c
-SRCS-$(GIF)                     += demux_gif.c
-SRCS-$(LIBDV)                   += demux_rawdv.c
-SRCS-$(LIBNUT)                  += demux_nut.c
-SRCS-$(LIBVORBIS)               += demux_ogg.c
-SRCS-$(MUSEPACK)                += demux_mpc.c
-SRCS-$(STREAMING_LIVE555)       += demux_rtp.cpp demux_rtp_codec.cpp
-SRCS-$(WIN32DLL)                += demux_avs.c
-SRCS-$(XMMS_PLUGINS)            += demux_xmms.c
+SRCS_COMMON-$(CONFIG_LIBAVFORMAT)      += demux_lavf.c
+SRCS_COMMON-$(CONFIG_LIBAVFORMAT_SO)   += demux_lavf.c
+SRCS_COMMON-$(GIF)                     += demux_gif.c
+SRCS_COMMON-$(LIBDV)                   += demux_rawdv.c
+SRCS_COMMON-$(LIBNUT)                  += demux_nut.c
+SRCS_COMMON-$(LIBVORBIS)               += demux_ogg.c
+SRCS_COMMON-$(MUSEPACK)                += demux_mpc.c
+SRCS_COMMON-$(STREAMING_LIVE555)       += demux_rtp.cpp demux_rtp_codec.cpp
+SRCS_COMMON-$(WIN32DLL)                += demux_avs.c
+SRCS_COMMON-$(XMMS_PLUGINS)            += demux_xmms.c
 
-SRCS2 = muxer.c \
+SRCS_MENCODER = muxer.c \
         muxer_avi.c \
         muxer_mpeg.c \
         muxer_rawaudio.c \
         muxer_rawvideo.c \
 
-SRCS2-$(CONFIG_LIBAVFORMAT)     += muxer_lavf.c
-SRCS2-$(CONFIG_LIBAVFORMAT_SO)  += muxer_lavf.c
+SRCS_MENCODER-$(CONFIG_LIBAVFORMAT)     += muxer_lavf.c
+SRCS_MENCODER-$(CONFIG_LIBAVFORMAT_SO)  += muxer_lavf.c
 
 CFLAGS = -I../stream -I../loader
 
--- a/libmpeg2/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libmpeg2/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,8 @@
-
-LIBNAME = libmpeg2.a
-
 include ../config.mak
 
-SRCS	= alloc.c \
+LIBNAME_COMMON = libmpeg2.a
+
+SRCS_COMMON = alloc.c \
 	  cpu_accel.c\
 	  cpu_state.c \
 	  decode.c \
@@ -12,10 +11,10 @@
 	  motion_comp.c \
 	  slice.c \
 
-SRCS-$(TARGET_MMX)        += idct_mmx.c motion_comp_mmx.c
-SRCS-$(TARGET_ALTIVEC)    += motion_comp_altivec.c idct_altivec.c
-SRCS-$(TARGET_VIS)        += motion_comp_vis.c
-SRCS-$(TARGET_ARCH_ALPHA) += idct_alpha.c motion_comp_alpha.c
+SRCS_COMMON-$(TARGET_MMX)        += idct_mmx.c motion_comp_mmx.c
+SRCS_COMMON-$(TARGET_ALTIVEC)    += motion_comp_altivec.c idct_altivec.c
+SRCS_COMMON-$(TARGET_VIS)        += motion_comp_vis.c
+SRCS_COMMON-$(TARGET_ARCH_ALPHA) += idct_alpha.c motion_comp_alpha.c
 
 CFLAGS = -I../libvo
 
--- a/libvo/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/libvo/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,12 +1,10 @@
 
 include ../config.mak
 
-LIBNAME2 = libosd.a
-ifeq ($(MPLAYER),yes)
-LIBNAME = libvo.a
-endif
+LIBNAME_COMMON  = libosd.a
+LIBNAME_MPLAYER = libvo.a
 
-SRCS=aspect.c \
+SRCS_MPLAYER = aspect.c \
      geometry.c \
      spuenc.c \
      video_out.c \
@@ -15,15 +13,15 @@
      vo_yuv4mpeg.c \
      $(VO_SRCS) \
 
-SRCS-$(EXTERNAL_VIDIX) +=  vosub_vidix.c
-SRCS-$(VIDIX)          +=  vosub_vidix.c
+SRCS_MPLAYER-$(EXTERNAL_VIDIX) +=  vosub_vidix.c
+SRCS_MPLAYER-$(VIDIX)          +=  vosub_vidix.c
 
-SRCS2 = aclib.c \
+SRCS_COMMON = aclib.c \
         osd.c \
         sub.c \
 
-SRCS2-$(BITMAP_FONT) +=  font_load.c
-SRCS2-$(FREETYPE)    +=  font_load_ft.c
+SRCS_COMMON-$(BITMAP_FONT) +=  font_load.c
+SRCS_COMMON-$(FREETYPE)    +=  font_load_ft.c
 
 CFLAGS-$(CONFIG_LIBAVUTIL) +=  -I../libavutil
 
--- a/loader/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/loader/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,21 +1,21 @@
 include ../config.mak
 
-LIBNAME = libloader.a
+LIBNAME_COMMON = libloader.a
 
 CFLAGS= -Idshow -DMPLAYER -D__WINE__ -DNOAVIFILE_HEADERS
 #CFLAGS+=-Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
 
-SRCS= driver.c afl.c vfl.c
+SRCS_COMMON  = driver.c afl.c vfl.c
 ifneq ($(TARGET_WIN32),yes)
-SRCS+= ldt_keeper.c pe_image.c module.c ext.c win32.c \
+SRCS_COMMON += ldt_keeper.c pe_image.c module.c ext.c win32.c \
        pe_resource.c resource.c registry.c elfdll.c
 # QTX emulation is not supported in Darwin
 ifneq ($(TARGET_OS),Darwin)
-SRCS+= wrapper.S
+SRCS_COMMON += wrapper.S
 endif
 endif
 
-SRCS+= dshow/DS_AudioDecoder.c \
+SRCS_COMMON += dshow/DS_AudioDecoder.c \
        dshow/DS_Filter.c \
        dshow/DS_VideoDecoder.c \
        dshow/allocator.c \
--- a/mp3lib/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/mp3lib/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,22 +1,22 @@
 
 include ../config.mak
 
-LIBNAME = libMP3.a
+LIBNAME_COMMON = libMP3.a
 
 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
 endif
 
-SRCS = sr1.c
+SRCS_COMMON = sr1.c
 ifeq ($(TARGET_ARCH_X86_32),yes)
-SRCS += decode_i586.c
-SRCS-$(TARGET_MMX)     += decode_MMX.c dct64_MMX.c tabinit_MMX.c
-SRCS-$(TARGET_3DNOW)   += dct36_3dnow.c dct64_3dnow.c
-SRCS-$(TARGET_3DNOWEX) += dct36_k7.c dct64_k7.c
-SRCS-$(TARGET_SSE)     += dct64_sse.c
+SRCS_COMMON += decode_i586.c
+SRCS_COMMON-$(TARGET_MMX)     += decode_MMX.c dct64_MMX.c tabinit_MMX.c
+SRCS_COMMON-$(TARGET_3DNOW)   += dct36_3dnow.c dct64_3dnow.c
+SRCS_COMMON-$(TARGET_3DNOWEX) += dct36_k7.c dct64_k7.c
+SRCS_COMMON-$(TARGET_SSE)     += dct64_sse.c
 endif
 ifeq ($(TARGET_ALTIVEC),yes)
-SRCS += dct64_altivec.c
+SRCS_COMMON += dct64_altivec.c
 ifeq ($(TARGET_OS),Darwin)
 CFLAGS += -faltivec
 else
@@ -29,7 +29,7 @@
 decode_i586.o: decode_i586.c
 	$(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $<
 
-%: %.c	$(LIBNAME) ../mp_msg-mencoder.o ../cpudetect.o
+%: %.c	$(LIBNAME_COMMON) ../mp_msg-mencoder.o ../cpudetect.o
 	$(CC) $(CFLAGS) -o $@ ../libvo/aclib.c $^ -lm
 
 distclean::
--- a/mpcommon.mak	Tue Mar 13 10:33:33 2007 +0000
+++ b/mpcommon.mak	Tue Mar 13 12:10:57 2007 +0000
@@ -1,19 +1,24 @@
-SRCS         += $(SRCS-yes)
-SRCS2        += $(SRCS2-yes)
+SRCS_COMMON          += $(SRCS_COMMON-yes)
+SRCS_MPLAYER         += $(SRCS_MPLAYER-yes)
+SRCS_MENCODER        += $(SRCS_MENCODER-yes)
 CFLAGS       += $(CFLAGS-yes)
 
-OBJS  = $(addsuffix .o, $(basename $(SRCS)) )
-OBJS2 = $(addsuffix .o, $(basename $(SRCS2)) )
+OBJS_COMMON    = $(addsuffix .o, $(basename $(SRCS_COMMON)) )
+OBJS_MPLAYER   = $(addsuffix .o, $(basename $(SRCS_MPLAYER)) )
+OBJS_MENCODER  = $(addsuffix .o, $(basename $(SRCS_MENCODER)) )
 
 CFLAGS += -I. -I.. $(OPTFLAGS)
 
-LIBS = $(LIBNAME) $(LIBNAME2)
+LIBS-$(MPLAYER)  += $(LIBNAME_MPLAYER)
+LIBS-$(MENCODER) += $(LIBNAME_MENCODER)
+LIBS              = $(LIBNAME_COMMON) $(LIBS-yes)
 
 libs: $(LIBS)
 
-$(LIBNAME): $(OBJS)
-$(LIBNAME2): $(OBJS2)
-$(LIBNAME) $(LIBNAME2):
+$(LIBNAME_COMMON):   $(OBJS_COMMON)
+$(LIBNAME_MPLAYER):  $(OBJS_MPLAYER)
+$(LIBNAME_MENCODER): $(OBJS_MENCODER)
+$(LIBNAME_COMMON) $(LIBNAME_MPLAYER) $(LIBNAME_MENCODER):
 	$(AR) r $@ $^
 	$(RANLIB) $@
 
@@ -24,7 +29,7 @@
 	rm -f .depend
 
 dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) $(SRCS2) 1>.depend
+	$(CC) -MM $(CFLAGS) $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER) 1>.depend
 
 -include .depend
 
--- a/osdep/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/osdep/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,23 +1,23 @@
 
 include ../config.mak
 
-LIBNAME = libosdep.a
+LIBNAME_COMMON = libosdep.a
 
-SRCS-$(HAVE_SYS_MMAN_H)       += mmap_anon.c
-SRCS-$(MACOSX_FINDER_SUPPORT) += macosx_finder_args.c
-SRCS-$(STREAM_CACHE)          += shmem.c
+SRCS_COMMON-$(HAVE_SYS_MMAN_H)       += mmap_anon.c
+SRCS_COMMON-$(MACOSX_FINDER_SUPPORT) += macosx_finder_args.c
+SRCS_COMMON-$(STREAM_CACHE)          += shmem.c
 
-SRCS-$(NEED_FSEEKO)           += fseeko.c
-SRCS-$(NEED_FTELLO)           += ftello.c
-SRCS-$(NEED_GETTIMEOFDAY)     += gettimeofday.c
-SRCS-$(NEED_GLOB)             += glob-win.c
-SRCS-$(NEED_SCANDIR)          += scandir.c
-SRCS-$(NEED_SETENV)           += setenv.c
-SRCS-$(NEED_STRLCAT)          += strlcat.c
-SRCS-$(NEED_STRLCPY)          += strlcpy.c
-SRCS-$(NEED_STRSEP)           += strsep.c
-SRCS-$(NEED_SWAB)             += swab.c
-SRCS-$(NEED_VSSCANF)          += vsscanf.c
+SRCS_COMMON-$(NEED_FSEEKO)           += fseeko.c
+SRCS_COMMON-$(NEED_FTELLO)           += ftello.c
+SRCS_COMMON-$(NEED_GETTIMEOFDAY)     += gettimeofday.c
+SRCS_COMMON-$(NEED_GLOB)             += glob-win.c
+SRCS_COMMON-$(NEED_SCANDIR)          += scandir.c
+SRCS_COMMON-$(NEED_SETENV)           += setenv.c
+SRCS_COMMON-$(NEED_STRLCAT)          += strlcat.c
+SRCS_COMMON-$(NEED_STRLCPY)          += strlcpy.c
+SRCS_COMMON-$(NEED_STRSEP)           += strsep.c
+SRCS_COMMON-$(NEED_SWAB)             += swab.c
+SRCS_COMMON-$(NEED_VSSCANF)          += vsscanf.c
 
 getch = getch2.c
 timer = timer-lx.c
@@ -30,8 +30,8 @@
 ifeq ($(TARGET_OS),MINGW32)
 getch = getch2-win.c
 endif
-SRCS += $(timer)
-SRCS += $(getch)
+SRCS_COMMON += $(timer)
+SRCS_COMMON += $(getch)
 
 include ../mpcommon.mak
 
--- a/stream/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/stream/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,8 @@
-
-LIBNAME = stream.a
-
 include ../config.mak
 
-SRCS += open.c \
+LIBNAME_COMMON = stream.a
+
+SRCS_COMMON += open.c \
         stream.c \
         stream_cue.c \
         stream_file.c \
@@ -11,14 +10,14 @@
         stream_null.c \
         url.c \
 
-SRCS-$(CDDA)              += stream_cdda.c cdinfo.c
-SRCS-$(CDDB)              += stream_cddb.c
-SRCS-$(DVBIN)             += dvb_tune.c stream_dvb.c
-SRCS-$(DVDNAV)            += stream_dvdnav.c
-SRCS-$(DVDREAD)           += stream_dvd.c
-SRCS-$(FTP)               += stream_ftp.c
-SRCS-$(LIBSMBCLIENT)      += stream_smb.c
-SRCS-$(MPLAYER_NETWORK)   += stream_netstream.c     \
+SRCS_COMMON-$(CDDA)              += stream_cdda.c cdinfo.c
+SRCS_COMMON-$(CDDB)              += stream_cddb.c
+SRCS_COMMON-$(DVBIN)             += dvb_tune.c stream_dvb.c
+SRCS_COMMON-$(DVDNAV)            += stream_dvdnav.c
+SRCS_COMMON-$(DVDREAD)           += stream_dvd.c
+SRCS_COMMON-$(FTP)               += stream_ftp.c
+SRCS_COMMON-$(LIBSMBCLIENT)      += stream_smb.c
+SRCS_COMMON-$(MPLAYER_NETWORK)   += stream_netstream.c     \
                              asf_mmst_streaming.c   \
                              asf_streaming.c        \
                              cookies.c              \
@@ -43,28 +42,28 @@
                              realrtsp/sdpplin.c     \
                              realrtsp/xbuffer.c     \
 
-SRCS-$(PVR)               += stream_pvr.c
-SRCS-$(RADIO)             += stream_radio.c
-SRCS-$(RADIO_CAPTURE)     += audio_in.c
-SRCS-$(STREAM_CACHE)      += cache2.c
-SRCS-$(STREAMING_LIVE555) += stream_livedotcom.c
-SRCS-$(TV)                += stream_tv.c tv.c frequencies.c tvi_dummy.c
-SRCS-$(TV_BSDBT848)       += tvi_bsdbt848.c
-SRCS-$(TV_V4L1)           += tvi_v4l.c  audio_in.c
-SRCS-$(TV_V4L2)           += tvi_v4l2.c audio_in.c
-SRCS-$(VCD)               += stream_vcd.c
-SRCS-$(VSTREAM)           += stream_vstream.c
+SRCS_COMMON-$(PVR)               += stream_pvr.c
+SRCS_COMMON-$(RADIO)             += stream_radio.c
+SRCS_COMMON-$(RADIO_CAPTURE)     += audio_in.c
+SRCS_COMMON-$(STREAM_CACHE)      += cache2.c
+SRCS_COMMON-$(STREAMING_LIVE555) += stream_livedotcom.c
+SRCS_COMMON-$(TV)                += stream_tv.c tv.c frequencies.c tvi_dummy.c
+SRCS_COMMON-$(TV_BSDBT848)       += tvi_bsdbt848.c
+SRCS_COMMON-$(TV_V4L1)           += tvi_v4l.c  audio_in.c
+SRCS_COMMON-$(TV_V4L2)           += tvi_v4l2.c audio_in.c
+SRCS_COMMON-$(VCD)               += stream_vcd.c
+SRCS_COMMON-$(VSTREAM)           += stream_vstream.c
 
 #FIXME: These should have variables assigned in configure.
 ifeq ($(TV_V4L),yes)
-SRCS-$(ALSA1X)            += ai_alsa1x.c
-SRCS-$(ALSA9)             += ai_alsa.c
-SRCS-$(OSS)               += ai_oss.c
+SRCS_COMMON-$(ALSA1X)            += ai_alsa1x.c
+SRCS_COMMON-$(ALSA9)             += ai_alsa.c
+SRCS_COMMON-$(OSS)               += ai_oss.c
 endif
 ifeq ($(RADIO_CAPTURE),yes)
-SRCS-$(ALSA1X)            += ai_alsa1x.c
-SRCS-$(ALSA9)             += ai_alsa.c
-SRCS-$(OSS)               += ai_oss.c
+SRCS_COMMON-$(ALSA1X)            += ai_alsa1x.c
+SRCS_COMMON-$(ALSA9)             += ai_alsa.c
+SRCS_COMMON-$(OSS)               += ai_oss.c
 endif
 
 CFLAGS = -I../loader
--- a/tremor/Makefile	Tue Mar 13 10:33:33 2007 +0000
+++ b/tremor/Makefile	Tue Mar 13 12:10:57 2007 +0000
@@ -1,9 +1,8 @@
-
-LIBNAME = libvorbisidec.a
-
 include ../config.mak
 
-SRCS	= bitwise.c \
+LIBNAME_COMMON = libvorbisidec.a
+
+SRCS_COMMON = bitwise.c \
           block.c \
           codebook.c \
           floor0.c \