[MPlayer-cvslog] r26435 - in trunk: common.mak subdir.mak
diego
subversion at mplayerhq.hu
Sun Apr 13 12:54:33 CEST 2008
Author: diego
Date: Sun Apr 13 12:54:33 2008
New Revision: 26435
Log:
Sync with latest FFmpeg changes.
Modified:
trunk/common.mak
trunk/subdir.mak
Modified: trunk/common.mak
==============================================================================
--- trunk/common.mak (original)
+++ trunk/common.mak Sun Apr 13 12:54:33 2008
@@ -24,6 +24,15 @@ CFLAGS = -DHAVE_AV_CONFIG_H -D_FILE_OFFS
%.ho: %.h
$(CC) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<
+%.d: %.c
+ $(DEPEND_CMD) > $@
+
+%.d: %.S
+ $(DEPEND_CMD) > $@
+
+%.d: %.cpp
+ $(DEPEND_CMD) > $@
+
install: install-libs install-headers
uninstall: uninstall-libs uninstall-headers
@@ -48,13 +57,17 @@ SRCS := $(addprefix $(SUBDIR),$(SRCS))
OBJS := $(addprefix $(SUBDIR),$(OBJS))
TESTS := $(addprefix $(SUBDIR),$(TESTS))
+DEP_LIBS:=$(foreach NAME,$(FFLIBS),lib$(NAME)/$($(BUILD_SHARED:yes=S)LIBNAME))
+
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h))
checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho))
-depend dep: $(SUBDIR).depend
+DEPS := $(OBJS:.o=.d)
+depend dep: $(DEPS)
-CLEANFILES += *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
- *.def *.dll.a *.exp *.ho *.map
+CLEANSUFFIXES = *.o *~ *.ho
+LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp *.map
+DISTCLEANSUFFIXES = *.d
define RULES
$(SUBDIR)%: $(SUBDIR)%.o $(LIBNAME)
@@ -63,18 +76,20 @@ $(SUBDIR)%: $(SUBDIR)%.o $(LIBNAME)
$(SUBDIR)%-test$(EXESUF): $(SUBDIR)%.c $(LIBNAME)
$(CC) $(CFLAGS) $(FFLDFLAGS) -DTEST -o $$@ $$^ $(FFEXTRALIBS)
-$(SUBDIR).depend: $(SRCS)
- $(DEPEND_CMD) > $$@
-
clean::
- rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES))
+ rm -f $(TESTS) $(addprefix $(SUBDIR),$(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
+ $(addprefix $(SUBDIR), $(foreach suffix,$(CLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
distclean:: clean
- rm -f $(SUBDIR).depend
+ rm -f $(addprefix $(SUBDIR),$(DISTCLEANSUFFIXES)) \
+ $(addprefix $(SUBDIR), $(foreach suffix,$(DISTCLEANSUFFIXES),$(addsuffix /$(suffix),$(DIRS))))
endef
$(eval $(RULES))
+# Clear DIRS variable so that it is not used in other subdirectories.
+DIRS =
+
tests: $(TESTS)
--include $(SUBDIR).depend
+-include $(DEPS)
Modified: trunk/subdir.mak
==============================================================================
--- trunk/subdir.mak (original)
+++ trunk/subdir.mak Sun Apr 13 12:54:33 2008
@@ -33,8 +33,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS)
$(SLIB_EXTRA_CMD)
ifdef SUBDIR
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): \
- $(foreach L,$(FFLIBS),lib$(L)/$(SLIBPREF)$(L)$(SLIBSUF))
+$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
endif
endif
More information about the MPlayer-cvslog
mailing list