diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-06-24 09:02:57 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-06-24 09:09:55 +0200 |
commit | 2ec899222b3c90b3496a502175baac74cac1f564 (patch) | |
tree | d23dee920a0c6766a7f94815079a9830596a87ee /common.mak | |
parent | 686959e87e377c0494da636640e36779dd985c30 (diff) | |
download | ffmpeg-2ec899222b3c90b3496a502175baac74cac1f564.tar.gz |
Revert "build: move basic rules and variables to main Makefile"
This reverts commit bb5249244ddb22df1cfb8dee1c369e6cd653d00d.
This is necessary to allow running "make" in subdirs again.
Conflicts:
Makefile
Diffstat (limited to 'common.mak')
-rw-r--r-- | common.mak | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/common.mak b/common.mak index e2eaa399da..8d21d154d5 100644 --- a/common.mak +++ b/common.mak @@ -5,6 +5,46 @@ # first so "all" becomes default target all: all-yes +ifndef SUBDIR + +ifndef V +Q = @ +ECHO = printf "$(1)\t%s\n" $(2) +BRIEF = CC AS YASM AR LD HOSTCC +SILENT = DEPCC YASMDEP RM RANLIB +MSG = $@ +M = @$(call ECHO,$(TAG),$@); +$(foreach VAR,$(BRIEF), \ + $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) +$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) +endif + +IFLAGS := -I. -I$(SRC_PATH) +CPPFLAGS := $(IFLAGS) $(CPPFLAGS) +CFLAGS += $(ECFLAGS) +YASMFLAGS += $(IFLAGS) -Pconfig.asm + +HOSTCFLAGS += $(IFLAGS) + +%.o: %.c + $(CCDEP) + $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $< + +%.o: %.S + $(ASDEP) + $(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $< + +%.ho: %.h + $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $< + +%.ver: %.v + $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ + +%.c %.h: TAG = GEN + +endif + OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes) OBJS += $(OBJS-yes) |