You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-06 08:29:25 +02:00
build: do full flag handling for all compiler-type tools
This adds a full identification probe of CC, AS, LD and HOSTCC, and sets up correct flags and dependency tracking for each. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
9
Makefile
9
Makefile
@@ -11,7 +11,7 @@ ifndef V
|
||||
Q = @
|
||||
ECHO = printf "$(1)\t%s\n" $(2)
|
||||
BRIEF = CC AS YASM AR LD HOSTCC
|
||||
SILENT = DEPCC YASMDEP RM RANLIB
|
||||
SILENT = DEPCC DEPAS DEPHOSTCC YASMDEP RM RANLIB
|
||||
MSG = $@
|
||||
M = @$(call ECHO,$(TAG),$@);
|
||||
$(foreach VAR,$(BRIEF), \
|
||||
@@ -25,14 +25,15 @@ ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil swscale
|
||||
IFLAGS := -I. -I$(SRC_PATH)
|
||||
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
|
||||
CFLAGS += $(ECFLAGS)
|
||||
CCFLAGS = $(CFLAGS)
|
||||
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
|
||||
ASFLAGS := $(CPPFLAGS) $(ASFLAGS)
|
||||
YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
|
||||
HOSTCFLAGS += $(IFLAGS)
|
||||
LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)
|
||||
|
||||
define COMPILE
|
||||
$($(1)DEP)
|
||||
$($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
|
||||
$(call $(1)DEP,$(1))
|
||||
$($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
|
||||
endef
|
||||
|
||||
COMPILE_C = $(call COMPILE,CC)
|
||||
|
||||
Reference in New Issue
Block a user