aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Gui/Makefile6
-rw-r--r--dvdread/Makefile6
-rw-r--r--input/Makefile8
-rw-r--r--liba52/Makefile6
-rw-r--r--libaf/Makefile8
-rw-r--r--libao2/Makefile4
-rw-r--r--libass/Makefile4
-rw-r--r--libdvdcss/Makefile6
-rw-r--r--libfaad2/Makefile7
-rw-r--r--libmenu/Makefile6
-rw-r--r--libmpcodecs/Makefile82
-rw-r--r--libmpdemux/Makefile34
-rw-r--r--libmpeg2/Makefile15
-rw-r--r--libvo/Makefile18
-rw-r--r--loader/Makefile10
-rw-r--r--mp3lib/Makefile18
-rw-r--r--mpcommon.mak23
-rw-r--r--osdep/Makefile34
-rw-r--r--stream/Makefile57
-rw-r--r--tremor/Makefile7
20 files changed, 177 insertions, 182 deletions
diff --git a/Gui/Makefile b/Gui/Makefile
index 838378d7ee..83e0e256ef 100644
--- a/Gui/Makefile
+++ b/Gui/Makefile
@@ -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 = -I../loader -I./wm -I./skin
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 @@ SRCS = win32/dialogs.c \
win32/wincfg.c \
else
-SRCS = wm/ws.c \
+SRCS_MPLAYER = wm/ws.c \
wm/wsxdnd.c \
app.c \
interface.c \
diff --git a/dvdread/Makefile b/dvdread/Makefile
index 64e2be93de..1dc6b7dda9 100644
--- a/dvdread/Makefile
+++ b/dvdread/Makefile
@@ -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 @@ SRCS = dvd_input.c \
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
diff --git a/input/Makefile b/input/Makefile
index 1ecf28e8bb..f43fccb643 100644
--- a/input/Makefile
+++ b/input/Makefile
@@ -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
diff --git a/liba52/Makefile b/liba52/Makefile
index 0024c30a6a..a865235f43 100644
--- a/liba52/Makefile
+++ b/liba52/Makefile
@@ -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 @@ SRCS = crc.c \
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::
diff --git a/libaf/Makefile b/libaf/Makefile
index 08e7347ab8..e1c07f69af 100644
--- a/libaf/Makefile
+++ b/libaf/Makefile
@@ -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 @@ SRCS=af.c \
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
diff --git a/libao2/Makefile b/libao2/Makefile
index 41fa7fac1a..1d3272a5ee 100644
--- a/libao2/Makefile
+++ b/libao2/Makefile
@@ -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 \
diff --git a/libass/Makefile b/libass/Makefile
index 4e1b4b5f2d..22d735bd43 100644
--- a/libass/Makefile
+++ b/libass/Makefile
@@ -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 \
diff --git a/libdvdcss/Makefile b/libdvdcss/Makefile
index 4fdb358ecd..39eb4b64dc 100644
--- a/libdvdcss/Makefile
+++ b/libdvdcss/Makefile
@@ -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\"
diff --git a/libfaad2/Makefile b/libfaad2/Makefile
index 58b19e4c93..aa979e212e 100644
--- a/libfaad2/Makefile
+++ b/libfaad2/Makefile
@@ -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 \
diff --git a/libmenu/Makefile b/libmenu/Makefile
index 5166c478fa..6858f81ffc 100644
--- a/libmenu/Makefile
+++ b/libmenu/Makefile
@@ -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 @@ SRCS= menu.c \
menu_console.c \
menu_param.c \
-SRCS-$(DVBIN) += menu_dvbin.c
+SRCS_MPLAYER-$(DVBIN) += menu_dvbin.c
include ../mpcommon.mak
diff --git a/libmpcodecs/Makefile b/libmpcodecs/Makefile
index 36d348e1aa..a0bef3a024 100644
--- a/libmpcodecs/Makefile
+++ b/libmpcodecs/Makefile
@@ -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 @@ SRCS = native/nuppelvideo.c \
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 \
diff --git a/libmpdemux/Makefile b/libmpdemux/Makefile
index 96c41faf57..411e79e623 100644
--- a/libmpdemux/Makefile
+++ b/libmpdemux/Makefile
@@ -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 @@ SRCS = asfheader.c \
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
diff --git a/libmpeg2/Makefile b/libmpeg2/Makefile
index ed38410a6a..98dbc2a764 100644
--- a/libmpeg2/Makefile
+++ b/libmpeg2/Makefile
@@ -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 @@ SRCS = alloc.c \
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
diff --git a/libvo/Makefile b/libvo/Makefile
index 866162b17c..48af0d8d46 100644
--- a/libvo/Makefile
+++ b/libvo/Makefile
@@ -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 @@ SRCS=aspect.c \
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
diff --git a/loader/Makefile b/loader/Makefile
index 33f5d3bbf5..9eaba90f6c 100644
--- a/loader/Makefile
+++ b/loader/Makefile
@@ -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 \
diff --git a/mp3lib/Makefile b/mp3lib/Makefile
index 93ec70881c..fd93e64e92 100644
--- a/mp3lib/Makefile
+++ b/mp3lib/Makefile
@@ -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 @@ include ../mpcommon.mak
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::
diff --git a/mpcommon.mak b/mpcommon.mak
index 2375c6406d..1f3b33db07 100644
--- a/mpcommon.mak
+++ b/mpcommon.mak
@@ -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 @@ distclean:: clean
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
diff --git a/osdep/Makefile b/osdep/Makefile
index 4f1351e531..079105f06f 100644
--- a/osdep/Makefile
+++ b/osdep/Makefile
@@ -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 @@ endif
ifeq ($(TARGET_OS),MINGW32)
getch = getch2-win.c
endif
-SRCS += $(timer)
-SRCS += $(getch)
+SRCS_COMMON += $(timer)
+SRCS_COMMON += $(getch)
include ../mpcommon.mak
diff --git a/stream/Makefile b/stream/Makefile
index 9c5e7d7d8c..36a5d60269 100644
--- a/stream/Makefile
+++ b/stream/Makefile
@@ -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 @@ SRCS += open.c \
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 @@ SRCS-$(MPLAYER_NETWORK) += stream_netstream.c \
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
diff --git a/tremor/Makefile b/tremor/Makefile
index a3574905d3..ef02aa29aa 100644
--- a/tremor/Makefile
+++ b/tremor/Makefile
@@ -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 \