From df978cfbcdc2ce93fcf9c16d0755745fbb167884 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 8 Nov 2008 09:51:12 +0000 Subject: [PATCH] Sync with latest FFmpeg changes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27902 b3059339-0415-0410-9bf9-f77b7e298cf2 --- common.mak | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/common.mak b/common.mak index 88a816efed..d4c1f14862 100644 --- a/common.mak +++ b/common.mak @@ -8,11 +8,18 @@ ifndef SUBDIR vpath %.c $(SRC_DIR) vpath %.h $(SRC_DIR) vpath %.S $(SRC_DIR) +vpath %.asm $(SRC_DIR) + +ifeq ($(SRC_DIR),$(SRC_PATH_BARE)) +BUILD_ROOT_REL = . +else +BUILD_ROOT_REL = .. +endif ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale -CFLAGS = -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ - -D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) $(OPTFLAGS) +CFLAGS := -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(OPTFLAGS) %.o: %.c $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< @@ -32,8 +39,18 @@ CFLAGS = -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ %.d: %.cpp $(DEPEND_CMD) > $@ +%.o: %.d + %$(EXESUF): %.c +SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries +ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES)) +$(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) +endif + +$(BUILD_ROOT_REL)/version.h: + $(SRC_PATH)/version.sh $(SRC_PATH) $@ $(EXTRA_VERSION) + install: install-libs install-headers uninstall: uninstall-libs uninstall-headers @@ -43,18 +60,12 @@ endif CFLAGS += $(CFLAGS-yes) OBJS += $(OBJS-yes) -ASM_OBJS += $(ASM_OBJS-yes) -CPP_OBJS += $(CPP_OBJS-yes) FFLIBS := $(FFLIBS-yes) $(FFLIBS) TESTS += $(TESTS-yes) FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS) FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS) -SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPP_OBJS:.o=.cpp) -OBJS := $(OBJS) $(ASM_OBJS) $(CPP_OBJS) - -SRCS := $(addprefix $(SUBDIR),$(SRCS)) OBJS := $(addprefix $(SUBDIR),$(OBJS)) TESTS := $(addprefix $(SUBDIR),$(TESTS)) @@ -68,7 +79,7 @@ depend dep: $(DEPS) CLEANSUFFIXES = *.o *~ *.ho LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map -DISTCLEANSUFFIXES = *.d +DISTCLEANSUFFIXES = *.d *.pc define RULES $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o @@ -80,6 +91,12 @@ $(SUBDIR)%-test.o: $(SUBDIR)%.c $(SUBDIR)%-test.o: $(SUBDIR)%-test.c $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^ +$(SUBDIR)i386/%.o: $(SUBDIR)i386/%.asm + $(YASM) $(YASMFLAGS) -I $$( $$@ + clean:: rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))