aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-06-05 22:29:37 +0100
committerMans Rullgard <mans@mansr.com>2011-06-23 12:17:08 +0100
commitbb5249244ddb22df1cfb8dee1c369e6cd653d00d (patch)
treeb4abd4b23ac0984d1b953da6cbeae36d60570eca
parent8d853efe53f13ef85ef8937df33017b33869bd52 (diff)
downloadffmpeg-bb5249244ddb22df1cfb8dee1c369e6cd653d00d.tar.gz
build: move basic rules and variables to main Makefile
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r--Makefile35
-rw-r--r--common.mak40
2 files changed, 35 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index 75fe364029..d3396a1794 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,41 @@ vpath %.asm $(SRC_DIR)
vpath %.v $(SRC_DIR)
vpath %.texi $(SRC_PATH_BARE)
+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
+
PROGS-$(CONFIG_FFMPEG) += ffmpeg
PROGS-$(CONFIG_FFPLAY) += ffplay
PROGS-$(CONFIG_FFPROBE) += ffprobe
diff --git a/common.mak b/common.mak
index 8d21d154d5..e2eaa399da 100644
--- a/common.mak
+++ b/common.mak
@@ -5,46 +5,6 @@
# 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)