[MPlayer-cvslog] r21275 - in trunk: 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

diego subversion at mplayerhq.hu
Sun Nov 26 19:12:37 CET 2006


Author: diego
Date: Sun Nov 26 19:12:36 2006
New Revision: 21275

Added:
   trunk/mpcommon.mak
Modified:
   trunk/Gui/Makefile
   trunk/dvdread/Makefile
   trunk/input/Makefile
   trunk/liba52/Makefile
   trunk/libaf/Makefile
   trunk/libao2/Makefile
   trunk/libass/Makefile
   trunk/libdvdcss/Makefile
   trunk/libfaad2/Makefile
   trunk/libmenu/Makefile
   trunk/libmpcodecs/Makefile
   trunk/libmpdemux/Makefile
   trunk/libmpeg2/Makefile
   trunk/libvo/Makefile
   trunk/loader/Makefile
   trunk/mp3lib/Makefile
   trunk/osdep/Makefile
   trunk/stream/Makefile
   trunk/tremor/Makefile

Log:
Merge common parts of all Makefiles into one file included by all.


Modified: trunk/Gui/Makefile
==============================================================================
--- trunk/Gui/Makefile	(original)
+++ trunk/Gui/Makefile	Sun Nov 26 19:12:36 2006
@@ -44,34 +44,12 @@
        mplayer/gtk/common.c \
 
 endif
-OBJS = $(SRCS:.c=.o)
 
-.SUFFIXES: .c .o
+include ../mpcommon.mak
 
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME): $(OBJS)
-	rm -f $(LIBNAME)
-	$(AR) rc $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:	$(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~ \
-              mplayer/*.o mplayer/*~ \
+clean::
+	rm -f mplayer/*.o mplayer/*~ \
               mplayer/gtk/*.o mplayer/gtk/*~ \
               skin/*.o skin/*~ \
               wm/*.o wm/*~ \
               win32/*.o win32/*~ \
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif

Modified: trunk/dvdread/Makefile
==============================================================================
--- trunk/dvdread/Makefile	(original)
+++ trunk/dvdread/Makefile	Sun Nov 26 19:12:36 2006
@@ -9,37 +9,13 @@
        nav_read.c \
        md5.c \
 
-OBJS = $(SRCS:.c=.o)
-
 LIBNAME = libdvdread.a
 
-.SUFFIXES: .c .o
-
-CFLAGS= -I.. $(OPTFLAGS) -D__USE_UNIX98 -D_GNU_SOURCE -DSTDC_HEADERS \
+CFLAGS= -D__USE_UNIX98 -D_GNU_SOURCE -DSTDC_HEADERS \
 	-DHAVE_LIMITS_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
 ifeq ($(DVDCSS_INTERNAL),yes)
-CFLAGS := -I../libdvdcss -DHAVE_DVDCSS_DVDCSS_H $(CFLAGS)
+CFLAGS += -I../libdvdcss -DHAVE_DVDCSS_DVDCSS_H
 endif
 
-.c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-all: $(LIBNAME)
-
-$(LIBNAME): $(OBJS)
-	$(AR) rc $@ $^
-	$(RANLIB) $@
-
-clean:
-	rm -f *.o *.a *~ *.so
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/input/Makefile
==============================================================================
--- trunk/input/Makefile	(original)
+++ trunk/input/Makefile	Sun Nov 26 19:12:36 2006
@@ -11,31 +11,4 @@
 SRCS += lirc.c
 endif
 
-OBJS=$(SRCS:.c=.o)
-
-CFLAGS  = -I. -I.. $(OPTFLAGS)
-
-.SUFFIXES: .c .o
-
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):     $(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:    $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/liba52/Makefile
==============================================================================
--- trunk/liba52/Makefile	(original)
+++ trunk/liba52/Makefile	Sun Nov 26 19:12:36 2006
@@ -11,20 +11,7 @@
           imdct.c \
           parse.c \
 
-OBJS	= $(SRCS:.c=.o)
-
-CFLAGS  = -I.. $(OPTFLAGS)
-
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):	$(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
+include ../mpcommon.mak
 
 test:        $(LIBNAME) test.c
 	$(CC) $(CFLAGS)  test.c ../cpudetect.c -o test ../osdep/libosdep.a ./liba52.a -lm
@@ -32,17 +19,5 @@
 test2:        $(LIBNAME) test.c
 	$(CC) $(CFLAGS) test.c -o test2 ../libac3/libac3.a ./liba52.a -lm
 
-all:	$(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend test
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+distclean::
+	rm -f test

Modified: trunk/libaf/Makefile
==============================================================================
--- trunk/libaf/Makefile	(original)
+++ trunk/libaf/Makefile	Sun Nov 26 19:12:36 2006
@@ -40,36 +40,12 @@
 SRCS+=af_lavcresample.c
 endif
 
-OBJS=$(SRCS:.c=.o)
-
-CFLAGS  = -I. -I.. $(LIBAV_INC) $(OPTFLAGS) -D_GNU_SOURCE
+CFLAGS  = -I.. $(LIBAV_INC) -D_GNU_SOURCE
 
 ifeq ($(TARGET_OS),MINGW32)
 CFLAGS += -D_IO_H_
 endif
 
-.SUFFIXES: .c .o
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):     $(OBJS) Makefile
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
 $(OBJS):af.h control.h dsp.h filter.h window.h af_mp.h
 
-all:    $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libao2/Makefile
==============================================================================
--- trunk/libao2/Makefile	(original)
+++ trunk/libao2/Makefile	Sun Nov 26 19:12:36 2006
@@ -8,32 +8,4 @@
      ao_pcm.c \
      $(AO_SRCS) \
 
-OBJS=$(SRCS:.c=.o)
-
-CFLAGS  = -I. -I.. $(OPTFLAGS)
-
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):     $(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:    $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libass/Makefile
==============================================================================
--- trunk/libass/Makefile	(original)
+++ trunk/libass/Makefile	Sun Nov 26 19:12:36 2006
@@ -12,36 +12,6 @@
        ass_bitmap.c \
        ass_library.c \
 
-OBJS=$(SRCS:.c=.o)
-
-CFLAGS  = -I. -I.. \
-          -I../libmpcodecs \
-          $(OPTFLAGS) \
-          -D_GNU_SOURCE \
-
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-all:    $(LIBNAME)
-
-$(LIBNAME):     $(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+CFLAGS  = -I../libmpcodecs -D_GNU_SOURCE
 
+include ../mpcommon.mak

Modified: trunk/libdvdcss/Makefile
==============================================================================
--- trunk/libdvdcss/Makefile	(original)
+++ trunk/libdvdcss/Makefile	Sun Nov 26 19:12:36 2006
@@ -7,13 +7,9 @@
        libdvdcss.c \
        #bsdi_ioctl \
 
-OBJS = $(SRCS:.c=.o)
-
 LIBNAME = libdvdcss.a
 
-.SUFFIXES: .c .o
-
-CFLAGS= -I.. $(OPTFLAGS) -D__USE_UNIX98 -D_GNU_SOURCE \
+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\"
 
@@ -25,24 +21,4 @@
 CFLAGS+=-D__DARWIN__
 endif
 
-.c.o:
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-all: $(LIBNAME)
-
-$(LIBNAME): $(OBJS)
-	$(AR) rc $@ $^
-	$(RANLIB) $@
-
-clean:
-	rm -f *.o *.a *~ *.so
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libfaad2/Makefile
==============================================================================
--- trunk/libfaad2/Makefile	(original)
+++ trunk/libfaad2/Makefile	Sun Nov 26 19:12:36 2006
@@ -42,9 +42,7 @@
           syntax.c \
           tns.c \
 
-OBJS	= $(SRCS:.c=.o)
-
-CFLAGS  = -I. $(OPTFLAGS) -D_GNU_SOURCE
+CFLAGS  = -D_GNU_SOURCE
 
 # The FIXED_POINT implementation of FAAD2 improves performance
 # on some platforms, especially for SBR files.
@@ -52,28 +50,4 @@
 CFLAGS  += -DFIXED_POINT
 endif
 
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):	$(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:	$(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend test
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libmenu/Makefile
==============================================================================
--- trunk/libmenu/Makefile	(original)
+++ trunk/libmenu/Makefile	Sun Nov 26 19:12:36 2006
@@ -16,31 +16,5 @@
 ifeq ($(DVBIN),yes)
 SRCS += menu_dvbin.c
 endif
-OBJS=$(SRCS:.c=.o)
 
-CFLAGS  = -I. -I.. $(OPTFLAGS)
-
-.SUFFIXES: .c .o
-
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):     $(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:    $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libmpcodecs/Makefile
==============================================================================
--- trunk/libmpcodecs/Makefile	(original)
+++ trunk/libmpcodecs/Makefile	Sun Nov 26 19:12:36 2006
@@ -305,43 +305,22 @@
 SRCS2=$(ENCODER_SRCS)
 OBJS2=$(SRCS2:.c=.o)
 
-CFLAGS  = -I. -I.. \
+CFLAGS  = -I.. \
           -Inative \
           -I../libmpdemux \
           -I../stream \
           -I../loader \
           $(LIBAV_INC) \
-          $(OPTFLAGS) \
           -D_GNU_SOURCE \
 
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
+include ../mpcommon.mak
 
 all:    $(LIBS)
 
-$(LIBNAME): $(OBJS)
-	$(AR) r $@ $^
-	$(RANLIB) $@
-
 $(LIBNAME2): $(OBJS2)
 	$(AR) r $@ $^
 	$(RANLIB) $@
 
-clean:
-	rm -f *.o *.a *~
+clean::
 	rm -f native/*.o native/*.a native/*~
 
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) $(SRCS2) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
-

Modified: trunk/libmpdemux/Makefile
==============================================================================
--- trunk/libmpdemux/Makefile	(original)
+++ trunk/libmpdemux/Makefile	Sun Nov 26 19:12:36 2006
@@ -103,36 +103,11 @@
 SRCS += demux_rtp.cpp demux_rtp_codec.cpp
 endif
 
-OBJS	= $(SRCS:.c=.o)
-OBJS   += $(SRCS:.cpp=.o)
-INCLUDE = -I.. -I../stream -I../loader $(LIBAV_INC)
-CFLAGS  = $(INCLUDE) $(OPTFLAGS)
-CPLUSPLUSFLAGS  = $(CFLAGS) -D__STDC_LIMIT_MACROS
-
-.SUFFIXES: .c .cpp .o
-
-# .PHONY: all clean
+CFLAGS = -I../stream -I../loader $(LIBAV_INC)
 
-all:	$(LIBNAME)
+CPLUSPLUSFLAGS  = $(CFLAGS) -D__STDC_LIMIT_MACROS
 
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
 .cpp.o:
 	$(CC) -c $(CPLUSPLUSFLAGS) -o $@ $<
 
-$(LIBNAME):	$(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libmpeg2/Makefile
==============================================================================
--- trunk/libmpeg2/Makefile	(original)
+++ trunk/libmpeg2/Makefile	Sun Nov 26 19:12:36 2006
@@ -12,9 +12,7 @@
 	  motion_comp.c \
 	  slice.c \
 
-OBJS	= $(SRCS:.c=.o)
-INCLUDE = -I. -I../libvo -I..
-CFLAGS  = $(INCLUDE) $(OPTFLAGS) -DMPG12PLAY
+CFLAGS = -I../libvo -DMPG12PLAY
 
 ifeq ($(TARGET_MMX),yes)
 SRCS += idct_mmx.c motion_comp_mmx.c
@@ -32,28 +30,4 @@
 SRCS += idct_alpha.c motion_comp_alpha.c
 endif
 
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):	$(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:	$(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak

Modified: trunk/libvo/Makefile
==============================================================================
--- trunk/libvo/Makefile	(original)
+++ trunk/libvo/Makefile	Sun Nov 26 19:12:36 2006
@@ -46,40 +46,15 @@
 SRCS += vosub_vidix.c
 endif
 
-INCLUDE = -I. -I.. -I../osdep $(LIBAV_INC)
-CFLAGS  = $(INCLUDE) $(OPTFLAGS)
+CFLAGS = -I.. -I../osdep $(LIBAV_INC)
 
-#CFLAGS += -Wall
-
-.SUFFIXES: .c .o .m
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
+include ../mpcommon.mak
 
 .m.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
 all:    $(LIBS)
 
-$(LIBNAME): $(OBJS)
-	$(AR) r $@ $^
-	$(RANLIB) $@
-
 $(LIBNAME2): $(OBJS2)
 	$(AR) r $@ $^
 	$(RANLIB) $@
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif

Modified: trunk/loader/Makefile
==============================================================================
--- trunk/loader/Makefile	(original)
+++ trunk/loader/Makefile	Sun Nov 26 19:12:36 2006
@@ -1,6 +1,8 @@
 include ../config.mak
 
-CFLAGS=-I. -I.. -Idshow -DMPLAYER -D__WINE__ -DNOAVIFILE_HEADERS $(OPTFLAGS)
+LIBNAME = libloader.a
+
+CFLAGS= -Idshow -DMPLAYER -D__WINE__ -DNOAVIFILE_HEADERS
 #CFLAGS+=-Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT
 
 SRCS= driver.c afl.c vfl.c
@@ -23,31 +25,14 @@
        dmo/dmo.c  \
        dmo/dmo_guids.c \
 
-OBJS  = $(SRCS:.c=.o)
-OBJS := $(OBJS:.S=.o)
-OBJS := $(OBJS:.s=.o)
-
-all: libloader.a
-
-libloader.a:  $(OBJS)
-	$(AR) -r $@ $^
-	$(RANLIB) $@
+include ../mpcommon.mak
 
 dshow/test: libloader.a
 	$(CC) dshow/test.c $(CFLAGS) -o $@ $^ -lstdc++
 
-clean:
-	rm -f *.o *.a *~
+clean::
 	rm -f dshow/*.o dshow/*.a dshow/*~
 	rm -f dmo/*.o dmo/*.a dmo/*~
 
-distclean: clean
-	rm -f .depend
+distclean::
 	rm -f dshow/test dshow/test.raw
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif

Modified: trunk/mp3lib/Makefile
==============================================================================
--- trunk/mp3lib/Makefile	(original)
+++ trunk/mp3lib/Makefile	Sun Nov 26 19:12:36 2006
@@ -1,6 +1,8 @@
 
 include ../config.mak
 
+LIBNAME = libMP3.a
+
 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
 endif
@@ -33,16 +35,7 @@
 endif
 endif
 
-OBJS=$(SRCS:.c=.o)
-
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-all:	libMP3.a
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
+include ../mpcommon.mak
 
 decode_i586.o: decode_i586.c
 	$(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $<
@@ -50,25 +43,11 @@
 .s.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-libMP3.a:	$(OBJS)
-	$(AR) r libMP3.a $(OBJS)
-	$(RANLIB) libMP3.a
-
 test1:	libMP3.a test.c
 	$(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
 
 test2:	libMP3.a test2.c
 	$(CC) $(CFLAGS) test2.c ../libvo/aclib.c -o test2 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
 
-clean:
-	rm -f *~ *.o *.a test1 test2
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+distclean::
+	rm -f test1 test2

Added: trunk/mpcommon.mak
==============================================================================
--- (empty file)
+++ trunk/mpcommon.mak	Sun Nov 26 19:12:36 2006
@@ -0,0 +1,30 @@
+OBJS  = $(SRCS:.c=.o)
+OBJS := $(OBJS:.S=.o)
+OBJS := $(OBJS:.s=.o)
+OBJS := $(OBJS:.cpp=.o)
+
+CFLAGS += -I. -I.. $(OPTFLAGS)
+
+.SUFFIXES: .c .o
+
+.c.o:
+	$(CC) -c $(CFLAGS) -o $@ $<
+
+all:    $(LIBNAME)
+
+$(LIBNAME): $(OBJS)
+	$(AR) r $@ $^
+	$(RANLIB) $@
+
+clean::
+	rm -f *.o *.a *~
+
+distclean:: clean
+	rm -f .depend
+
+dep depend:
+	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
+
+ifneq ($(wildcard .depend),)
+include .depend
+endif

Modified: trunk/osdep/Makefile
==============================================================================
--- trunk/osdep/Makefile	(original)
+++ trunk/osdep/Makefile	Sun Nov 26 19:12:36 2006
@@ -36,33 +36,7 @@
 SRCS += $(timer)
 SRCS += $(getch)
 
-OBJS=$(SRCS:.c=.o)
-
-CFLAGS  = -I. -I.. $(OPTFLAGS)
-
-.SUFFIXES: .c .o
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-all:    $(LIBNAME)
+include ../mpcommon.mak
 
 mplayer-rc.o: mplayer.rc
 	windres -o $@ $<
-
-$(LIBNAME):     $(OBJS)
-	$(AR) r $@ $^
-	$(RANLIB) $@
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif

Modified: trunk/stream/Makefile
==============================================================================
--- trunk/stream/Makefile	(original)
+++ trunk/stream/Makefile	Sun Nov 26 19:12:36 2006
@@ -130,35 +130,11 @@
 SRCS += dvb_tune.c
 endif
 
-OBJS	= $(SRCS:.c=.o)
-INCLUDE = -I.. -I../loader $(LIBAV_INC)
-CFLAGS  = $(INCLUDE) $(OPTFLAGS)
+CFLAGS = -I../loader $(LIBAV_INC)
 
-.SUFFIXES: .c .o
+include ../mpcommon.mak
 
-# .PHONY: all clean
-
-all:	$(LIBNAME)
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):	$(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~ \
-	realrtsp/*.o realrtsp/*.a realrtsp/*~ \
+clean::
+	rm -f realrtsp/*.o realrtsp/*.a realrtsp/*~ \
 	librtsp/*.o librtsp/*.a librtsp/*~ \
 	freesdp/*.o freesdp/*.a freesdp/*~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif

Modified: trunk/tremor/Makefile
==============================================================================
--- trunk/tremor/Makefile	(original)
+++ trunk/tremor/Makefile	Sun Nov 26 19:12:36 2006
@@ -18,32 +18,6 @@
           synthesis.c \
           window.c \
 
-OBJS	= $(SRCS:.c=.o)
-INCLUDE = -I. -I..
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) $(TREMOR_FLAGS)
+CFLAGS  = $(TREMOR_FLAGS)
 
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
-
-$(LIBNAME):	$(OBJS)
-	$(AR) r $(LIBNAME) $(OBJS)
-	$(RANLIB) $(LIBNAME)
-
-all:	$(LIBNAME)
-
-clean:
-	rm -f *.o *.a *~
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+include ../mpcommon.mak



More information about the MPlayer-cvslog mailing list