mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 19:02:21 +00:00
174df6affc
* qatar/master: build: remove empty $(OBJS) target build: make rule for linking ff* apply only to these targets build: rearrange some lines in a more logical way s302m: fix resampling for 16 and 24bits. ARM: remove MUL64 and MAC64 inline asm build: clean up .PHONY lists build: move all (un)install* target aliases to toplevel Makefile flvenc: propagate error properly build: remove stale dependency build: do not add CFLAGS-yes to CFLAGS utils.c: fix crash with threading enabled. configure: simplify source_path setup configure: remove --source-path option lavf: deprecate AVFormatParameters.time_base. img2: add framerate private option. img2: add video_size private option. img2: add pixel_format private option. tty: add framerate private option. Conflicts: Makefile configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
97 lines
2.7 KiB
Makefile
97 lines
2.7 KiB
Makefile
#
|
|
# common bits used by all libraries
|
|
#
|
|
|
|
# first so "all" becomes default target
|
|
all: all-yes
|
|
|
|
ifndef SUBDIR
|
|
vpath %.c $(SRC_DIR)
|
|
vpath %.h $(SRC_DIR)
|
|
vpath %.S $(SRC_DIR)
|
|
vpath %.asm $(SRC_DIR)
|
|
vpath %.v $(SRC_DIR)
|
|
|
|
ifndef V
|
|
Q = @
|
|
ECHO = printf "$(1)\t%s\n" $(2)
|
|
BRIEF = CC AS YASM AR LD HOSTCC STRIP CP
|
|
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
|
|
|
|
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
|
|
|
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
|
|
|
|
# Dummy rule to stop make trying to rebuild removed or renamed headers
|
|
%.h:
|
|
@:
|
|
|
|
# Disable suffix rules. Most of the builtin rules are suffix rules,
|
|
# so this saves some time on slow systems.
|
|
.SUFFIXES:
|
|
|
|
endif
|
|
|
|
OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
|
|
|
|
OBJS += $(OBJS-yes)
|
|
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
|
TESTPROGS += $(TESTPROGS-yes)
|
|
|
|
FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
|
|
FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS)
|
|
|
|
EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
|
|
OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS)))
|
|
TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o))
|
|
TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
|
|
HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
|
|
HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
|
|
|
|
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
|
|
|
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
|
SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
|
|
SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
|
|
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
|
|
|
$(HOSTOBJS): %.o: %.c
|
|
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
|
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
|
|
|
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
|
DISTCLEANSUFFIXES = *.pc
|
|
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
|
|
|
|
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
|