# common bits used by all libraries
#
-all: # make "all" default target
+# first so "all" becomes default target
+all: all-yes
ifndef SUBDIR
vpath %.c $(SRC_DIR)
ifndef V
Q = @
ECHO = printf "$(1)\t%s\n" $(2)
-BRIEF = CC AS YASM AR LD HOSTCC RANLIB STRIP CP
-SILENT = DEPCC YASMDEP RM
+BRIEF = CC AS YASM AR LD HOSTCC STRIP CP
+SILENT = DEPCC YASMDEP RM RANLIB
MSG = $@
+M = @$(call ECHO,$(TAG),$@);
$(foreach VAR,$(BRIEF), \
- $(eval $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
-$(foreach VAR,$(SILENT),$(eval $(VAR) = @$($(VAR))))
+ $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
+$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
endif
-ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
+ALLFFLIBS = avcodec avcore avdevice avfilter avformat avutil postproc swscale
-CPPFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
+IFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
+CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
CFLAGS += $(ECFLAGS)
+YASMFLAGS += $(IFLAGS) -Pconfig.asm
+
+HOSTCFLAGS += $(IFLAGS)
%.o: %.c
$(CCDEP)
%.ver: %.v
$(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
-SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
-ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
-$(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES)
-endif
+%.c %.h: TAG = GEN
-$(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh config.mak
- $< $(SRC_PATH) $@ $(EXTRA_VERSION)
+# Dummy rule to stop make trying to rebuild removed or renamed headers
+%.h:
+ @:
install: install-libs install-headers
+install-libs: install-libs-yes
uninstall: uninstall-libs uninstall-headers
.SUFFIXES:
# Do not delete intermediate files from chains of implicit rules
-.SECONDARY:
+$(OBJS):
endif
OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
$(HOSTPROGS): %$(HOSTEXESUF): %.o
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
-DEPS := $(OBJS:.o=.d)
-depend dep: $(DEPS)
-
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
--include $(wildcard $(DEPS))
+-include $(wildcard $(OBJS:.o=.d))