[MPlayer-cvslog] r26187 - trunk/common.mak
diego
subversion at mplayerhq.hu
Fri Mar 7 01:22:09 CET 2008
Author: diego
Date: Fri Mar 7 01:22:09 2008
New Revision: 26187
Log:
sync with FFmpeg r12354
Modified:
trunk/common.mak
Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak (original)
+++ trunk/common.mak Fri Mar 7 01:22:09 2008
@@ -2,17 +2,28 @@
# common bits used by all libraries
#
-VPATH = $(SRC_PATH_BARE)/lib$(NAME)
-SRC_DIR = "$(VPATH)"
+LIBSRC = $(SRC_PATH_BARE)/lib$(NAME)
+
+vpath %.c $(LIBSRC)
+vpath %.h $(LIBSRC)
+vpath %.S $(LIBSRC)
+
+SRC_DIR = "$(LIBSRC)"
+
+ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
CFLAGS += $(CFLAGS-yes)
OBJS += $(OBJS-yes)
ASM_OBJS += $(ASM_OBJS-yes)
CPP_OBJS += $(CPP_OBJS-yes)
+FFLIBS += $(FFLIBS-yes)
CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \
- -I$(SRC_PATH)/libavutil $(OPTFLAGS)
+ $(addprefix -I$(SRC_PATH)/lib,$(ALLFFLIBS)) $(OPTFLAGS)
+
+EXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
+LDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS)
SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp)
OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS)
@@ -28,6 +39,7 @@ $(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
$(LN_S) $^ $@
$(SLIBNAME_WITH_MAJOR): $(OBJS)
+ $(SLIB_CREATE_DEF_CMD)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
$(SLIB_EXTRA_CMD)
@@ -43,7 +55,7 @@ $(SLIBNAME_WITH_MAJOR): $(OBJS)
%.ho: %.h
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
-ALLHEADERS = $(subst $(VPATH)/,,$(wildcard $(VPATH)/*.h))
+ALLHEADERS = $(subst $(LIBSRC)/,,$(wildcard $(LIBSRC)/*.h))
checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho))
depend dep: $(SRCS)
@@ -51,7 +63,7 @@ depend dep: $(SRCS)
clean::
rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
- *.def *.dll.a *.exp *.ho
+ *.def *.dll.a *.exp *.ho *.map $(TESTS)
distclean: clean
rm -f .depend
@@ -78,10 +90,12 @@ install-lib-static: $(LIBNAME)
install -m 644 $(LIBNAME) "$(LIBDIR)"
$(LIB_INSTALL_EXTRA_CMD)
+INCINSTDIR = $(INCDIR)/lib$(NAME)
+
install-headers:
- install -d "$(INCDIR)"
+ install -d "$(INCINSTDIR)"
install -d "$(LIBDIR)/pkgconfig"
- install -m 644 $(addprefix $(SRC_DIR)/,$(HEADERS)) "$(INCDIR)"
+ install -m 644 $(addprefix $(SRC_DIR)/,$(HEADERS)) "$(INCINSTDIR)"
install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
uninstall: uninstall-libs uninstall-headers
@@ -94,9 +108,14 @@ uninstall-libs:
-rm -f "$(LIBDIR)/$(LIBNAME)"
uninstall-headers::
- rm -f $(addprefix "$(INCDIR)/",$(HEADERS))
+ rm -f $(addprefix "$(INCINSTDIR)/",$(HEADERS))
rm -f "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
-.PHONY: all depend dep clean distclean install* uninstall*
+tests: $(TESTS)
+
+%-test$(EXESUF): %.c $(LIBNAME)
+ $(CC) $(CFLAGS) $(LDFLAGS) -DTEST -o $@ $^ $(EXTRALIBS)
+
+.PHONY: all depend dep clean distclean install* uninstall* tests
-include .depend
More information about the MPlayer-cvslog
mailing list