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

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21275 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego
2006-11-26 18:12:36 +00:00
parent 7ecf9d9e29
commit dc2be42703
20 changed files with 78 additions and 513 deletions
+3 -25
View File
@@ -44,34 +44,12 @@ SRCS = wm/ws.c \
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
+3 -27
View File
@@ -9,37 +9,13 @@ SRCS = dvd_input.c \
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
+1 -28
View File
@@ -11,31 +11,4 @@ ifeq ($(LIRC),yes)
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
+3 -28
View File
@@ -11,20 +11,7 @@ SRCS = crc.c \
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 @@ test: $(LIBNAME) test.c
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
+2 -26
View File
@@ -40,36 +40,12 @@ ifeq ($(CONFIG_LIBAVCODEC_SO),yes)
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
+1 -29
View File
@@ -8,32 +8,4 @@ SRCS=audio_out.c \
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
+2 -32
View File
@@ -12,36 +12,6 @@ SRCS = ass.c \
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
+2 -26
View File
@@ -7,13 +7,9 @@ SRCS = css.c \
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 @@ ifeq ($(TARGET_OS),Darwin)
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
+2 -28
View File
@@ -42,9 +42,7 @@ SRCS = bits.c \
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 @@ ifeq ($(FAAD_FIXED),yes)
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
+1 -27
View File
@@ -16,31 +16,5 @@ SRCS= menu.c \
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
+3 -24
View File
@@ -305,43 +305,22 @@ OBJS=$(SRCS:.c=.o)
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
+3 -28
View File
@@ -103,36 +103,11 @@ ifeq ($(STREAMING_LIVE555),yes)
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)
CFLAGS = -I../stream -I../loader $(LIBAV_INC)
CPLUSPLUSFLAGS = $(CFLAGS) -D__STDC_LIMIT_MACROS
.SUFFIXES: .c .cpp .o
# .PHONY: all clean
all: $(LIBNAME)
.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
+2 -28
View File
@@ -12,9 +12,7 @@ SRCS = alloc.c \
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 @@ ifeq ($(TARGET_ARCH_ALPHA),yes)
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
+2 -27
View File
@@ -46,40 +46,15 @@ ifeq ($(EXTERNAL_VIDIX),yes)
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
+6 -21
View File
@@ -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 @@ SRCS+= dshow/DS_AudioDecoder.c \
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
+5 -26
View File
@@ -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
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 @@ decode_i586.o: decode_i586.c
.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
+30
View File
@@ -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
+1 -27
View File
@@ -36,33 +36,7 @@ endif
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
+4 -28
View File
@@ -130,35 +130,11 @@ SRCS += stream_dvb.c
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
+2 -28
View File
@@ -18,32 +18,6 @@ SRCS = bitwise.c \
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